OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "media/filters/decoder_base.h" | 8 #include "media/filters/decoder_base.h" |
9 | 9 |
10 struct AVCodecContext; | 10 struct AVCodecContext; |
11 | 11 |
12 namespace media { | 12 namespace media { |
13 | 13 |
14 // Forward declaration for scoped_ptr_malloc. | 14 // Forward declaration for scoped_ptr_malloc. |
15 class ScopedPtrAVFree; | 15 class ScopedPtrAVFree; |
16 | 16 |
17 class MEDIA_EXPORT FFmpegAudioDecoder | 17 class FFmpegAudioDecoder : public DecoderBase<AudioDecoder, Buffer> { |
18 : public DecoderBase<AudioDecoder, Buffer> { | |
19 public: | 18 public: |
20 explicit FFmpegAudioDecoder(MessageLoop* message_loop); | 19 explicit FFmpegAudioDecoder(MessageLoop* message_loop); |
21 virtual ~FFmpegAudioDecoder(); | 20 virtual ~FFmpegAudioDecoder(); |
22 | 21 |
23 // AudioDecoder implementation. | 22 // AudioDecoder implementation. |
24 virtual AudioDecoderConfig config(); | 23 virtual AudioDecoderConfig config(); |
25 virtual void ProduceAudioSamples(scoped_refptr<Buffer> output); | 24 virtual void ProduceAudioSamples(scoped_refptr<Buffer> output); |
26 | 25 |
27 protected: | 26 protected: |
28 virtual void DoInitialize(DemuxerStream* demuxer_stream, bool* success, | 27 virtual void DoInitialize(DemuxerStream* demuxer_stream, bool* success, |
(...skipping 22 matching lines...) Expand all Loading... |
51 scoped_ptr_malloc<uint8, ScopedPtrAVFree> output_buffer_; | 50 scoped_ptr_malloc<uint8, ScopedPtrAVFree> output_buffer_; |
52 | 51 |
53 static const size_t kOutputBufferSize; | 52 static const size_t kOutputBufferSize; |
54 | 53 |
55 DISALLOW_COPY_AND_ASSIGN(FFmpegAudioDecoder); | 54 DISALLOW_COPY_AND_ASSIGN(FFmpegAudioDecoder); |
56 }; | 55 }; |
57 | 56 |
58 } // namespace media | 57 } // namespace media |
59 | 58 |
60 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ | 59 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ |
OLD | NEW |