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

Side by Side Diff: chromecast/renderer/media/cma_renderer.cc

Issue 1972783003: Disable idle suspend for Chromecast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted all content/ changes, API now in Renderer Created 4 years, 7 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 "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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698