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

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

Issue 2282633002: Integrate Surface requests with MediaPlayerRenderer (Closed)
Patch Set: Fixed MojoRenderService constructor Created 4 years, 3 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 DCHECK(task_runner_->BelongsToCurrentThread()); 247 DCHECK(task_runner_->BelongsToCurrentThread());
248 client_->OnBufferingStateChange(static_cast<media::BufferingState>(state)); 248 client_->OnBufferingStateChange(static_cast<media::BufferingState>(state));
249 } 249 }
250 250
251 void MojoRenderer::OnEnded() { 251 void MojoRenderer::OnEnded() {
252 DVLOG(1) << __FUNCTION__; 252 DVLOG(1) << __FUNCTION__;
253 DCHECK(task_runner_->BelongsToCurrentThread()); 253 DCHECK(task_runner_->BelongsToCurrentThread());
254 client_->OnEnded(); 254 client_->OnEnded();
255 } 255 }
256 256
257 void MojoRenderer::InitiateScopedSurfaceRequest(
258 ReceiveSurfaceRequestTokenCB receive_request_token_cb) {
259 DVLOG(1) << __FUNCTION__;
260
261 remote_renderer_->InitiateScopedSurfaceRequest(receive_request_token_cb);
262 }
263
257 void MojoRenderer::OnError() { 264 void MojoRenderer::OnError() {
258 DVLOG(1) << __FUNCTION__; 265 DVLOG(1) << __FUNCTION__;
259 DCHECK(task_runner_->BelongsToCurrentThread()); 266 DCHECK(task_runner_->BelongsToCurrentThread());
260 DCHECK(init_cb_.is_null()); 267 DCHECK(init_cb_.is_null());
261 268
262 encountered_error_ = true; 269 encountered_error_ = true;
263 270
264 // TODO(tim): Should we plumb error code from remote renderer? 271 // TODO(tim): Should we plumb error code from remote renderer?
265 // http://crbug.com/410451. 272 // http://crbug.com/410451.
266 client_->OnError(PIPELINE_ERROR_DECODE); 273 client_->OnError(PIPELINE_ERROR_DECODE);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED); 388 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED);
382 389
383 if (!flush_cb_.is_null()) 390 if (!flush_cb_.is_null())
384 base::ResetAndReturn(&flush_cb_).Run(); 391 base::ResetAndReturn(&flush_cb_).Run();
385 392
386 if (!cdm_attached_cb_.is_null()) 393 if (!cdm_attached_cb_.is_null())
387 base::ResetAndReturn(&cdm_attached_cb_).Run(false); 394 base::ResetAndReturn(&cdm_attached_cb_).Run(false);
388 } 395 }
389 396
390 } // namespace media 397 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698