| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 // Get the total size of the media file. If the size has not yet been | 153 // Get the total size of the media file. If the size has not yet been |
| 154 // determined or can not be determined, this value is 0. | 154 // determined or can not be determined, this value is 0. |
| 155 virtual int64 GetTotalBytes() const = 0; | 155 virtual int64 GetTotalBytes() const = 0; |
| 156 | 156 |
| 157 // Gets the natural size of the video output in pixel units. If there is no | 157 // Gets the natural size of the video output in pixel units. If there is no |
| 158 // video or the video has not been rendered yet, the width and height will | 158 // video or the video has not been rendered yet, the width and height will |
| 159 // be 0. | 159 // be 0. |
| 160 virtual void GetNaturalVideoSize(gfx::Size* out_size) const = 0; | 160 virtual void GetNaturalVideoSize(gfx::Size* out_size) const = 0; |
| 161 | 161 |
| 162 // Sets whether the source of the media is a MediaStream (e.g. video capture |
| 163 // from a local source). |
| 164 virtual void SetMediaStream(bool is_media_stream) = 0; |
| 165 |
| 162 // If this method returns true, that means the data source is a streaming | 166 // If this method returns true, that means the data source is a streaming |
| 163 // data source. Seeking may not be possible. | 167 // data source. Seeking may not be possible. |
| 164 virtual bool IsStreaming() const = 0; | 168 virtual bool IsStreaming() const = 0; |
| 165 | 169 |
| 166 // If this method returns true, that means the data source has fully loaded | 170 // If this method returns true, that means the data source has fully loaded |
| 167 // the media and that the network is no longer needed. | 171 // the media and that the network is no longer needed. |
| 168 virtual bool IsLoaded() const = 0; | 172 virtual bool IsLoaded() const = 0; |
| 169 | 173 |
| 170 // Gets the current pipeline statistics. | 174 // Gets the current pipeline statistics. |
| 171 virtual PipelineStatistics GetStatistics() const = 0; | 175 virtual PipelineStatistics GetStatistics() const = 0; |
| 172 | 176 |
| 173 protected: | 177 protected: |
| 174 // Only allow ourselves to be deleted by reference counting. | 178 // Only allow ourselves to be deleted by reference counting. |
| 175 friend class base::RefCountedThreadSafe<Pipeline>; | 179 friend class base::RefCountedThreadSafe<Pipeline>; |
| 176 virtual ~Pipeline() {} | 180 virtual ~Pipeline() {} |
| 177 }; | 181 }; |
| 178 | 182 |
| 179 } // namespace media | 183 } // namespace media |
| 180 | 184 |
| 181 #endif // MEDIA_BASE_PIPELINE_H_ | 185 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |