| 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 "chromecast/renderer/media/cma_renderer.h" | 5 #include "chromecast/renderer/media/cma_renderer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 bool CmaRenderer::HasAudio() { | 224 bool CmaRenderer::HasAudio() { |
| 225 DCHECK(thread_checker_.CalledOnValidThread()); | 225 DCHECK(thread_checker_.CalledOnValidThread()); |
| 226 return has_audio_; | 226 return has_audio_; |
| 227 } | 227 } |
| 228 | 228 |
| 229 bool CmaRenderer::HasVideo() { | 229 bool CmaRenderer::HasVideo() { |
| 230 DCHECK(thread_checker_.CalledOnValidThread()); | 230 DCHECK(thread_checker_.CalledOnValidThread()); |
| 231 return has_video_; | 231 return has_video_; |
| 232 } | 232 } |
| 233 | 233 |
| 234 bool CmaRenderer::AllowSuspend() { |
| 235 DCHECK(thread_checker_.CalledOnValidThread()); |
| 236 return false; |
| 237 } |
| 238 |
| 234 void CmaRenderer::SetCdm(::media::CdmContext* cdm_context, | 239 void CmaRenderer::SetCdm(::media::CdmContext* cdm_context, |
| 235 const ::media::CdmAttachedCB& cdm_attached_cb) { | 240 const ::media::CdmAttachedCB& cdm_attached_cb) { |
| 236 DCHECK(thread_checker_.CalledOnValidThread()); | 241 DCHECK(thread_checker_.CalledOnValidThread()); |
| 237 #if defined(ENABLE_BROWSER_CDMS) | 242 #if defined(ENABLE_BROWSER_CDMS) |
| 238 media_pipeline_->SetCdm(cdm_context->GetCdmId()); | 243 media_pipeline_->SetCdm(cdm_context->GetCdmId()); |
| 239 #endif | 244 #endif |
| 240 cdm_attached_cb.Run(true); | 245 cdm_attached_cb.Run(true); |
| 241 } | 246 } |
| 242 | 247 |
| 243 void CmaRenderer::InitializeAudioPipeline() { | 248 void CmaRenderer::InitializeAudioPipeline() { |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 is_pending_transition_ = true; | 481 is_pending_transition_ = true; |
| 477 } | 482 } |
| 478 | 483 |
| 479 void CmaRenderer::CompleteStateTransition(State new_state) { | 484 void CmaRenderer::CompleteStateTransition(State new_state) { |
| 480 state_ = new_state; | 485 state_ = new_state; |
| 481 is_pending_transition_ = false; | 486 is_pending_transition_ = false; |
| 482 } | 487 } |
| 483 | 488 |
| 484 } // namespace media | 489 } // namespace media |
| 485 } // namespace chromecast | 490 } // namespace chromecast |
| OLD | NEW |