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

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

Issue 2387293007: Register MediaPlayerRenderer service (Closed)
Patch Set: Typo. Created 4 years, 2 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
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/mojo/clients/mojo_renderer_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 290
291 // TODO(tim): Should we plumb error code from remote renderer? 291 // TODO(tim): Should we plumb error code from remote renderer?
292 // http://crbug.com/410451. 292 // http://crbug.com/410451.
293 client_->OnError(PIPELINE_ERROR_DECODE); 293 client_->OnError(PIPELINE_ERROR_DECODE);
294 } 294 }
295 295
296 void MojoRenderer::OnVideoNaturalSizeChange(const gfx::Size& size) { 296 void MojoRenderer::OnVideoNaturalSizeChange(const gfx::Size& size) {
297 DVLOG(2) << __FUNCTION__ << ": " << size.ToString(); 297 DVLOG(2) << __FUNCTION__ << ": " << size.ToString();
298 DCHECK(task_runner_->BelongsToCurrentThread()); 298 DCHECK(task_runner_->BelongsToCurrentThread());
299 299
300 video_renderer_sink_->PaintSingleFrame( 300 if (video_overlay_factory_) {
301 video_overlay_factory_->CreateFrame(size)); 301 video_renderer_sink_->PaintSingleFrame(
302 video_overlay_factory_->CreateFrame(size));
303 }
302 client_->OnVideoNaturalSizeChange(size); 304 client_->OnVideoNaturalSizeChange(size);
303 } 305 }
304 306
305 void MojoRenderer::OnDurationChange(base::TimeDelta duration) { 307 void MojoRenderer::OnDurationChange(base::TimeDelta duration) {
306 DVLOG(2) << __FUNCTION__ << ": duration" << duration; 308 DVLOG(2) << __FUNCTION__ << ": duration" << duration;
307 client_->OnDurationChange(duration); 309 client_->OnDurationChange(duration);
308 } 310 }
309 311
310 void MojoRenderer::OnVideoOpacityChange(bool opaque) { 312 void MojoRenderer::OnVideoOpacityChange(bool opaque) {
311 DVLOG(2) << __FUNCTION__ << ": " << opaque; 313 DVLOG(2) << __FUNCTION__ << ": " << opaque;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED); 410 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED);
409 411
410 if (!flush_cb_.is_null()) 412 if (!flush_cb_.is_null())
411 base::ResetAndReturn(&flush_cb_).Run(); 413 base::ResetAndReturn(&flush_cb_).Run();
412 414
413 if (!cdm_attached_cb_.is_null()) 415 if (!cdm_attached_cb_.is_null())
414 base::ResetAndReturn(&cdm_attached_cb_).Run(false); 416 base::ResetAndReturn(&cdm_attached_cb_).Run(false);
415 } 417 }
416 418
417 } // namespace media 419 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/mojo/clients/mojo_renderer_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698