Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.h

Issue 2088513004: Add encoder/decoder names to software H264. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 * 9 *
10 */ 10 */
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 int32_t RegisterDecodeCompleteCallback( 45 int32_t RegisterDecodeCompleteCallback(
46 DecodedImageCallback* callback) override; 46 DecodedImageCallback* callback) override;
47 47
48 // |missing_frames|, |fragmentation| and |render_time_ms| are ignored. 48 // |missing_frames|, |fragmentation| and |render_time_ms| are ignored.
49 int32_t Decode(const EncodedImage& input_image, 49 int32_t Decode(const EncodedImage& input_image,
50 bool /*missing_frames*/, 50 bool /*missing_frames*/,
51 const RTPFragmentationHeader* /*fragmentation*/, 51 const RTPFragmentationHeader* /*fragmentation*/,
52 const CodecSpecificInfo* codec_specific_info = nullptr, 52 const CodecSpecificInfo* codec_specific_info = nullptr,
53 int64_t render_time_ms = -1) override; 53 int64_t render_time_ms = -1) override;
54 54
55 const char* ImplementationName() const override;
56
55 private: 57 private:
56 // Called by FFmpeg when it needs a frame buffer to store decoded frames in. 58 // Called by FFmpeg when it needs a frame buffer to store decoded frames in.
57 // The |VideoFrame| returned by FFmpeg at |Decode| originate from here. Their 59 // The |VideoFrame| returned by FFmpeg at |Decode| originate from here. Their
58 // buffers are reference counted and freed by FFmpeg using |AVFreeBuffer2|. 60 // buffers are reference counted and freed by FFmpeg using |AVFreeBuffer2|.
59 static int AVGetBuffer2( 61 static int AVGetBuffer2(
60 AVCodecContext* context, AVFrame* av_frame, int flags); 62 AVCodecContext* context, AVFrame* av_frame, int flags);
61 // Called by FFmpeg when it is done with a video frame, see |AVGetBuffer2|. 63 // Called by FFmpeg when it is done with a video frame, see |AVGetBuffer2|.
62 static void AVFreeBuffer2(void* opaque, uint8_t* data); 64 static void AVFreeBuffer2(void* opaque, uint8_t* data);
63 65
64 bool IsInitialized() const; 66 bool IsInitialized() const;
65 67
66 // Reports statistics with histograms. 68 // Reports statistics with histograms.
67 void ReportInit(); 69 void ReportInit();
68 void ReportError(); 70 void ReportError();
69 71
70 I420BufferPool pool_; 72 I420BufferPool pool_;
71 std::unique_ptr<AVCodecContext, AVCodecContextDeleter> av_context_; 73 std::unique_ptr<AVCodecContext, AVCodecContextDeleter> av_context_;
72 std::unique_ptr<AVFrame, AVFrameDeleter> av_frame_; 74 std::unique_ptr<AVFrame, AVFrameDeleter> av_frame_;
73 75
74 DecodedImageCallback* decoded_image_callback_; 76 DecodedImageCallback* decoded_image_callback_;
75 77
76 bool has_reported_init_; 78 bool has_reported_init_;
77 bool has_reported_error_; 79 bool has_reported_error_;
78 }; 80 };
79 81
80 } // namespace webrtc 82 } // namespace webrtc
81 83
82 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_DECODER_IMPL_H_ 84 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_DECODER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698