| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 // Get approximate time ranges of buffered media. | 166 // Get approximate time ranges of buffered media. |
| 167 Ranges<base::TimeDelta> GetBufferedTimeRanges(); | 167 Ranges<base::TimeDelta> GetBufferedTimeRanges(); |
| 168 | 168 |
| 169 // Get the duration of the media in microseconds. If the duration has not | 169 // Get the duration of the media in microseconds. If the duration has not |
| 170 // been determined yet, then returns 0. | 170 // been determined yet, then returns 0. |
| 171 base::TimeDelta GetMediaDuration() const; | 171 base::TimeDelta GetMediaDuration() const; |
| 172 | 172 |
| 173 // Return true if loading progress has been made since the last time this | 173 // Return true if loading progress has been made since the last time this |
| 174 // method was called. | 174 // method was called. |
| 175 bool DidLoadingProgress() const; | 175 bool DidLoadingProgress(); |
| 176 | 176 |
| 177 // Gets the current pipeline statistics. | 177 // Gets the current pipeline statistics. |
| 178 PipelineStatistics GetStatistics() const; | 178 PipelineStatistics GetStatistics() const; |
| 179 | 179 |
| 180 void SetClockForTesting(Clock* clock); | 180 void SetClockForTesting(Clock* clock); |
| 181 void SetErrorForTesting(PipelineStatus status); | 181 void SetErrorForTesting(PipelineStatus status); |
| 182 | 182 |
| 183 private: | 183 private: |
| 184 FRIEND_TEST_ALL_PREFIXES(PipelineTest, GetBufferedTimeRanges); | 184 FRIEND_TEST_ALL_PREFIXES(PipelineTest, GetBufferedTimeRanges); |
| 185 FRIEND_TEST_ALL_PREFIXES(PipelineTest, EndedCallback); | 185 FRIEND_TEST_ALL_PREFIXES(PipelineTest, EndedCallback); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 mutable base::Lock lock_; | 328 mutable base::Lock lock_; |
| 329 | 329 |
| 330 // Whether or not the pipeline is running. | 330 // Whether or not the pipeline is running. |
| 331 bool running_; | 331 bool running_; |
| 332 | 332 |
| 333 // Amount of available buffered data as reported by |demuxer_|. | 333 // Amount of available buffered data as reported by |demuxer_|. |
| 334 Ranges<base::TimeDelta> buffered_time_ranges_; | 334 Ranges<base::TimeDelta> buffered_time_ranges_; |
| 335 | 335 |
| 336 // True when AddBufferedTimeRange() has been called more recently than | 336 // True when AddBufferedTimeRange() has been called more recently than |
| 337 // DidLoadingProgress(). | 337 // DidLoadingProgress(). |
| 338 mutable bool did_loading_progress_; | 338 bool did_loading_progress_; |
| 339 | 339 |
| 340 // Current volume level (from 0.0f to 1.0f). This value is set immediately | 340 // Current volume level (from 0.0f to 1.0f). This value is set immediately |
| 341 // via SetVolume() and a task is dispatched on the task runner to notify the | 341 // via SetVolume() and a task is dispatched on the task runner to notify the |
| 342 // filters. | 342 // filters. |
| 343 float volume_; | 343 float volume_; |
| 344 | 344 |
| 345 // Current playback rate (>= 0.0f). This value is set immediately via | 345 // Current playback rate (>= 0.0f). This value is set immediately via |
| 346 // SetPlaybackRate() and a task is dispatched on the task runner to notify | 346 // SetPlaybackRate() and a task is dispatched on the task runner to notify |
| 347 // the filters. | 347 // the filters. |
| 348 float playback_rate_; | 348 float playback_rate_; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 scoped_ptr<SerialRunner> pending_callbacks_; | 411 scoped_ptr<SerialRunner> pending_callbacks_; |
| 412 | 412 |
| 413 base::ThreadChecker thread_checker_; | 413 base::ThreadChecker thread_checker_; |
| 414 | 414 |
| 415 DISALLOW_COPY_AND_ASSIGN(Pipeline); | 415 DISALLOW_COPY_AND_ASSIGN(Pipeline); |
| 416 }; | 416 }; |
| 417 | 417 |
| 418 } // namespace media | 418 } // namespace media |
| 419 | 419 |
| 420 #endif // MEDIA_BASE_PIPELINE_H_ | 420 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |