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

Unified Diff: media/filters/ffmpeg_audio_decoder.h

Issue 297553002: Add callback in VideoDecoder and AudioDecoder to return decoded frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 89360220f3689122f4458e4bf0447a009d59cf10..86a81d966d4d162aef09e12b7dbfde89bcb43ed9 100644
--- a/media/filters/ffmpeg_audio_decoder.h
+++ b/media/filters/ffmpeg_audio_decoder.h
@@ -37,10 +37,10 @@ class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder {
// AudioDecoder implementation.
virtual void Initialize(const AudioDecoderConfig& config,
- const PipelineStatusCB& status_cb) OVERRIDE;
+ const PipelineStatusCB& status_cb,
+ const OutputCB& output_cb) OVERRIDE;
virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer,
const DecodeCB& decode_cb) OVERRIDE;
- virtual scoped_refptr<AudioBuffer> GetDecodeOutput() OVERRIDE;
virtual void Reset(const base::Closure& closure) OVERRIDE;
virtual void Stop() OVERRIDE;
@@ -72,6 +72,8 @@ class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder {
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+ OutputCB output_cb_;
+
DecoderState state_;
// FFmpeg structures owned by this object.
@@ -85,10 +87,6 @@ class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder {
scoped_ptr<AudioDiscardHelper> discard_helper_;
- // Since multiple frames may be decoded from the same packet we need to queue
- // them up.
- std::list<scoped_refptr<AudioBuffer> > queued_audio_;
-
LogCB log_cb_;
DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder);

Powered by Google App Engine
This is Rietveld 408576698