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

Unified Diff: media/filters/decrypting_audio_decoder.h

Issue 331863004: Revert 276344 "Add callback in VideoDecoder and AudioDecoder to ..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2049/src/
Patch Set: Created 6 years, 6 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
« no previous file with comments | « media/filters/decoder_stream_traits.cc ('k') | media/filters/decrypting_audio_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decrypting_audio_decoder.h
===================================================================
--- media/filters/decrypting_audio_decoder.h (revision 277175)
+++ media/filters/decrypting_audio_decoder.h (working copy)
@@ -44,10 +44,10 @@
// AudioDecoder implementation.
virtual void Initialize(const AudioDecoderConfig& config,
- const PipelineStatusCB& status_cb,
- const OutputCB& output_cb) OVERRIDE;
+ const PipelineStatusCB& status_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;
@@ -90,15 +90,15 @@
// Resets decoder and calls |reset_cb_|.
void DoReset();
- // Sets timestamps for |frames| and then passes them to |output_cb_|.
- void ProcessDecodedFrames(const Decryptor::AudioBuffers& frames);
+ // Sets timestamp and duration for |queued_audio_frames_| to make sure the
+ // renderer always receives continuous frames without gaps and overlaps.
+ void EnqueueFrames(const Decryptor::AudioBuffers& frames);
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
State state_;
PipelineStatusCB init_cb_;
- OutputCB output_cb_;
DecodeCB decode_cb_;
base::Closure reset_cb_;
base::Closure stop_cb_;
@@ -121,6 +121,8 @@
// decryption key.
bool key_added_while_decode_pending_;
+ Decryptor::AudioBuffers queued_audio_frames_;
+
scoped_ptr<AudioTimestampHelper> timestamp_helper_;
// NOTE: Weak pointers must be invalidated before all other member variables.
« no previous file with comments | « media/filters/decoder_stream_traits.cc ('k') | media/filters/decrypting_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698