| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // The pipeline is the public API clients use for playing back media. Clients | 5 // The pipeline is the public API clients use for playing back media. Clients |
| 6 // provide a filter factory containing the filters they want the pipeline to | 6 // provide a filter factory containing the filters they want the pipeline to |
| 7 // use to render media. | 7 // use to render media. |
| 8 | 8 |
| 9 #ifndef MEDIA_BASE_PIPELINE_H_ | 9 #ifndef MEDIA_BASE_PIPELINE_H_ |
| 10 #define MEDIA_BASE_PIPELINE_H_ | 10 #define MEDIA_BASE_PIPELINE_H_ |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // range from 0.0f (muted) to 1.0f (full volume). This value affects all | 122 // range from 0.0f (muted) to 1.0f (full volume). This value affects all |
| 123 // channels proportionately for multi-channel audio streams. | 123 // channels proportionately for multi-channel audio streams. |
| 124 virtual void SetVolume(float volume) = 0; | 124 virtual void SetVolume(float volume) = 0; |
| 125 | 125 |
| 126 // Gets the current pipeline time. For a pipeline "time" progresses from 0 to | 126 // Gets the current pipeline time. For a pipeline "time" progresses from 0 to |
| 127 // the end of the media. | 127 // the end of the media. |
| 128 virtual base::TimeDelta GetCurrentTime() const = 0; | 128 virtual base::TimeDelta GetCurrentTime() const = 0; |
| 129 | 129 |
| 130 // Get the approximate amount of playable data buffered so far in micro- | 130 // Get the approximate amount of playable data buffered so far in micro- |
| 131 // seconds. | 131 // seconds. |
| 132 virtual base::TimeDelta GetBufferedTime() const = 0; | 132 virtual base::TimeDelta GetBufferedTime() = 0; |
| 133 | 133 |
| 134 // Get the duration of the media in microseconds. If the duration has not | 134 // Get the duration of the media in microseconds. If the duration has not |
| 135 // been determined yet, then returns 0. | 135 // been determined yet, then returns 0. |
| 136 virtual base::TimeDelta GetMediaDuration() const = 0; | 136 virtual base::TimeDelta GetMediaDuration() const = 0; |
| 137 | 137 |
| 138 // Get the total number of bytes that are buffered on the client and ready to | 138 // Get the total number of bytes that are buffered on the client and ready to |
| 139 // be played. | 139 // be played. |
| 140 virtual int64 GetBufferedBytes() const = 0; | 140 virtual int64 GetBufferedBytes() const = 0; |
| 141 | 141 |
| 142 // Get the total size of the media file. If the size has not yet been | 142 // Get the total size of the media file. If the size has not yet been |
| (...skipping 18 matching lines...) Expand all Loading... |
| 161 | 161 |
| 162 protected: | 162 protected: |
| 163 // Only allow ourselves to be deleted by reference counting. | 163 // Only allow ourselves to be deleted by reference counting. |
| 164 friend class base::RefCountedThreadSafe<Pipeline>; | 164 friend class base::RefCountedThreadSafe<Pipeline>; |
| 165 virtual ~Pipeline() {} | 165 virtual ~Pipeline() {} |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace media | 168 } // namespace media |
| 169 | 169 |
| 170 #endif // MEDIA_BASE_PIPELINE_H_ | 170 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |