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

Unified Diff: media/filters/opus_audio_decoder.h

Issue 126793002: Add Stop() to AudioDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use BTCL in decoders and not ARI Created 6 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 side-by-side diff with in-line comments
Download patch
Index: media/filters/opus_audio_decoder.h
diff --git a/media/filters/opus_audio_decoder.h b/media/filters/opus_audio_decoder.h
index d5eb595cd1045c6558831ebc84674ca147f1a2f1..574f72e1c24a3fd2dc2dad40b470c9a6f78c7886 100644
--- a/media/filters/opus_audio_decoder.h
+++ b/media/filters/opus_audio_decoder.h
@@ -40,14 +40,17 @@ class MEDIA_EXPORT OpusAudioDecoder : public AudioDecoder {
virtual ChannelLayout channel_layout() OVERRIDE;
virtual int samples_per_second() OVERRIDE;
virtual void Reset(const base::Closure& closure) OVERRIDE;
+ virtual void Stop(const base::Closure& closure) OVERRIDE;
private:
+ void DoReset();
+ void DoStop();
+
// Reads from the demuxer stream with corresponding callback method.
void ReadFromDemuxerStream();
void BufferReady(DemuxerStream::Status status,
const scoped_refptr<DecoderBuffer>& input);
-
bool ConfigureDecoder();
void CloseDecoder();
void ResetTimestampState();
@@ -73,6 +76,8 @@ class MEDIA_EXPORT OpusAudioDecoder : public AudioDecoder {
base::TimeDelta last_input_timestamp_;
ReadCB read_cb_;
+ base::Closure stop_cb_;
+ base::Closure reset_cb_;
xhwang 2014/01/10 18:58:51 nit: change the order of these two
// Number of frames to be discarded from the start of the packet. This value
// is respected for all packets except for the first one in the stream. For

Powered by Google App Engine
This is Rietveld 408576698