| 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 "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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 base::TimeDelta max_time, | 255 base::TimeDelta max_time, |
| 256 base::TimeTicks capture_time) { | 256 base::TimeTicks capture_time) { |
| 257 DVLOG(4) << __FUNCTION__ << "(" << time << ", " << max_time << ", " | 257 DVLOG(4) << __FUNCTION__ << "(" << time << ", " << max_time << ", " |
| 258 << capture_time << ")"; | 258 << capture_time << ")"; |
| 259 DCHECK(task_runner_->BelongsToCurrentThread()); | 259 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 260 | 260 |
| 261 base::AutoLock auto_lock(lock_); | 261 base::AutoLock auto_lock(lock_); |
| 262 media_time_interpolator_.SetBounds(time, max_time, capture_time); | 262 media_time_interpolator_.SetBounds(time, max_time, capture_time); |
| 263 } | 263 } |
| 264 | 264 |
| 265 void MojoRenderer::OnBufferingStateChange(mojom::BufferingState state) { | 265 void MojoRenderer::OnBufferingStateChange(BufferingState state) { |
| 266 DVLOG(2) << __FUNCTION__; | 266 DVLOG(2) << __FUNCTION__; |
| 267 DCHECK(task_runner_->BelongsToCurrentThread()); | 267 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 268 client_->OnBufferingStateChange(static_cast<media::BufferingState>(state)); | 268 client_->OnBufferingStateChange(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( | 277 void MojoRenderer::InitiateScopedSurfaceRequest( |
| 278 const ReceiveSurfaceRequestTokenCB& receive_request_token_cb) { | 278 const ReceiveSurfaceRequestTokenCB& receive_request_token_cb) { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED); | 408 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED); |
| 409 | 409 |
| 410 if (!flush_cb_.is_null()) | 410 if (!flush_cb_.is_null()) |
| 411 base::ResetAndReturn(&flush_cb_).Run(); | 411 base::ResetAndReturn(&flush_cb_).Run(); |
| 412 | 412 |
| 413 if (!cdm_attached_cb_.is_null()) | 413 if (!cdm_attached_cb_.is_null()) |
| 414 base::ResetAndReturn(&cdm_attached_cb_).Run(false); | 414 base::ResetAndReturn(&cdm_attached_cb_).Run(false); |
| 415 } | 415 } |
| 416 | 416 |
| 417 } // namespace media | 417 } // namespace media |
| OLD | NEW |