| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 143 // determined or can not be determined, this value is 0. | 143 // determined or can not be determined, this value is 0. |
| 144 virtual int64 GetTotalBytes() const = 0; | 144 virtual int64 GetTotalBytes() const = 0; |
| 145 | 145 |
| 146 // Gets the size of the video output in pixel units. If there is no video | 146 // Gets the size of the video output in pixel units. If there is no video |
| 147 // or the video has not been rendered yet, the width and height will be 0. | 147 // or the video has not been rendered yet, the width and height will be 0. |
| 148 virtual void GetVideoSize(size_t* width_out, size_t* height_out) const = 0; | 148 virtual void GetVideoSize(size_t* width_out, size_t* height_out) const = 0; |
| 149 | 149 |
| 150 // If this method returns true, that means the data source is a streaming |
| 151 // data source. Seeking may not be possible. |
| 152 virtual bool IsStreaming() const = 0; |
| 153 |
| 150 // Gets the current error status for the pipeline. If the pipeline is | 154 // Gets the current error status for the pipeline. If the pipeline is |
| 151 // operating correctly, this will return OK. | 155 // operating correctly, this will return OK. |
| 152 virtual PipelineError GetError() const = 0; | 156 virtual PipelineError GetError() const = 0; |
| 153 | 157 |
| 154 protected: | 158 protected: |
| 155 // Only allow ourselves to be deleted by reference counting. | 159 // Only allow ourselves to be deleted by reference counting. |
| 156 friend class base::RefCountedThreadSafe<Pipeline>; | 160 friend class base::RefCountedThreadSafe<Pipeline>; |
| 157 virtual ~Pipeline() {} | 161 virtual ~Pipeline() {} |
| 158 }; | 162 }; |
| 159 | 163 |
| 160 } // namespace media | 164 } // namespace media |
| 161 | 165 |
| 162 #endif // MEDIA_BASE_PIPELINE_H_ | 166 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |