| 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 // 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 collection containing the filters they want the pipeline to | 6 // provide a filter collection 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 base::TimeDelta GetMediaDuration() const = 0; | 140 virtual base::TimeDelta GetMediaDuration() const = 0; |
| 141 | 141 |
| 142 // Get the total number of bytes that are buffered on the client and ready to | 142 // Get the total number of bytes that are buffered on the client and ready to |
| 143 // be played. | 143 // be played. |
| 144 virtual int64 GetBufferedBytes() const = 0; | 144 virtual int64 GetBufferedBytes() const = 0; |
| 145 | 145 |
| 146 // Get the total size of the media file. If the size has not yet been | 146 // Get the total size of the media file. If the size has not yet been |
| 147 // determined or can not be determined, this value is 0. | 147 // determined or can not be determined, this value is 0. |
| 148 virtual int64 GetTotalBytes() const = 0; | 148 virtual int64 GetTotalBytes() const = 0; |
| 149 | 149 |
| 150 // Gets the size of the video output in pixel units. If there is no video | 150 // Gets the natural size of the video output in pixel units. If there is no |
| 151 // or the video has not been rendered yet, the width and height will be 0. | 151 // video or the video has not been rendered yet, the width and height will |
| 152 virtual void GetVideoSize(size_t* width_out, size_t* height_out) const = 0; | 152 // be 0. |
| 153 virtual void GetNaturalVideoSize(gfx::Size* out_size) const = 0; |
| 153 | 154 |
| 154 // If this method returns true, that means the data source is a streaming | 155 // If this method returns true, that means the data source is a streaming |
| 155 // data source. Seeking may not be possible. | 156 // data source. Seeking may not be possible. |
| 156 virtual bool IsStreaming() const = 0; | 157 virtual bool IsStreaming() const = 0; |
| 157 | 158 |
| 158 // If this method returns true, that means the data source has fully loaded | 159 // If this method returns true, that means the data source has fully loaded |
| 159 // the media and that the network is no longer needed. | 160 // the media and that the network is no longer needed. |
| 160 virtual bool IsLoaded() const = 0; | 161 virtual bool IsLoaded() const = 0; |
| 161 | 162 |
| 162 // Gets the current pipeline statistics. | 163 // Gets the current pipeline statistics. |
| 163 virtual PipelineStatistics GetStatistics() const = 0; | 164 virtual PipelineStatistics GetStatistics() const = 0; |
| 164 | 165 |
| 165 protected: | 166 protected: |
| 166 // Only allow ourselves to be deleted by reference counting. | 167 // Only allow ourselves to be deleted by reference counting. |
| 167 friend class base::RefCountedThreadSafe<Pipeline>; | 168 friend class base::RefCountedThreadSafe<Pipeline>; |
| 168 virtual ~Pipeline() {} | 169 virtual ~Pipeline() {} |
| 169 }; | 170 }; |
| 170 | 171 |
| 171 } // namespace media | 172 } // namespace media |
| 172 | 173 |
| 173 #endif // MEDIA_BASE_PIPELINE_H_ | 174 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |