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

Unified Diff: media/filters/audio_renderer_impl.h

Issue 274443006: Revert of Rename AudioRenderer::Play/Pause() to Start/StopRendering(). (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
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/filters/audio_renderer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_impl.h
diff --git a/media/filters/audio_renderer_impl.h b/media/filters/audio_renderer_impl.h
index c98ead8d0c18007c90823d060a1cfa2bc15938e3..0748f0f2ca0b424baf04732932fe9fb0fbd73744 100644
--- a/media/filters/audio_renderer_impl.h
+++ b/media/filters/audio_renderer_impl.h
@@ -72,8 +72,8 @@
const TimeCB& time_cb,
const base::Closure& ended_cb,
const PipelineStatusCB& error_cb) OVERRIDE;
- virtual void StartRendering() OVERRIDE;
- virtual void StopRendering() OVERRIDE;
+ virtual void Play() OVERRIDE;
+ virtual void Pause() OVERRIDE;
virtual void Flush(const base::Closure& callback) OVERRIDE;
virtual void Stop(const base::Closure& callback) OVERRIDE;
virtual void SetPlaybackRate(float rate) OVERRIDE;
@@ -97,33 +97,12 @@
private:
friend class AudioRendererImplTest;
- // Important detail: being in kPlaying doesn't imply that audio is being
- // rendered. Rather, it means that the renderer is ready to go. The actual
- // rendering of audio is controlled via Start/StopRendering().
- //
- // kUninitialized
- // | Initialize()
- // |
- // V
- // kInitializing
- // | Decoders initialized
- // |
- // V Decoders reset
- // kFlushed <------------------ kFlushing
- // | Preroll() ^
- // | |
- // V | Flush()
- // kPrerolling ----------------> kPlaying ---------.
- // Enough data buffered ^ | Not enough data
- // | | buffered
- // Enough data buffered | V
- // kRebuffering <--- kUnderflow
- // ResumeAfterUnderflow()
+ // TODO(acolwell): Add a state machine graph.
enum State {
kUninitialized,
kInitializing,
+ kPaused,
kFlushing,
- kFlushed,
kPrerolling,
kPlaying,
kStopped,
@@ -148,8 +127,8 @@
const base::TimeDelta& playback_delay,
const base::TimeTicks& time_now);
- void StartRendering_Locked();
- void StopRendering_Locked();
+ void DoPlay_Locked();
+ void DoPause_Locked();
// AudioRendererSink::RenderCallback implementation.
//
@@ -256,9 +235,7 @@
// Simple state tracking variable.
State state_;
- // Keep track of whether or not the sink is playing and whether we should be
- // rendering.
- bool rendering_;
+ // Keep track of whether or not the sink is playing.
bool sink_playing_;
// Keep track of our outstanding read to |decoder_|.
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/filters/audio_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698