OLD | NEW |
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 */ |
11 | 11 |
12 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_DECODER_IMPL_H_ | 12 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_DECODER_IMPL_H_ |
13 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_DECODER_IMPL_H_ | 13 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_DECODER_IMPL_H_ |
14 | 14 |
15 #include <memory> | 15 #include <memory> |
16 | 16 |
17 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" | 17 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" |
18 | 18 |
19 extern "C" { | 19 extern "C" { |
20 #include "third_party/ffmpeg/libavcodec/avcodec.h" | 20 #include "third_party/ffmpeg/libavcodec/avcodec.h" |
21 } // extern "C" | 21 } // extern "C" |
22 | 22 |
23 #include "webrtc/common_video/h264/h264_bitstream_parser.h" | |
24 #include "webrtc/common_video/include/i420_buffer_pool.h" | 23 #include "webrtc/common_video/include/i420_buffer_pool.h" |
25 | 24 |
26 namespace webrtc { | 25 namespace webrtc { |
27 | 26 |
28 struct AVCodecContextDeleter { | 27 struct AVCodecContextDeleter { |
29 void operator()(AVCodecContext* ptr) const { avcodec_free_context(&ptr); } | 28 void operator()(AVCodecContext* ptr) const { avcodec_free_context(&ptr); } |
30 }; | 29 }; |
31 struct AVFrameDeleter { | 30 struct AVFrameDeleter { |
32 void operator()(AVFrame* ptr) const { av_frame_free(&ptr); } | 31 void operator()(AVFrame* ptr) const { av_frame_free(&ptr); } |
33 }; | 32 }; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 void ReportError(); | 70 void ReportError(); |
72 | 71 |
73 I420BufferPool pool_; | 72 I420BufferPool pool_; |
74 std::unique_ptr<AVCodecContext, AVCodecContextDeleter> av_context_; | 73 std::unique_ptr<AVCodecContext, AVCodecContextDeleter> av_context_; |
75 std::unique_ptr<AVFrame, AVFrameDeleter> av_frame_; | 74 std::unique_ptr<AVFrame, AVFrameDeleter> av_frame_; |
76 | 75 |
77 DecodedImageCallback* decoded_image_callback_; | 76 DecodedImageCallback* decoded_image_callback_; |
78 | 77 |
79 bool has_reported_init_; | 78 bool has_reported_init_; |
80 bool has_reported_error_; | 79 bool has_reported_error_; |
81 | |
82 webrtc::H264BitstreamParser h264_bitstream_parser_; | |
83 }; | 80 }; |
84 | 81 |
85 } // namespace webrtc | 82 } // namespace webrtc |
86 | 83 |
87 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_DECODER_IMPL_H_ | 84 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_DECODER_IMPL_H_ |
OLD | NEW |