| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/renderer/media/cma_renderer.h" | 5 #include "chromecast/renderer/media/cma_renderer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 } | 371 } |
| 372 | 372 |
| 373 void CmaRenderer::OnStatisticsUpdated( | 373 void CmaRenderer::OnStatisticsUpdated( |
| 374 const ::media::PipelineStatistics& stats) { | 374 const ::media::PipelineStatistics& stats) { |
| 375 DCHECK(thread_checker_.CalledOnValidThread()); | 375 DCHECK(thread_checker_.CalledOnValidThread()); |
| 376 client_->OnStatisticsUpdate(stats); | 376 client_->OnStatisticsUpdate(stats); |
| 377 } | 377 } |
| 378 | 378 |
| 379 void CmaRenderer::OnNaturalSizeChanged(const gfx::Size& size) { | 379 void CmaRenderer::OnNaturalSizeChanged(const gfx::Size& size) { |
| 380 DCHECK(thread_checker_.CalledOnValidThread()); | 380 DCHECK(thread_checker_.CalledOnValidThread()); |
| 381 video_renderer_sink_->PaintFrameUsingOldRenderingPath( | 381 video_renderer_sink_->PaintSingleFrame( |
| 382 video_overlay_factory_->CreateFrame(size)); | 382 video_overlay_factory_->CreateFrame(size)); |
| 383 client_->OnVideoNaturalSizeChange(size); | 383 client_->OnVideoNaturalSizeChange(size); |
| 384 } | 384 } |
| 385 | 385 |
| 386 void CmaRenderer::OnPlaybackTimeUpdated(base::TimeDelta time, | 386 void CmaRenderer::OnPlaybackTimeUpdated(base::TimeDelta time, |
| 387 base::TimeDelta max_time, | 387 base::TimeDelta max_time, |
| 388 base::TimeTicks capture_time) { | 388 base::TimeTicks capture_time) { |
| 389 DCHECK(thread_checker_.CalledOnValidThread()); | 389 DCHECK(thread_checker_.CalledOnValidThread()); |
| 390 if (state_ != kPlaying) { | 390 if (state_ != kPlaying) { |
| 391 LOG(WARNING) << "Ignoring a late time update"; | 391 LOG(WARNING) << "Ignoring a late time update"; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 is_pending_transition_ = true; | 450 is_pending_transition_ = true; |
| 451 } | 451 } |
| 452 | 452 |
| 453 void CmaRenderer::CompleteStateTransition(State new_state) { | 453 void CmaRenderer::CompleteStateTransition(State new_state) { |
| 454 state_ = new_state; | 454 state_ = new_state; |
| 455 is_pending_transition_ = false; | 455 is_pending_transition_ = false; |
| 456 } | 456 } |
| 457 | 457 |
| 458 } // namespace media | 458 } // namespace media |
| 459 } // namespace chromecast | 459 } // namespace chromecast |
| OLD | NEW |