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

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: ... rebase Created 7 years, 11 months 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 AudioTimestampHelper; 24 class AudioTimestampHelper;
24 class DataBuffer; 25 class DataBuffer;
25 class DecoderBuffer; 26 class DecoderBuffer;
26 struct QueuedAudioBuffer; 27 struct QueuedAudioBuffer;
27 28
28 class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder { 29 class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder {
29 public: 30 public:
30 explicit FFmpegAudioDecoder( 31 explicit FFmpegAudioDecoder(
31 const scoped_refptr<base::MessageLoopProxy>& message_loop); 32 const scoped_refptr<base::MessageLoopProxy>& message_loop);
32 33
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 85
85 // Holds decoded audio. 86 // Holds decoded audio.
86 AVFrame* av_frame_; 87 AVFrame* av_frame_;
87 88
88 ReadCB read_cb_; 89 ReadCB read_cb_;
89 90
90 // Since multiple frames may be decoded from the same packet we need to queue 91 // Since multiple frames may be decoded from the same packet we need to queue
91 // them up and hand them out as we receive Read() calls. 92 // them up and hand them out as we receive Read() calls.
92 std::list<QueuedAudioBuffer> queued_audio_; 93 std::list<QueuedAudioBuffer> queued_audio_;
93 94
95 // We may need to convert the audio data coming out of FFmpeg from planar
96 // float to integer.
97 scoped_ptr<AudioBus> converter_bus_;
98
94 DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder); 99 DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder);
95 }; 100 };
96 101
97 } // namespace media 102 } // namespace media
98 103
99 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ 104 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/decrypting_demuxer_stream_unittest.cc ('k') | media/filters/ffmpeg_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698