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

Unified Diff: media/filters/ffmpeg_audio_decoder.h

Issue 10869085: Update FFmpegAudioDecoder to support multi-frame packets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enable test. Fix style error. Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: media/filters/ffmpeg_audio_decoder.h
diff --git a/media/filters/ffmpeg_audio_decoder.h b/media/filters/ffmpeg_audio_decoder.h
index 8e67f59c72c2dff6aec55b82d50f68f6d6517110..d199309de368fbf56e57eae7e1826554819f88fb 100644
--- a/media/filters/ffmpeg_audio_decoder.h
+++ b/media/filters/ffmpeg_audio_decoder.h
@@ -6,6 +6,7 @@
#define MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_
#include <list>
+#include <vector>
#include "base/callback.h"
#include "media/base/audio_decoder.h"
@@ -22,6 +23,7 @@ namespace media {
class DataBuffer;
class DecoderBuffer;
+struct QueuedAudioBuffer;
class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder {
public:
@@ -92,6 +94,10 @@ class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder {
ReadCB read_cb_;
+ // Since multiple frames may be decoded from the same packet we need to queue
+ // them up and hand them out as we receive Read() calls.
+ std::vector<QueuedAudioBuffer> queued_audio_;
acolwell GONE FROM CHROMIUM 2012/08/28 14:40:49 use a std::list here so popping from the front doe
DaleCurtis 2012/08/28 20:19:16 Oh no, I'm in CS 101 all over again. /hangs head i
+
DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder);
};

Powered by Google App Engine
This is Rietveld 408576698