Index: media/filters/video_renderer_impl.h |
diff --git a/media/filters/video_renderer_impl.h b/media/filters/video_renderer_impl.h |
index 0f142be3520509a1e7b3ac200ea601b5f4f6701a..bcba124b5200efa97bd22d6971f9b17779e4afe7 100644 |
--- a/media/filters/video_renderer_impl.h |
+++ b/media/filters/video_renderer_impl.h |
@@ -69,6 +69,7 @@ |
virtual void Flush(const base::Closure& callback) OVERRIDE; |
virtual void StartPlayingFrom(base::TimeDelta timestamp) OVERRIDE; |
virtual void Stop(const base::Closure& callback) OVERRIDE; |
+ virtual void SetPlaybackRate(float playback_rate) OVERRIDE; |
// PlatformThread::Delegate implementation. |
virtual void ThreadMain() OVERRIDE; |
@@ -93,6 +94,14 @@ |
// Called when VideoFrameStream::Reset() completes. |
void OnVideoFrameStreamResetDone(); |
+ |
+ // Calculates the duration to sleep for based on |last_timestamp_|, |
+ // the next frame timestamp (may be NULL), and the provided playback rate. |
+ // |
+ // We don't use |playback_rate_| to avoid locking. |
+ base::TimeDelta CalculateSleepDuration( |
+ const scoped_refptr<VideoFrame>& next_frame, |
+ float playback_rate); |
// Helper function that flushes the buffers when a Stop() or error occurs. |
void DoStopOrError_Locked(); |
@@ -177,6 +186,8 @@ |
bool drop_frames_; |
+ float playback_rate_; |
+ |
BufferingState buffering_state_; |
// Playback operation callbacks. |