| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/service/cast_renderer.h" | 5 #include "chromecast/media/service/cast_renderer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "chromecast/base/task_runner_impl.h" | 9 #include "chromecast/base/task_runner_impl.h" |
| 10 #include "chromecast/media/base/audio_device_ids.h" | 10 #include "chromecast/media/base/audio_device_ids.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 // Force compositor to treat video as opaque (needed for overlay codepath). | 213 // Force compositor to treat video as opaque (needed for overlay codepath). |
| 214 OnVideoOpacityChange(true); | 214 OnVideoOpacityChange(true); |
| 215 } | 215 } |
| 216 } | 216 } |
| 217 | 217 |
| 218 void CastRenderer::SetCdm(::media::CdmContext* cdm_context, | 218 void CastRenderer::SetCdm(::media::CdmContext* cdm_context, |
| 219 const ::media::CdmAttachedCB& cdm_attached_cb) { | 219 const ::media::CdmAttachedCB& cdm_attached_cb) { |
| 220 DCHECK(task_runner_->BelongsToCurrentThread()); | 220 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 221 DCHECK(cdm_context); | 221 DCHECK(cdm_context); |
| 222 | 222 |
| 223 auto cast_cdm_context = static_cast<CastCdmContext*>(cdm_context); | 223 auto* cast_cdm_context = static_cast<CastCdmContext*>(cdm_context); |
| 224 | 224 |
| 225 if (!pipeline_) { | 225 if (!pipeline_) { |
| 226 // If the pipeline has not yet been created in Initialize(), cache | 226 // If the pipeline has not yet been created in Initialize(), cache |
| 227 // |cast_cdm_context| and pass it in when Initialize() is called. | 227 // |cast_cdm_context| and pass it in when Initialize() is called. |
| 228 cast_cdm_context_ = cast_cdm_context; | 228 cast_cdm_context_ = cast_cdm_context; |
| 229 } else { | 229 } else { |
| 230 pipeline_->SetCdm(cast_cdm_context); | 230 pipeline_->SetCdm(cast_cdm_context); |
| 231 } | 231 } |
| 232 | 232 |
| 233 cdm_attached_cb.Run(true); | 233 cdm_attached_cb.Run(true); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 } | 314 } |
| 315 | 315 |
| 316 void CastRenderer::OnVideoOpacityChange(bool opaque) { | 316 void CastRenderer::OnVideoOpacityChange(bool opaque) { |
| 317 DCHECK(task_runner_->BelongsToCurrentThread()); | 317 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 318 DCHECK(opaque); | 318 DCHECK(opaque); |
| 319 client_->OnVideoOpacityChange(opaque); | 319 client_->OnVideoOpacityChange(opaque); |
| 320 } | 320 } |
| 321 | 321 |
| 322 } // namespace media | 322 } // namespace media |
| 323 } // namespace chromecast | 323 } // namespace chromecast |
| OLD | NEW |