Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: media/filters/ffmpeg_audio_decoder.h

Issue 11280301: Roll FFMpeg for M26. Fix ffmpeg float audio decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix AFR. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "media/base/audio_decoder.h" 11 #include "media/base/audio_decoder.h"
12 #include "media/base/demuxer_stream.h" 12 #include "media/base/demuxer_stream.h"
13 13
14 struct AVCodecContext; 14 struct AVCodecContext;
15 struct AVFrame; 15 struct AVFrame;
16 16
17 namespace base { 17 namespace base {
18 class MessageLoopProxy; 18 class MessageLoopProxy;
19 } 19 }
20 20
21 namespace media { 21 namespace media {
22 22
23 class AudioBus;
23 class DataBuffer; 24 class DataBuffer;
24 class DecoderBuffer; 25 class DecoderBuffer;
25 struct QueuedAudioBuffer; 26 struct QueuedAudioBuffer;
26 27
27 class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder { 28 class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder {
28 public: 29 public:
29 explicit FFmpegAudioDecoder( 30 explicit FFmpegAudioDecoder(
30 const scoped_refptr<base::MessageLoopProxy>& message_loop); 31 const scoped_refptr<base::MessageLoopProxy>& message_loop);
31 32
32 // AudioDecoder implementation. 33 // AudioDecoder implementation.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 84
84 // Holds decoded audio. 85 // Holds decoded audio.
85 AVFrame* av_frame_; 86 AVFrame* av_frame_;
86 87
87 ReadCB read_cb_; 88 ReadCB read_cb_;
88 89
89 // Since multiple frames may be decoded from the same packet we need to queue 90 // Since multiple frames may be decoded from the same packet we need to queue
90 // them up and hand them out as we receive Read() calls. 91 // them up and hand them out as we receive Read() calls.
91 std::list<QueuedAudioBuffer> queued_audio_; 92 std::list<QueuedAudioBuffer> queued_audio_;
92 93
94 // We may need to convert the audio data coming out of FFmpeg from planar
95 // float to integer.
96 scoped_ptr<AudioBus> converter_bus_;
97
93 DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder); 98 DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder);
94 }; 99 };
95 100
96 } // namespace media 101 } // namespace media
97 102
98 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ 103 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698