| 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 // Filters are connected in a strongly typed manner, with downstream filters | 5 // Filters are connected in a strongly typed manner, with downstream filters |
| 6 // always reading data from upstream filters. Upstream filters have no clue | 6 // always reading data from upstream filters. Upstream filters have no clue |
| 7 // who is actually reading from them, and return the results via callbacks. | 7 // who is actually reading from them, and return the results via callbacks. |
| 8 // | 8 // |
| 9 // DemuxerStream(Video) <- VideoDecoder <- VideoRenderer | 9 // DemuxerStream(Video) <- VideoDecoder <- VideoRenderer |
| 10 // DataSource <- Demuxer < | 10 // DataSource <- Demuxer < |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // Returns true and the file size, false if the file size could not be | 147 // Returns true and the file size, false if the file size could not be |
| 148 // retrieved. | 148 // retrieved. |
| 149 virtual bool GetSize(int64* size_out) = 0; | 149 virtual bool GetSize(int64* size_out) = 0; |
| 150 | 150 |
| 151 // Returns true if we are performing streaming. In this case seeking is | 151 // Returns true if we are performing streaming. In this case seeking is |
| 152 // not possible. | 152 // not possible. |
| 153 virtual bool IsStreaming() = 0; | 153 virtual bool IsStreaming() = 0; |
| 154 | 154 |
| 155 // Alert the DataSource that the video preload value has been changed. | 155 // Alert the DataSource that the video preload value has been changed. |
| 156 virtual void SetPreload(Preload preload) = 0; | 156 virtual void SetPreload(Preload preload) = 0; |
| 157 |
| 158 // Notify the DataSource of the bitrate of the media. |
| 159 // Values of |bitrate| <= 0 are invalid and should be ignored. |
| 160 virtual void SetBitrate(int bitrate) = 0; |
| 157 }; | 161 }; |
| 158 | 162 |
| 159 class MEDIA_EXPORT DemuxerStream | 163 class MEDIA_EXPORT DemuxerStream |
| 160 : public base::RefCountedThreadSafe<DemuxerStream> { | 164 : public base::RefCountedThreadSafe<DemuxerStream> { |
| 161 public: | 165 public: |
| 162 typedef base::Callback<void(Buffer*)> ReadCallback; | 166 typedef base::Callback<void(Buffer*)> ReadCallback; |
| 163 | 167 |
| 164 enum Type { | 168 enum Type { |
| 165 UNKNOWN, | 169 UNKNOWN, |
| 166 AUDIO, | 170 AUDIO, |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 // buffer. | 309 // buffer. |
| 306 virtual bool HasEnded() = 0; | 310 virtual bool HasEnded() = 0; |
| 307 | 311 |
| 308 // Sets the output volume. | 312 // Sets the output volume. |
| 309 virtual void SetVolume(float volume) = 0; | 313 virtual void SetVolume(float volume) = 0; |
| 310 }; | 314 }; |
| 311 | 315 |
| 312 } // namespace media | 316 } // namespace media |
| 313 | 317 |
| 314 #endif // MEDIA_BASE_FILTERS_H_ | 318 #endif // MEDIA_BASE_FILTERS_H_ |
| OLD | NEW |