| 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/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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 received_audio_eos_ = false; | 165 received_audio_eos_ = false; |
| 166 received_video_eos_ = false; | 166 received_video_eos_ = false; |
| 167 | 167 |
| 168 DCHECK_EQ(state_, kFlushed) << state_; | 168 DCHECK_EQ(state_, kFlushed) << state_; |
| 169 // Immediately update transition to playing. | 169 // Immediately update transition to playing. |
| 170 // Error case will be handled on response from host. | 170 // Error case will be handled on response from host. |
| 171 media_pipeline_->StartPlayingFrom(time); | 171 media_pipeline_->StartPlayingFrom(time); |
| 172 CompleteStateTransition(kPlaying); | 172 CompleteStateTransition(kPlaying); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void CmaRenderer::RestartStreamPlayback(::media::DemuxerStream* stream, |
| 176 base::TimeDelta time) { |
| 177 NOTIMPLEMENTED(); |
| 178 } |
| 179 |
| 175 void CmaRenderer::SetPlaybackRate(double playback_rate) { | 180 void CmaRenderer::SetPlaybackRate(double playback_rate) { |
| 176 CMALOG(kLogControl) << __FUNCTION__ << ": " << playback_rate; | 181 CMALOG(kLogControl) << __FUNCTION__ << ": " << playback_rate; |
| 177 DCHECK(thread_checker_.CalledOnValidThread()); | 182 DCHECK(thread_checker_.CalledOnValidThread()); |
| 178 media_pipeline_->SetPlaybackRate(playback_rate); | 183 media_pipeline_->SetPlaybackRate(playback_rate); |
| 179 playback_rate_ = playback_rate; | 184 playback_rate_ = playback_rate; |
| 180 | 185 |
| 181 { | 186 { |
| 182 base::AutoLock auto_lock(time_interpolator_lock_); | 187 base::AutoLock auto_lock(time_interpolator_lock_); |
| 183 time_interpolator_->SetPlaybackRate(playback_rate); | 188 time_interpolator_->SetPlaybackRate(playback_rate); |
| 184 } | 189 } |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 is_pending_transition_ = true; | 455 is_pending_transition_ = true; |
| 451 } | 456 } |
| 452 | 457 |
| 453 void CmaRenderer::CompleteStateTransition(State new_state) { | 458 void CmaRenderer::CompleteStateTransition(State new_state) { |
| 454 state_ = new_state; | 459 state_ = new_state; |
| 455 is_pending_transition_ = false; | 460 is_pending_transition_ = false; |
| 456 } | 461 } |
| 457 | 462 |
| 458 } // namespace media | 463 } // namespace media |
| 459 } // namespace chromecast | 464 } // namespace chromecast |
| OLD | NEW |