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

Unified Diff: media/renderers/video_renderer_impl.cc

Issue 1129323003: Allow callers of TimeSource::GetWallClockTime() to suspend time. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 5 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/renderers/video_renderer_impl.h ('k') | media/renderers/video_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/video_renderer_impl.cc
diff --git a/media/renderers/video_renderer_impl.cc b/media/renderers/video_renderer_impl.cc
index c586ab23e26946a04063b43b2c8e302120a2309b..27b86ce7f888a2de2e3975117215f363598ee633 100644
--- a/media/renderers/video_renderer_impl.cc
+++ b/media/renderers/video_renderer_impl.cc
@@ -130,7 +130,7 @@ void VideoRendererImpl::Initialize(
const BufferingStateCB& buffering_state_cb,
const base::Closure& ended_cb,
const PipelineStatusCB& error_cb,
- const WallClockTimeCB& wall_clock_time_cb,
+ const TimeSource::WallClockTimeCB& wall_clock_time_cb,
const base::Closure& waiting_for_decryption_key_cb) {
DCHECK(task_runner_->BelongsToCurrentThread());
base::AutoLock auto_lock(lock_);
@@ -333,8 +333,8 @@ void VideoRendererImpl::ThreadMain() {
continue;
}
- base::TimeTicks target_paint_time =
- wall_clock_time_cb_.Run(ready_frames_.front()->timestamp());
+ base::TimeTicks target_paint_time = wall_clock_time_cb_.Run(
+ ready_frames_.front()->timestamp(), TimeSource::SINGLE_TIMESTAMP);
// If media time has stopped, don't attempt to paint any more frames.
if (target_paint_time.is_null()) {
@@ -408,7 +408,8 @@ void VideoRendererImpl::PaintNextReadyFrame_Locked() {
scoped_refptr<VideoFrame> next_frame = ready_frames_.front();
ready_frames_.pop_front();
- last_media_time_ = wall_clock_time_cb_.Run(next_frame->timestamp());
+ last_media_time_ = wall_clock_time_cb_.Run(next_frame->timestamp(),
+ TimeSource::SINGLE_TIMESTAMP);
paint_cb_.Run(next_frame);
@@ -423,8 +424,8 @@ void VideoRendererImpl::DropNextReadyFrame_Locked() {
lock_.AssertAcquired();
- last_media_time_ =
- wall_clock_time_cb_.Run(ready_frames_.front()->timestamp());
+ last_media_time_ = wall_clock_time_cb_.Run(ready_frames_.front()->timestamp(),
+ TimeSource::SINGLE_TIMESTAMP);
ready_frames_.pop_front();
frames_dropped_++;
« no previous file with comments | « media/renderers/video_renderer_impl.h ('k') | media/renderers/video_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698