| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 Ranges<TimeDelta> Pipeline::GetBufferedTimeRanges() { | 160 Ranges<TimeDelta> Pipeline::GetBufferedTimeRanges() { |
| 161 base::AutoLock auto_lock(lock_); | 161 base::AutoLock auto_lock(lock_); |
| 162 return buffered_time_ranges_; | 162 return buffered_time_ranges_; |
| 163 } | 163 } |
| 164 | 164 |
| 165 TimeDelta Pipeline::GetMediaDuration() const { | 165 TimeDelta Pipeline::GetMediaDuration() const { |
| 166 base::AutoLock auto_lock(lock_); | 166 base::AutoLock auto_lock(lock_); |
| 167 return clock_->Duration(); | 167 return clock_->Duration(); |
| 168 } | 168 } |
| 169 | 169 |
| 170 bool Pipeline::DidLoadingProgress() const { | 170 bool Pipeline::DidLoadingProgress() { |
| 171 base::AutoLock auto_lock(lock_); | 171 base::AutoLock auto_lock(lock_); |
| 172 bool ret = did_loading_progress_; | 172 bool ret = did_loading_progress_; |
| 173 did_loading_progress_ = false; | 173 did_loading_progress_ = false; |
| 174 return ret; | 174 return ret; |
| 175 } | 175 } |
| 176 | 176 |
| 177 PipelineStatistics Pipeline::GetStatistics() const { | 177 PipelineStatistics Pipeline::GetStatistics() const { |
| 178 base::AutoLock auto_lock(lock_); | 178 base::AutoLock auto_lock(lock_); |
| 179 return statistics_; | 179 return statistics_; |
| 180 } | 180 } |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { | 902 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { |
| 903 lock_.AssertAcquired(); | 903 lock_.AssertAcquired(); |
| 904 if (!waiting_for_clock_update_) | 904 if (!waiting_for_clock_update_) |
| 905 return; | 905 return; |
| 906 | 906 |
| 907 waiting_for_clock_update_ = false; | 907 waiting_for_clock_update_ = false; |
| 908 clock_->Play(); | 908 clock_->Play(); |
| 909 } | 909 } |
| 910 | 910 |
| 911 } // namespace media | 911 } // namespace media |
| OLD | NEW |