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

Unified Diff: media/base/pipeline.h

Issue 376013003: Rename media::Clock to media::TimeDeltaInterpolator and update API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SetBounds Created 6 years, 5 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_unittest.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 e4a52c3dd5863f8ce9ae78580696c3cb2cda960b..4c286724c71946f2affa116cb50c6898361985ba 100644
--- a/media/base/pipeline.h
+++ b/media/base/pipeline.h
@@ -28,11 +28,11 @@ class TimeDelta;
namespace media {
-class Clock;
class FilterCollection;
class MediaLog;
class TextRenderer;
class TextTrackConfig;
+class TimeDeltaInterpolator;
class VideoRenderer;
// Metadata describing a pipeline once it has been initialized.
@@ -176,7 +176,7 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
void set_underflow_disabled_for_testing(bool disabled) {
underflow_disabled_for_testing_ = disabled;
}
- void SetClockForTesting(Clock* clock);
+ void SetTimeDeltaInterpolatorForTesting(TimeDeltaInterpolator* interpolator);
void SetErrorForTesting(PipelineStatus status);
private:
@@ -349,26 +349,25 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
// Current duration as reported by |demuxer_|.
base::TimeDelta duration_;
- // base::TickClock used by |clock_|.
+ // base::TickClock used by |interpolator_|.
base::DefaultTickClock default_tick_clock_;
- // Reference clock. Keeps track of current playback time. Uses system
- // clock and linear interpolation, but can have its time manually set
- // by filters.
- scoped_ptr<Clock> clock_;
+ // Tracks the most recent media time update and provides interpolated values
+ // as playback progresses.
+ scoped_ptr<TimeDeltaInterpolator> interpolator_;
- enum ClockState {
- // Audio (if present) is not rendering. Clock isn't playing.
- CLOCK_PAUSED,
+ enum InterpolationState {
+ // Audio (if present) is not rendering. Time isn't being interpolated.
+ INTERPOLATION_STOPPED,
- // Audio (if present) is rendering. Clock isn't playing.
- CLOCK_WAITING_FOR_AUDIO_TIME_UPDATE,
+ // Audio (if present) is rendering. Time isn't being interpolated.
+ INTERPOLATION_WAITING_FOR_AUDIO_TIME_UPDATE,
- // Audio (if present) is rendering. Clock is playing.
- CLOCK_PLAYING,
+ // Audio (if present) is rendering. Time is being interpolated.
+ INTERPOLATION_STARTED,
};
- ClockState clock_state_;
+ InterpolationState interpolation_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_unittest.cc ('k') | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698