| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Implementation of Pipeline & PipelineStatusNotification (an async-to-sync | 5 // Implementation of Pipeline & PipelineStatusNotification (an async-to-sync |
| 6 // callback adapter). | 6 // callback adapter). |
| 7 | 7 |
| 8 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_ | 8 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_ |
| 9 #define MEDIA_BASE_PIPELINE_IMPL_H_ | 9 #define MEDIA_BASE_PIPELINE_IMPL_H_ |
| 10 | 10 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 virtual void SetPlaybackRate(float playback_rate) OVERRIDE; | 118 virtual void SetPlaybackRate(float playback_rate) OVERRIDE; |
| 119 virtual float GetVolume() const OVERRIDE; | 119 virtual float GetVolume() const OVERRIDE; |
| 120 virtual void SetVolume(float volume) OVERRIDE; | 120 virtual void SetVolume(float volume) OVERRIDE; |
| 121 virtual void SetPreload(Preload preload) OVERRIDE; | 121 virtual void SetPreload(Preload preload) OVERRIDE; |
| 122 virtual base::TimeDelta GetCurrentTime() const OVERRIDE; | 122 virtual base::TimeDelta GetCurrentTime() const OVERRIDE; |
| 123 virtual base::TimeDelta GetBufferedTime() OVERRIDE; | 123 virtual base::TimeDelta GetBufferedTime() OVERRIDE; |
| 124 virtual base::TimeDelta GetMediaDuration() const OVERRIDE; | 124 virtual base::TimeDelta GetMediaDuration() const OVERRIDE; |
| 125 virtual int64 GetBufferedBytes() const OVERRIDE; | 125 virtual int64 GetBufferedBytes() const OVERRIDE; |
| 126 virtual int64 GetTotalBytes() const OVERRIDE; | 126 virtual int64 GetTotalBytes() const OVERRIDE; |
| 127 virtual void GetNaturalVideoSize(gfx::Size* out_size) const OVERRIDE; | 127 virtual void GetNaturalVideoSize(gfx::Size* out_size) const OVERRIDE; |
| 128 virtual void SetMediaStream(bool is_media_stream) OVERRIDE; |
| 128 virtual bool IsStreaming() const OVERRIDE; | 129 virtual bool IsStreaming() const OVERRIDE; |
| 129 virtual bool IsLoaded() const OVERRIDE; | 130 virtual bool IsLoaded() const OVERRIDE; |
| 130 virtual PipelineStatistics GetStatistics() const OVERRIDE; | 131 virtual PipelineStatistics GetStatistics() const OVERRIDE; |
| 131 | 132 |
| 132 void SetClockForTesting(Clock* clock); | 133 void SetClockForTesting(Clock* clock); |
| 133 | 134 |
| 134 private: | 135 private: |
| 135 friend class MediaLog; | 136 friend class MediaLog; |
| 136 | 137 |
| 137 // Pipeline states, as described above. | 138 // Pipeline states, as described above. |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 379 |
| 379 // Amount of available buffered data. Set by filters. | 380 // Amount of available buffered data. Set by filters. |
| 380 int64 buffered_bytes_; | 381 int64 buffered_bytes_; |
| 381 | 382 |
| 382 // Total size of the media. Set by filters. | 383 // Total size of the media. Set by filters. |
| 383 int64 total_bytes_; | 384 int64 total_bytes_; |
| 384 | 385 |
| 385 // Video's natural width and height. Set by filters. | 386 // Video's natural width and height. Set by filters. |
| 386 gfx::Size natural_size_; | 387 gfx::Size natural_size_; |
| 387 | 388 |
| 388 // Sets by the filters to indicate whether the data source is a streaming | 389 // Set by the filters to indicate whether the data source is a streaming |
| 389 // source. | 390 // source. |
| 390 bool streaming_; | 391 bool streaming_; |
| 391 | 392 |
| 393 // Set by pipeline client to indicate whether the data source is a |
| 394 // MediaStream. |
| 395 bool media_stream_; |
| 396 |
| 392 // Sets by the filters to indicate whether the data source is a fully | 397 // Sets by the filters to indicate whether the data source is a fully |
| 393 // loaded source. | 398 // loaded source. |
| 394 bool loaded_; | 399 bool loaded_; |
| 395 | 400 |
| 396 // Current volume level (from 0.0f to 1.0f). This value is set immediately | 401 // Current volume level (from 0.0f to 1.0f). This value is set immediately |
| 397 // via SetVolume() and a task is dispatched on the message loop to notify the | 402 // via SetVolume() and a task is dispatched on the message loop to notify the |
| 398 // filters. | 403 // filters. |
| 399 float volume_; | 404 float volume_; |
| 400 | 405 |
| 401 // Current value of preload attribute. This value is set immediately via | 406 // Current value of preload attribute. This value is set immediately via |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 bool is_downloading_data_; | 500 bool is_downloading_data_; |
| 496 | 501 |
| 497 FRIEND_TEST_ALL_PREFIXES(PipelineImplTest, GetBufferedTime); | 502 FRIEND_TEST_ALL_PREFIXES(PipelineImplTest, GetBufferedTime); |
| 498 | 503 |
| 499 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); | 504 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); |
| 500 }; | 505 }; |
| 501 | 506 |
| 502 } // namespace media | 507 } // namespace media |
| 503 | 508 |
| 504 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ | 509 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ |
| OLD | NEW |