| 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 #ifndef MEDIA_BASE_PIPELINE_H_ | 5 #ifndef MEDIA_BASE_PIPELINE_H_ |
| 6 #define MEDIA_BASE_PIPELINE_H_ | 6 #define MEDIA_BASE_PIPELINE_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // channels proportionately for multi-channel audio streams. | 163 // channels proportionately for multi-channel audio streams. |
| 164 void SetVolume(float volume); | 164 void SetVolume(float volume); |
| 165 | 165 |
| 166 // Returns the current media playback time, which progresses from 0 until | 166 // Returns the current media playback time, which progresses from 0 until |
| 167 // GetMediaDuration(). | 167 // GetMediaDuration(). |
| 168 base::TimeDelta GetMediaTime() const; | 168 base::TimeDelta GetMediaTime() const; |
| 169 | 169 |
| 170 // Get approximate time ranges of buffered media. | 170 // Get approximate time ranges of buffered media. |
| 171 Ranges<base::TimeDelta> GetBufferedTimeRanges() const; | 171 Ranges<base::TimeDelta> GetBufferedTimeRanges() const; |
| 172 | 172 |
| 173 // Get the start time of the media, or zero if not known. |
| 174 base::TimeDelta GetMediaStartTime() const; |
| 175 |
| 173 // Get the duration of the media in microseconds. If the duration has not | 176 // Get the duration of the media in microseconds. If the duration has not |
| 174 // been determined yet, then returns 0. | 177 // been determined yet, then returns 0. |
| 175 base::TimeDelta GetMediaDuration() const; | 178 base::TimeDelta GetMediaDuration() const; |
| 176 | 179 |
| 177 // Return true if loading progress has been made since the last time this | 180 // Return true if loading progress has been made since the last time this |
| 178 // method was called. | 181 // method was called. |
| 179 bool DidLoadingProgress(); | 182 bool DidLoadingProgress(); |
| 180 | 183 |
| 181 // Gets the current pipeline statistics. | 184 // Gets the current pipeline statistics. |
| 182 PipelineStatistics GetStatistics() const; | 185 PipelineStatistics GetStatistics() const; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 385 |
| 383 // NOTE: Weak pointers must be invalidated before all other member variables. | 386 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 384 base::WeakPtrFactory<Pipeline> weak_factory_; | 387 base::WeakPtrFactory<Pipeline> weak_factory_; |
| 385 | 388 |
| 386 DISALLOW_COPY_AND_ASSIGN(Pipeline); | 389 DISALLOW_COPY_AND_ASSIGN(Pipeline); |
| 387 }; | 390 }; |
| 388 | 391 |
| 389 } // namespace media | 392 } // namespace media |
| 390 | 393 |
| 391 #endif // MEDIA_BASE_PIPELINE_H_ | 394 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |