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

Side by Side Diff: media/mojo/clients/mojo_renderer.cc

Issue 2243683002: Add OnDurationChange() to RenderClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_player_simplified
Patch Set: Created 4 years, 4 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 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 "media/mojo/clients/mojo_renderer.h" 5 #include "media/mojo/clients/mojo_renderer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 267
268 void MojoRenderer::OnVideoNaturalSizeChange(const gfx::Size& size) { 268 void MojoRenderer::OnVideoNaturalSizeChange(const gfx::Size& size) {
269 DVLOG(2) << __FUNCTION__ << ": " << size.ToString(); 269 DVLOG(2) << __FUNCTION__ << ": " << size.ToString();
270 DCHECK(task_runner_->BelongsToCurrentThread()); 270 DCHECK(task_runner_->BelongsToCurrentThread());
271 271
272 video_renderer_sink_->PaintSingleFrame( 272 video_renderer_sink_->PaintSingleFrame(
273 video_overlay_factory_->CreateFrame(size)); 273 video_overlay_factory_->CreateFrame(size));
274 client_->OnVideoNaturalSizeChange(size); 274 client_->OnVideoNaturalSizeChange(size);
275 } 275 }
276 276
277 void MojoRenderer::OnDurationChange(int64_t duration_usec) {
278 DVLOG(2) << __FUNCTION__ << ": duration" << duration_usec;
279 client_->OnDurationChange(base::TimeDelta::FromMicroseconds(duration_usec));
280 }
281
277 void MojoRenderer::OnVideoOpacityChange(bool opaque) { 282 void MojoRenderer::OnVideoOpacityChange(bool opaque) {
278 DVLOG(2) << __FUNCTION__ << ": " << opaque; 283 DVLOG(2) << __FUNCTION__ << ": " << opaque;
279 DCHECK(task_runner_->BelongsToCurrentThread()); 284 DCHECK(task_runner_->BelongsToCurrentThread());
280 client_->OnVideoOpacityChange(opaque); 285 client_->OnVideoOpacityChange(opaque);
281 } 286 }
282 287
283 void MojoRenderer::OnStatisticsUpdate(const PipelineStatistics& stats) { 288 void MojoRenderer::OnStatisticsUpdate(const PipelineStatistics& stats) {
284 DVLOG(3) << __FUNCTION__; 289 DVLOG(3) << __FUNCTION__;
285 DCHECK(task_runner_->BelongsToCurrentThread()); 290 DCHECK(task_runner_->BelongsToCurrentThread());
286 client_->OnStatisticsUpdate(stats); 291 client_->OnStatisticsUpdate(stats);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED); 380 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED);
376 381
377 if (!flush_cb_.is_null()) 382 if (!flush_cb_.is_null())
378 base::ResetAndReturn(&flush_cb_).Run(); 383 base::ResetAndReturn(&flush_cb_).Run();
379 384
380 if (!cdm_attached_cb_.is_null()) 385 if (!cdm_attached_cb_.is_null())
381 base::ResetAndReturn(&cdm_attached_cb_).Run(false); 386 base::ResetAndReturn(&cdm_attached_cb_).Run(false);
382 } 387 }
383 388
384 } // namespace media 389 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698