OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
| 9 #include <memory> |
9 | 10 |
10 #include "base/callback.h" | 11 #include "base/callback.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
14 #include "media/base/video_decoder.h" | 14 #include "media/base/video_decoder.h" |
15 #include "media/base/video_decoder_config.h" | 15 #include "media/base/video_decoder_config.h" |
16 #include "media/base/video_frame_pool.h" | 16 #include "media/base/video_frame_pool.h" |
17 #include "media/ffmpeg/ffmpeg_deleters.h" | 17 #include "media/ffmpeg/ffmpeg_deleters.h" |
18 | 18 |
19 struct AVCodecContext; | 19 struct AVCodecContext; |
20 struct AVFrame; | 20 struct AVFrame; |
21 | 21 |
22 namespace base { | 22 namespace base { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // and resets them to NULL. | 76 // and resets them to NULL. |
77 void ReleaseFFmpegResources(); | 77 void ReleaseFFmpegResources(); |
78 | 78 |
79 base::ThreadChecker thread_checker_; | 79 base::ThreadChecker thread_checker_; |
80 | 80 |
81 DecoderState state_; | 81 DecoderState state_; |
82 | 82 |
83 OutputCB output_cb_; | 83 OutputCB output_cb_; |
84 | 84 |
85 // FFmpeg structures owned by this object. | 85 // FFmpeg structures owned by this object. |
86 scoped_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_; | 86 std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_; |
87 scoped_ptr<AVFrame, ScopedPtrAVFreeFrame> av_frame_; | 87 std::unique_ptr<AVFrame, ScopedPtrAVFreeFrame> av_frame_; |
88 | 88 |
89 VideoDecoderConfig config_; | 89 VideoDecoderConfig config_; |
90 | 90 |
91 VideoFramePool frame_pool_; | 91 VideoFramePool frame_pool_; |
92 | 92 |
93 bool decode_nalus_; | 93 bool decode_nalus_; |
94 | 94 |
95 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); | 95 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); |
96 }; | 96 }; |
97 | 97 |
98 } // namespace media | 98 } // namespace media |
99 | 99 |
100 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 100 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
OLD | NEW |