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

Side by Side Diff: media/renderers/video_renderer_impl.cc

Issue 1068593003: Introduce TimeSource notifications to the VideoRenderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/renderers/video_renderer_impl.h" 5 #include "media/renderers/video_renderer_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // rendering. 268 // rendering.
269 PaintNextReadyFrame_Locked(); 269 PaintNextReadyFrame_Locked();
270 } 270 }
271 } 271 }
272 272
273 void VideoRendererImpl::SetTickClockForTesting( 273 void VideoRendererImpl::SetTickClockForTesting(
274 scoped_ptr<base::TickClock> tick_clock) { 274 scoped_ptr<base::TickClock> tick_clock) {
275 tick_clock_.swap(tick_clock); 275 tick_clock_.swap(tick_clock);
276 } 276 }
277 277
278 void VideoRendererImpl::OnTimeProgressing() {
279 // TODO(dalecurtis): Wire up to the VideoRendererSink once it's implemented.
280 }
281
282 void VideoRendererImpl::OnTimeStopped() {
283 // TODO(dalecurtis): Wire up to the VideoRendererSink once it's implemented.
284 }
285
278 void VideoRendererImpl::PaintNextReadyFrame_Locked() { 286 void VideoRendererImpl::PaintNextReadyFrame_Locked() {
279 lock_.AssertAcquired(); 287 lock_.AssertAcquired();
280 288
281 scoped_refptr<VideoFrame> next_frame = ready_frames_.front(); 289 scoped_refptr<VideoFrame> next_frame = ready_frames_.front();
282 ready_frames_.pop_front(); 290 ready_frames_.pop_front();
283 frames_decoded_++; 291 frames_decoded_++;
284 292
285 last_media_time_ = wall_clock_time_cb_.Run(next_frame->timestamp()); 293 last_media_time_ = wall_clock_time_cb_.Run(next_frame->timestamp());
286 294
287 paint_cb_.Run(next_frame); 295 paint_cb_.Run(next_frame);
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 task_runner_->PostTask(FROM_HERE, base::Bind(statistics_cb_, statistics)); 464 task_runner_->PostTask(FROM_HERE, base::Bind(statistics_cb_, statistics));
457 465
458 frames_decoded_ = 0; 466 frames_decoded_ = 0;
459 frames_dropped_ = 0; 467 frames_dropped_ = 0;
460 } 468 }
461 469
462 frame_available_.TimedWait(wait_duration); 470 frame_available_.TimedWait(wait_duration);
463 } 471 }
464 472
465 } // namespace media 473 } // namespace media
OLDNEW
« media/renderers/renderer_impl.cc ('K') | « media/renderers/video_renderer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698