| 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 FFmpegAudioDecoder : public DecoderBase<AudioDecoder, Buffer> { | 17 class MEDIA_EXPORT FFmpegAudioDecoder |
| 18 : public DecoderBase<AudioDecoder, Buffer> { |
| 18 public: | 19 public: |
| 19 explicit FFmpegAudioDecoder(MessageLoop* message_loop); | 20 explicit FFmpegAudioDecoder(MessageLoop* message_loop); |
| 20 virtual ~FFmpegAudioDecoder(); | 21 virtual ~FFmpegAudioDecoder(); |
| 21 | 22 |
| 22 // AudioDecoder implementation. | 23 // AudioDecoder implementation. |
| 23 virtual AudioDecoderConfig config(); | 24 virtual AudioDecoderConfig config(); |
| 24 virtual void ProduceAudioSamples(scoped_refptr<Buffer> output); | 25 virtual void ProduceAudioSamples(scoped_refptr<Buffer> output); |
| 25 | 26 |
| 26 protected: | 27 protected: |
| 27 virtual void DoInitialize(DemuxerStream* demuxer_stream, bool* success, | 28 virtual void DoInitialize(DemuxerStream* demuxer_stream, bool* success, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 50 scoped_ptr_malloc<uint8, ScopedPtrAVFree> output_buffer_; | 51 scoped_ptr_malloc<uint8, ScopedPtrAVFree> output_buffer_; |
| 51 | 52 |
| 52 static const size_t kOutputBufferSize; | 53 static const size_t kOutputBufferSize; |
| 53 | 54 |
| 54 DISALLOW_COPY_AND_ASSIGN(FFmpegAudioDecoder); | 55 DISALLOW_COPY_AND_ASSIGN(FFmpegAudioDecoder); |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 } // namespace media | 58 } // namespace media |
| 58 | 59 |
| 59 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ | 60 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ |
| OLD | NEW |