| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 buffering_controller_.reset(new BufferingController( | 136 buffering_controller_.reset(new BufferingController( |
| 137 buffering_config, | 137 buffering_config, |
| 138 base::Bind(&MediaPipelineImpl::OnBufferingNotification, weak_this_))); | 138 base::Bind(&MediaPipelineImpl::OnBufferingNotification, weak_this_))); |
| 139 } | 139 } |
| 140 } | 140 } |
| 141 | 141 |
| 142 void MediaPipelineImpl::SetClient(const MediaPipelineClient& client) { | 142 void MediaPipelineImpl::SetClient(const MediaPipelineClient& client) { |
| 143 DCHECK(thread_checker_.CalledOnValidThread()); | 143 DCHECK(thread_checker_.CalledOnValidThread()); |
| 144 DCHECK(!client.error_cb.is_null()); | 144 DCHECK(!client.error_cb.is_null()); |
| 145 DCHECK(!client.buffering_state_cb.is_null()); | 145 DCHECK(!client.buffering_state_cb.is_null()); |
| 146 DCHECK(!client.pipeline_backend_created_cb.is_null()); | |
| 147 DCHECK(!client.pipeline_backend_destroyed_cb.is_null()); | |
| 148 client_ = client; | 146 client_ = client; |
| 149 } | 147 } |
| 150 | 148 |
| 151 void MediaPipelineImpl::SetCdm(int cdm_id) { | 149 void MediaPipelineImpl::SetCdm(int cdm_id) { |
| 152 CMALOG(kLogControl) << __FUNCTION__ << " cdm_id=" << cdm_id; | 150 CMALOG(kLogControl) << __FUNCTION__ << " cdm_id=" << cdm_id; |
| 153 DCHECK(thread_checker_.CalledOnValidThread()); | 151 DCHECK(thread_checker_.CalledOnValidThread()); |
| 154 NOTIMPLEMENTED(); | 152 NOTIMPLEMENTED(); |
| 155 // TODO(gunsch): SetCdm(int) is not implemented. | 153 // TODO(gunsch): SetCdm(int) is not implemented. |
| 156 // One possibility would be a GetCdmByIdCB that's passed in. | 154 // One possibility would be a GetCdmByIdCB that's passed in. |
| 157 } | 155 } |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 | 513 |
| 516 void MediaPipelineImpl::ResetBitrateState() { | 514 void MediaPipelineImpl::ResetBitrateState() { |
| 517 elapsed_time_delta_ = base::TimeDelta::FromSeconds(0); | 515 elapsed_time_delta_ = base::TimeDelta::FromSeconds(0); |
| 518 audio_bytes_for_bitrate_estimation_ = 0; | 516 audio_bytes_for_bitrate_estimation_ = 0; |
| 519 video_bytes_for_bitrate_estimation_ = 0; | 517 video_bytes_for_bitrate_estimation_ = 0; |
| 520 last_sample_time_ = base::TimeTicks::Now(); | 518 last_sample_time_ = base::TimeTicks::Now(); |
| 521 } | 519 } |
| 522 | 520 |
| 523 } // namespace media | 521 } // namespace media |
| 524 } // namespace chromecast | 522 } // namespace chromecast |
| OLD | NEW |