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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 } | 395 } |
396 } | 396 } |
397 | 397 |
398 base::ResetAndReturn(&seek_cb_).Run(PIPELINE_OK); | 398 base::ResetAndReturn(&seek_cb_).Run(PIPELINE_OK); |
399 | 399 |
400 { | 400 { |
401 base::AutoLock auto_lock(lock_); | 401 base::AutoLock auto_lock(lock_); |
402 interpolator_->SetBounds(start_timestamp_, start_timestamp_); | 402 interpolator_->SetBounds(start_timestamp_, start_timestamp_); |
403 } | 403 } |
404 | 404 |
405 if (audio_renderer_) | 405 if (audio_renderer_) { |
406 audio_renderer_->StartPlayingFrom(start_timestamp_); | 406 audio_renderer_->SetMediaTime(start_timestamp_); |
| 407 audio_renderer_->StartPlaying(); |
| 408 } |
407 if (video_renderer_) | 409 if (video_renderer_) |
408 video_renderer_->StartPlayingFrom(start_timestamp_); | 410 video_renderer_->StartPlaying(); |
409 if (text_renderer_) | 411 if (text_renderer_) |
410 text_renderer_->StartPlaying(); | 412 text_renderer_->StartPlaying(); |
411 | 413 |
412 PlaybackRateChangedTask(GetPlaybackRate()); | 414 PlaybackRateChangedTask(GetPlaybackRate()); |
413 VolumeChangedTask(GetVolume()); | 415 VolumeChangedTask(GetVolume()); |
414 return; | 416 return; |
415 | 417 |
416 case kStopping: | 418 case kStopping: |
417 case kStopped: | 419 case kStopped: |
418 case kCreated: | 420 case kCreated: |
(...skipping 489 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 |