Chromium Code Reviews| Index: media/base/pipeline.h |
| diff --git a/media/base/pipeline.h b/media/base/pipeline.h |
| index 08ddfd15c651ff298ee95f91dcca1c969a492b54..491a9eceb345bcd0fad4470491886a8c09e1fdc2 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. |
| @@ -179,7 +179,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: |
| @@ -357,26 +357,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 { |
|
acolwell GONE FROM CHROMIUM
2014/07/09 00:42:46
It seems weird that we are keeping track of this s
scherkus (not reviewing)
2014/07/09 01:54:32
Yeah I have some future CLs in mind to help clean
|
| + // 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 |