| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 DCHECK(task_runner_->BelongsToCurrentThread()); | 136 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 137 DCHECK_EQ(state_, STATE_UNINITIALIZED); | 137 DCHECK_EQ(state_, STATE_UNINITIALIZED); |
| 138 DCHECK(!init_cb.is_null()); | 138 DCHECK(!init_cb.is_null()); |
| 139 DCHECK(client); | 139 DCHECK(client); |
| 140 | 140 |
| 141 client_ = client; | 141 client_ = client; |
| 142 media_resource_ = media_resource; | 142 media_resource_ = media_resource; |
| 143 init_cb_ = init_cb; | 143 init_cb_ = init_cb; |
| 144 | 144 |
| 145 if (HasEncryptedStream() && !cdm_context_) { | 145 if (HasEncryptedStream() && !cdm_context_) { |
| 146 DVLOG(1) << __func__ << ": Has encrypted stream but CDM is not set."; |
| 146 state_ = STATE_INIT_PENDING_CDM; | 147 state_ = STATE_INIT_PENDING_CDM; |
| 147 return; | 148 return; |
| 148 } | 149 } |
| 149 | 150 |
| 150 state_ = STATE_INITIALIZING; | 151 state_ = STATE_INITIALIZING; |
| 151 InitializeAudioRenderer(); | 152 InitializeAudioRenderer(); |
| 152 } | 153 } |
| 153 | 154 |
| 154 void RendererImpl::SetCdm(CdmContext* cdm_context, | 155 void RendererImpl::SetCdm(CdmContext* cdm_context, |
| 155 const CdmAttachedCB& cdm_attached_cb) { | 156 const CdmAttachedCB& cdm_attached_cb) { |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 DCHECK(task_runner_->BelongsToCurrentThread()); | 846 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 846 client_->OnVideoNaturalSizeChange(size); | 847 client_->OnVideoNaturalSizeChange(size); |
| 847 } | 848 } |
| 848 | 849 |
| 849 void RendererImpl::OnVideoOpacityChange(bool opaque) { | 850 void RendererImpl::OnVideoOpacityChange(bool opaque) { |
| 850 DCHECK(task_runner_->BelongsToCurrentThread()); | 851 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 851 client_->OnVideoOpacityChange(opaque); | 852 client_->OnVideoOpacityChange(opaque); |
| 852 } | 853 } |
| 853 | 854 |
| 854 } // namespace media | 855 } // namespace media |
| OLD | NEW |