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

Unified Diff: media/filters/opus_audio_decoder.h

Issue 140823012: Reland: Add Stop() to AudioDecoder. (https://codereview.chromium.org/126793002/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove extra scope 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
« no previous file with comments | « media/filters/ffmpeg_audio_decoder_unittest.cc ('k') | media/filters/opus_audio_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2faacedd83b34856a815b3525e94d319e12d0319 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 reset_cb_;
+ base::Closure stop_cb_;
// 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
« no previous file with comments | « media/filters/ffmpeg_audio_decoder_unittest.cc ('k') | media/filters/opus_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698