| 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/renderers/renderer_impl.h" | 5 #include "media/renderers/renderer_impl.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.h" | 10 #include "base/callback.h" |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 bool RendererImpl::HasAudio() { | 218 bool RendererImpl::HasAudio() { |
| 219 DCHECK(task_runner_->BelongsToCurrentThread()); | 219 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 220 return audio_renderer_ != NULL; | 220 return audio_renderer_ != NULL; |
| 221 } | 221 } |
| 222 | 222 |
| 223 bool RendererImpl::HasVideo() { | 223 bool RendererImpl::HasVideo() { |
| 224 DCHECK(task_runner_->BelongsToCurrentThread()); | 224 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 225 return video_renderer_ != NULL; | 225 return video_renderer_ != NULL; |
| 226 } | 226 } |
| 227 | 227 |
| 228 bool RendererImpl::AllowSuspend() { |
| 229 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 230 return true; |
| 231 } |
| 232 |
| 228 void RendererImpl::DisableUnderflowForTesting() { | 233 void RendererImpl::DisableUnderflowForTesting() { |
| 229 DVLOG(1) << __FUNCTION__; | 234 DVLOG(1) << __FUNCTION__; |
| 230 DCHECK(task_runner_->BelongsToCurrentThread()); | 235 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 231 DCHECK_EQ(state_, STATE_UNINITIALIZED); | 236 DCHECK_EQ(state_, STATE_UNINITIALIZED); |
| 232 | 237 |
| 233 underflow_disabled_for_testing_ = true; | 238 underflow_disabled_for_testing_ = true; |
| 234 } | 239 } |
| 235 | 240 |
| 236 void RendererImpl::EnableClocklessVideoPlaybackForTesting() { | 241 void RendererImpl::EnableClocklessVideoPlaybackForTesting() { |
| 237 DVLOG(1) << __FUNCTION__; | 242 DVLOG(1) << __FUNCTION__; |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 } | 665 } |
| 661 | 666 |
| 662 // After OnError() returns, the pipeline may destroy |this|. | 667 // After OnError() returns, the pipeline may destroy |this|. |
| 663 base::ResetAndReturn(&error_cb_).Run(error); | 668 base::ResetAndReturn(&error_cb_).Run(error); |
| 664 | 669 |
| 665 if (!flush_cb_.is_null()) | 670 if (!flush_cb_.is_null()) |
| 666 base::ResetAndReturn(&flush_cb_).Run(); | 671 base::ResetAndReturn(&flush_cb_).Run(); |
| 667 } | 672 } |
| 668 | 673 |
| 669 } // namespace media | 674 } // namespace media |
| OLD | NEW |