OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 protected: | 219 protected: |
220 // Optional method that is implemented by filters that support extended | 220 // Optional method that is implemented by filters that support extended |
221 // interfaces. The filter should return a pointer to the interface | 221 // interfaces. The filter should return a pointer to the interface |
222 // associated with the |interface_id| string if they support it, otherwise | 222 // associated with the |interface_id| string if they support it, otherwise |
223 // return NULL to indicate the interface is unknown. The derived filter | 223 // return NULL to indicate the interface is unknown. The derived filter |
224 // should NOT AddRef() the interface. The DemuxerStream::QueryInterface() | 224 // should NOT AddRef() the interface. The DemuxerStream::QueryInterface() |
225 // public template function will assign the interface to a scoped_refptr<>. | 225 // public template function will assign the interface to a scoped_refptr<>. |
226 virtual void* QueryInterface(const char* interface_id) { return NULL; } | 226 virtual void* QueryInterface(const char* interface_id) { return NULL; } |
227 | 227 |
228 friend class base::RefCountedThreadSafe<DemuxerStream>; | 228 friend class base::RefCountedThreadSafe<DemuxerStream>; |
229 virtual ~DemuxerStream() {} | 229 virtual ~DemuxerStream(); |
230 }; | 230 }; |
231 | 231 |
232 | 232 |
233 class VideoDecoder : public MediaFilter { | 233 class VideoDecoder : public MediaFilter { |
234 public: | 234 public: |
235 static FilterType filter_type() { | 235 static FilterType filter_type() { |
236 return FILTER_VIDEO_DECODER; | 236 return FILTER_VIDEO_DECODER; |
237 } | 237 } |
238 | 238 |
239 static const char* major_mime_type() { | 239 static const char* major_mime_type() { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 // buffer. | 352 // buffer. |
353 virtual bool HasEnded() = 0; | 353 virtual bool HasEnded() = 0; |
354 | 354 |
355 // Sets the output volume. | 355 // Sets the output volume. |
356 virtual void SetVolume(float volume) = 0; | 356 virtual void SetVolume(float volume) = 0; |
357 }; | 357 }; |
358 | 358 |
359 } // namespace media | 359 } // namespace media |
360 | 360 |
361 #endif // MEDIA_BASE_FILTERS_H_ | 361 #endif // MEDIA_BASE_FILTERS_H_ |
OLD | NEW |