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

Unified Diff: media/base/pipeline.h

Issue 294133003: Extract media::Clock::IsPlaying() into media::Pipeline::ClockState enum. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes + rebase 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/clock.cc ('k') | media/base/pipeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline.h
diff --git a/media/base/pipeline.h b/media/base/pipeline.h
index 06bffba19a138daa1ef40bf32f2a43e4f67e227c..b40cd3c98c798844906682ae2c43291bc401277f 100644
--- a/media/base/pipeline.h
+++ b/media/base/pipeline.h
@@ -326,6 +326,7 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
void StartWaitingForEnoughData();
void StartPlayback();
+ void PauseClockAndStopRendering_Locked();
void StartClockIfWaitingForTimeUpdate_Locked();
// Task runner used to execute pipeline tasks.
@@ -365,10 +366,18 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
// by filters.
scoped_ptr<Clock> clock_;
- // If this value is set to true, then |clock_| is paused and we are waiting
- // for an update of the clock greater than or equal to the elapsed time to
- // start the clock.
- bool waiting_for_clock_update_;
+ enum ClockState {
+ // Audio (if present) is not rendering. Clock isn't playing.
+ CLOCK_PAUSED,
+
+ // Audio (if present) is rendering. Clock isn't playing.
+ CLOCK_WAITING_FOR_AUDIO_TIME_UPDATE,
+
+ // Audio (if present) is rendering. Clock is playing.
+ CLOCK_PLAYING,
+ };
+
+ ClockState clock_state_;
// Status of the pipeline. Initialized to PIPELINE_OK which indicates that
// the pipeline is operating correctly. Any other value indicates that the
« no previous file with comments | « media/base/clock.cc ('k') | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698