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

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

Issue 2282633002: Integrate Surface requests with MediaPlayerRenderer (Closed)
Patch Set: Addressed last comments 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/mojo/clients/mojo_renderer.h ('k') | media/mojo/clients/mojo_renderer_unittest.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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 DCHECK(task_runner_->BelongsToCurrentThread()); 267 DCHECK(task_runner_->BelongsToCurrentThread());
268 client_->OnBufferingStateChange(static_cast<media::BufferingState>(state)); 268 client_->OnBufferingStateChange(static_cast<media::BufferingState>(state));
269 } 269 }
270 270
271 void MojoRenderer::OnEnded() { 271 void MojoRenderer::OnEnded() {
272 DVLOG(1) << __FUNCTION__; 272 DVLOG(1) << __FUNCTION__;
273 DCHECK(task_runner_->BelongsToCurrentThread()); 273 DCHECK(task_runner_->BelongsToCurrentThread());
274 client_->OnEnded(); 274 client_->OnEnded();
275 } 275 }
276 276
277 void MojoRenderer::InitiateScopedSurfaceRequest(
278 const ReceiveSurfaceRequestTokenCB& receive_request_token_cb) {
279 DVLOG(1) << __FUNCTION__;
280
281 remote_renderer_->InitiateScopedSurfaceRequest(receive_request_token_cb);
282 }
283
277 void MojoRenderer::OnError() { 284 void MojoRenderer::OnError() {
278 DVLOG(1) << __FUNCTION__; 285 DVLOG(1) << __FUNCTION__;
279 DCHECK(task_runner_->BelongsToCurrentThread()); 286 DCHECK(task_runner_->BelongsToCurrentThread());
280 DCHECK(init_cb_.is_null()); 287 DCHECK(init_cb_.is_null());
281 288
282 encountered_error_ = true; 289 encountered_error_ = true;
283 290
284 // TODO(tim): Should we plumb error code from remote renderer? 291 // TODO(tim): Should we plumb error code from remote renderer?
285 // http://crbug.com/410451. 292 // http://crbug.com/410451.
286 client_->OnError(PIPELINE_ERROR_DECODE); 293 client_->OnError(PIPELINE_ERROR_DECODE);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED); 408 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED);
402 409
403 if (!flush_cb_.is_null()) 410 if (!flush_cb_.is_null())
404 base::ResetAndReturn(&flush_cb_).Run(); 411 base::ResetAndReturn(&flush_cb_).Run();
405 412
406 if (!cdm_attached_cb_.is_null()) 413 if (!cdm_attached_cb_.is_null())
407 base::ResetAndReturn(&cdm_attached_cb_).Run(false); 414 base::ResetAndReturn(&cdm_attached_cb_).Run(false);
408 } 415 }
409 416
410 } // namespace media 417 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/clients/mojo_renderer.h ('k') | media/mojo/clients/mojo_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698