| 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_); |
| 652 } | 654 } |
| 653 | 655 |
| 654 void Pipeline::VolumeChangedTask(float volume) { | 656 void Pipeline::VolumeChangedTask(float volume) { |
| 655 DCHECK(task_runner_->BelongsToCurrentThread()); | 657 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 656 | 658 |
| 657 // Volume changes are only carried out while playing. | 659 // Volume changes are only carried out while playing. |
| 658 if (state_ != kPlaying) | 660 if (state_ != kPlaying) |
| 659 return; | 661 return; |
| 660 | 662 |
| 661 if (audio_renderer_) | 663 if (audio_renderer_) |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { | 910 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { |
| 909 lock_.AssertAcquired(); | 911 lock_.AssertAcquired(); |
| 910 if (interpolation_state_ != INTERPOLATION_WAITING_FOR_AUDIO_TIME_UPDATE) | 912 if (interpolation_state_ != INTERPOLATION_WAITING_FOR_AUDIO_TIME_UPDATE) |
| 911 return; | 913 return; |
| 912 | 914 |
| 913 interpolation_state_ = INTERPOLATION_STARTED; | 915 interpolation_state_ = INTERPOLATION_STARTED; |
| 914 interpolator_->StartInterpolating(); | 916 interpolator_->StartInterpolating(); |
| 915 } | 917 } |
| 916 | 918 |
| 917 } // namespace media | 919 } // namespace media |
| OLD | NEW |