| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base/pipeline.h" | 5 #include "media/base/pipeline.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 if (state_ != kPlaying) | 642 if (state_ != kPlaying) |
| 643 return; | 643 return; |
| 644 | 644 |
| 645 { | 645 { |
| 646 base::AutoLock auto_lock(lock_); | 646 base::AutoLock auto_lock(lock_); |
| 647 interpolator_->SetPlaybackRate(playback_rate); | 647 interpolator_->SetPlaybackRate(playback_rate); |
| 648 } | 648 } |
| 649 | 649 |
| 650 if (audio_renderer_) | 650 if (audio_renderer_) |
| 651 audio_renderer_->SetPlaybackRate(playback_rate_); | 651 audio_renderer_->SetPlaybackRate(playback_rate_); |
| 652 if (video_renderer_) | |
| 653 video_renderer_->SetPlaybackRate(playback_rate_); | |
| 654 } | 652 } |
| 655 | 653 |
| 656 void Pipeline::VolumeChangedTask(float volume) { | 654 void Pipeline::VolumeChangedTask(float volume) { |
| 657 DCHECK(task_runner_->BelongsToCurrentThread()); | 655 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 658 | 656 |
| 659 // Volume changes are only carried out while playing. | 657 // Volume changes are only carried out while playing. |
| 660 if (state_ != kPlaying) | 658 if (state_ != kPlaying) |
| 661 return; | 659 return; |
| 662 | 660 |
| 663 if (audio_renderer_) | 661 if (audio_renderer_) |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { | 908 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { |
| 911 lock_.AssertAcquired(); | 909 lock_.AssertAcquired(); |
| 912 if (interpolation_state_ != INTERPOLATION_WAITING_FOR_AUDIO_TIME_UPDATE) | 910 if (interpolation_state_ != INTERPOLATION_WAITING_FOR_AUDIO_TIME_UPDATE) |
| 913 return; | 911 return; |
| 914 | 912 |
| 915 interpolation_state_ = INTERPOLATION_STARTED; | 913 interpolation_state_ = INTERPOLATION_STARTED; |
| 916 interpolator_->StartInterpolating(); | 914 interpolator_->StartInterpolating(); |
| 917 } | 915 } |
| 918 | 916 |
| 919 } // namespace media | 917 } // namespace media |
| OLD | NEW |