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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 // Returns true if we are performing streaming. In this case seeking is | 150 // Returns true if we are performing streaming. In this case seeking is |
151 // not possible. | 151 // not possible. |
152 virtual bool IsStreaming() = 0; | 152 virtual bool IsStreaming() = 0; |
153 | 153 |
154 // Alert the DataSource that the video preload value has been changed. | 154 // Alert the DataSource that the video preload value has been changed. |
155 virtual void SetPreload(Preload preload) = 0; | 155 virtual void SetPreload(Preload preload) = 0; |
156 | 156 |
157 // Notify the DataSource of the bitrate of the media. | 157 // Notify the DataSource of the bitrate of the media. |
158 // Values of |bitrate| <= 0 are invalid and should be ignored. | 158 // Values of |bitrate| <= 0 are invalid and should be ignored. |
159 virtual void SetBitrate(int bitrate) = 0; | 159 virtual void SetBitrate(int bitrate) = 0; |
160 | |
161 // Returns true if the data source is from a local file or stream (such as a | |
162 // webcam stream), false otherwise. | |
163 virtual bool IsLocalSource() = 0; | |
acolwell GONE FROM CHROMIUM
2011/11/30 19:26:11
I wonder if adding this method is needed since the
vrk (LEFT CHROMIUM)
2011/12/01 02:11:35
Yeah, that's what I was thinking too. Done.
| |
160 }; | 164 }; |
161 | 165 |
162 class MEDIA_EXPORT VideoDecoder : public Filter { | 166 class MEDIA_EXPORT VideoDecoder : public Filter { |
163 public: | 167 public: |
164 // Initialize a VideoDecoder with the given DemuxerStream, executing the | 168 // Initialize a VideoDecoder with the given DemuxerStream, executing the |
165 // callback upon completion. | 169 // callback upon completion. |
166 // stats_callback is used to update global pipeline statistics. | 170 // stats_callback is used to update global pipeline statistics. |
167 // | 171 // |
168 // TODO(scherkus): switch to PipelineStatus callback. | 172 // TODO(scherkus): switch to PipelineStatus callback. |
169 virtual void Initialize(DemuxerStream* stream, const base::Closure& callback, | 173 virtual void Initialize(DemuxerStream* stream, const base::Closure& callback, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
268 | 272 |
269 // Resumes playback after underflow occurs. | 273 // Resumes playback after underflow occurs. |
270 // |buffer_more_audio| is set to true if you want to increase the size of the | 274 // |buffer_more_audio| is set to true if you want to increase the size of the |
271 // decoded audio buffer. | 275 // decoded audio buffer. |
272 virtual void ResumeAfterUnderflow(bool buffer_more_audio) = 0; | 276 virtual void ResumeAfterUnderflow(bool buffer_more_audio) = 0; |
273 }; | 277 }; |
274 | 278 |
275 } // namespace media | 279 } // namespace media |
276 | 280 |
277 #endif // MEDIA_BASE_FILTERS_H_ | 281 #endif // MEDIA_BASE_FILTERS_H_ |
OLD | NEW |