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 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 namespace media { | 26 namespace media { |
27 | 27 |
28 class AudioDiscardHelper; | 28 class AudioDiscardHelper; |
29 class DecoderBuffer; | 29 class DecoderBuffer; |
30 | 30 |
31 class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder { | 31 class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder { |
32 public: | 32 public: |
33 FFmpegAudioDecoder( | 33 FFmpegAudioDecoder( |
34 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 34 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
35 const LogCB& log_cb); | 35 const scoped_refptr<MediaLog>& media_log); |
36 ~FFmpegAudioDecoder() override; | 36 ~FFmpegAudioDecoder() override; |
37 | 37 |
38 // AudioDecoder implementation. | 38 // AudioDecoder implementation. |
39 std::string GetDisplayName() const override; | 39 std::string GetDisplayName() const override; |
40 void Initialize(const AudioDecoderConfig& config, | 40 void Initialize(const AudioDecoderConfig& config, |
41 const InitCB& init_cb, | 41 const InitCB& init_cb, |
42 const OutputCB& output_cb) override; | 42 const OutputCB& output_cb) override; |
43 void Decode(const scoped_refptr<DecoderBuffer>& buffer, | 43 void Decode(const scoped_refptr<DecoderBuffer>& buffer, |
44 const DecodeCB& decode_cb) override; | 44 const DecodeCB& decode_cb) override; |
45 void Reset(const base::Closure& closure) override; | 45 void Reset(const base::Closure& closure) override; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 scoped_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_; | 100 scoped_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_; |
101 scoped_ptr<AVFrame, ScopedPtrAVFreeFrame> av_frame_; | 101 scoped_ptr<AVFrame, ScopedPtrAVFreeFrame> av_frame_; |
102 | 102 |
103 AudioDecoderConfig config_; | 103 AudioDecoderConfig config_; |
104 | 104 |
105 // AVSampleFormat initially requested; not Chrome's SampleFormat. | 105 // AVSampleFormat initially requested; not Chrome's SampleFormat. |
106 int av_sample_format_; | 106 int av_sample_format_; |
107 | 107 |
108 scoped_ptr<AudioDiscardHelper> discard_helper_; | 108 scoped_ptr<AudioDiscardHelper> discard_helper_; |
109 | 109 |
110 LogCB log_cb_; | 110 scoped_refptr<MediaLog> media_log_; |
111 | 111 |
112 DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder); | 112 DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder); |
113 }; | 113 }; |
114 | 114 |
115 } // namespace media | 115 } // namespace media |
116 | 116 |
117 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ | 117 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ |
OLD | NEW |