| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |