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/media/cma/pipeline/media_pipeline_impl.h" | 5 #include "chromecast/media/cma/pipeline/media_pipeline_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 | 106 |
107 void MediaPipelineImpl::SetCdm(int cdm_id) { | 107 void MediaPipelineImpl::SetCdm(int cdm_id) { |
108 CMALOG(kLogControl) << __FUNCTION__ << " cdm_id=" << cdm_id; | 108 CMALOG(kLogControl) << __FUNCTION__ << " cdm_id=" << cdm_id; |
109 DCHECK(thread_checker_.CalledOnValidThread()); | 109 DCHECK(thread_checker_.CalledOnValidThread()); |
110 NOTIMPLEMENTED(); | 110 NOTIMPLEMENTED(); |
111 // TODO(gunsch): SetCdm(int) is not implemented. | 111 // TODO(gunsch): SetCdm(int) is not implemented. |
112 // One possibility would be a GetCdmByIdCB that's passed in. | 112 // One possibility would be a GetCdmByIdCB that's passed in. |
113 } | 113 } |
114 | 114 |
115 void MediaPipelineImpl::SetCdm(::media::BrowserCdm* media_keys) { | 115 void MediaPipelineImpl::SetCdm(::media::BrowserCdm* media_keys) { |
116 DCHECK(thread_checker_.CalledOnValidThread()); | |
erickung1
2015/02/07 01:31:10
Very NIT: may switch line with CMALOG to follow ot
gunsch
2015/02/07 01:44:27
Done.
| |
116 CMALOG(kLogControl) << __FUNCTION__; | 117 CMALOG(kLogControl) << __FUNCTION__; |
117 audio_pipeline_->SetCdm(static_cast<BrowserCdmCast*>(media_keys)); | 118 audio_pipeline_->SetCdm(static_cast<BrowserCdmCast*>(media_keys)); |
118 video_pipeline_->SetCdm(static_cast<BrowserCdmCast*>(media_keys)); | 119 video_pipeline_->SetCdm(static_cast<BrowserCdmCast*>(media_keys)); |
119 } | 120 } |
120 | 121 |
121 AudioPipeline* MediaPipelineImpl::GetAudioPipeline() const { | 122 AudioPipeline* MediaPipelineImpl::GetAudioPipeline() const { |
122 return audio_pipeline_.get(); | 123 return audio_pipeline_.get(); |
123 } | 124 } |
124 | 125 |
125 VideoPipeline* MediaPipelineImpl::GetVideoPipeline() const { | 126 VideoPipeline* MediaPipelineImpl::GetVideoPipeline() const { |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
363 | 364 |
364 void MediaPipelineImpl::OnError(::media::PipelineStatus error) { | 365 void MediaPipelineImpl::OnError(::media::PipelineStatus error) { |
365 DCHECK(thread_checker_.CalledOnValidThread()); | 366 DCHECK(thread_checker_.CalledOnValidThread()); |
366 DCHECK_NE(error, ::media::PIPELINE_OK) << "PIPELINE_OK is not an error!"; | 367 DCHECK_NE(error, ::media::PIPELINE_OK) << "PIPELINE_OK is not an error!"; |
367 if (!client_.error_cb.is_null()) | 368 if (!client_.error_cb.is_null()) |
368 client_.error_cb.Run(error); | 369 client_.error_cb.Run(error); |
369 } | 370 } |
370 | 371 |
371 } // namespace media | 372 } // namespace media |
372 } // namespace chromecast | 373 } // namespace chromecast |
OLD | NEW |