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_AUDIO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ |
6 #define MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ | 6 #define MEDIA_FILTERS_FFMPEG_AUDIO_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/time/time.h" | 13 #include "base/time/time.h" |
14 #include "media/base/audio_decoder.h" | 14 #include "media/base/audio_decoder.h" |
15 #include "media/base/demuxer_stream.h" | 15 #include "media/base/demuxer_stream.h" |
16 #include "media/base/media_log.h" | 16 #include "media/base/media_log.h" |
17 #include "media/base/sample_format.h" | 17 #include "media/base/sample_format.h" |
18 #include "media/ffmpeg/ffmpeg_deleters.h" | 18 #include "media/ffmpeg/ffmpeg_deleters.h" |
19 | 19 |
20 struct AVCodecContext; | 20 struct AVCodecContext; |
21 struct AVFrame; | 21 struct AVFrame; |
22 | 22 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 void ReleaseFFmpegResources(); | 92 void ReleaseFFmpegResources(); |
93 void ResetTimestampState(); | 93 void ResetTimestampState(); |
94 | 94 |
95 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 95 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
96 | 96 |
97 OutputCB output_cb_; | 97 OutputCB output_cb_; |
98 | 98 |
99 DecoderState state_; | 99 DecoderState state_; |
100 | 100 |
101 // FFmpeg structures owned by this object. | 101 // FFmpeg structures owned by this object. |
102 scoped_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_; | 102 std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_; |
103 scoped_ptr<AVFrame, ScopedPtrAVFreeFrame> av_frame_; | 103 std::unique_ptr<AVFrame, ScopedPtrAVFreeFrame> av_frame_; |
104 | 104 |
105 AudioDecoderConfig config_; | 105 AudioDecoderConfig config_; |
106 | 106 |
107 // AVSampleFormat initially requested; not Chrome's SampleFormat. | 107 // AVSampleFormat initially requested; not Chrome's SampleFormat. |
108 int av_sample_format_; | 108 int av_sample_format_; |
109 | 109 |
110 scoped_ptr<AudioDiscardHelper> discard_helper_; | 110 std::unique_ptr<AudioDiscardHelper> discard_helper_; |
111 | 111 |
112 scoped_refptr<MediaLog> media_log_; | 112 scoped_refptr<MediaLog> media_log_; |
113 | 113 |
114 DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder); | 114 DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace media | 117 } // namespace media |
118 | 118 |
119 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ | 119 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ |
OLD | NEW |