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" |
23 #include "webrtc/common_video/include/i420_buffer_pool.h" | 24 #include "webrtc/common_video/include/i420_buffer_pool.h" |
24 | 25 |
25 namespace webrtc { | 26 namespace webrtc { |
26 | 27 |
27 struct AVCodecContextDeleter { | 28 struct AVCodecContextDeleter { |
28 void operator()(AVCodecContext* ptr) const { avcodec_free_context(&ptr); } | 29 void operator()(AVCodecContext* ptr) const { avcodec_free_context(&ptr); } |
29 }; | 30 }; |
30 struct AVFrameDeleter { | 31 struct AVFrameDeleter { |
31 void operator()(AVFrame* ptr) const { av_frame_free(&ptr); } | 32 void operator()(AVFrame* ptr) const { av_frame_free(&ptr); } |
32 }; | 33 }; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 void ReportError(); | 71 void ReportError(); |
71 | 72 |
72 I420BufferPool pool_; | 73 I420BufferPool pool_; |
73 std::unique_ptr<AVCodecContext, AVCodecContextDeleter> av_context_; | 74 std::unique_ptr<AVCodecContext, AVCodecContextDeleter> av_context_; |
74 std::unique_ptr<AVFrame, AVFrameDeleter> av_frame_; | 75 std::unique_ptr<AVFrame, AVFrameDeleter> av_frame_; |
75 | 76 |
76 DecodedImageCallback* decoded_image_callback_; | 77 DecodedImageCallback* decoded_image_callback_; |
77 | 78 |
78 bool has_reported_init_; | 79 bool has_reported_init_; |
79 bool has_reported_error_; | 80 bool has_reported_error_; |
| 81 |
| 82 webrtc::H264BitstreamParser h264_bitstream_parser_; |
80 }; | 83 }; |
81 | 84 |
82 } // namespace webrtc | 85 } // namespace webrtc |
83 | 86 |
84 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_DECODER_IMPL_H_ | 87 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_DECODER_IMPL_H_ |
OLD | NEW |