| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 // Initializes this filter, returns true if successful, false otherwise. | 239 // Initializes this filter, returns true if successful, false otherwise. |
| 240 virtual bool Initialize(DemuxerStream* demuxer_stream) = 0; | 240 virtual bool Initialize(DemuxerStream* demuxer_stream) = 0; |
| 241 | 241 |
| 242 // Returns the MediaFormat for this filter. | 242 // Returns the MediaFormat for this filter. |
| 243 virtual const MediaFormat& media_format() = 0; | 243 virtual const MediaFormat& media_format() = 0; |
| 244 | 244 |
| 245 // Schedules a read. Decoder takes ownership of the callback. | 245 // Schedules a read. Decoder takes ownership of the callback. |
| 246 // | 246 // |
| 247 // TODO(scherkus): switch Read() callback to scoped_refptr<>. | 247 // TODO(scherkus): switch Read() callback to scoped_refptr<>. |
| 248 virtual void Read(Callback1<Buffer*>::Type* read_callbasck) = 0; | 248 virtual void Read(Callback1<Buffer*>::Type* read_callback) = 0; |
| 249 }; | 249 }; |
| 250 | 250 |
| 251 | 251 |
| 252 class VideoRenderer : public MediaFilter { | 252 class VideoRenderer : public MediaFilter { |
| 253 public: | 253 public: |
| 254 static const FilterType filter_type() { | 254 static const FilterType filter_type() { |
| 255 return FILTER_VIDEO_RENDERER; | 255 return FILTER_VIDEO_RENDERER; |
| 256 } | 256 } |
| 257 | 257 |
| 258 static const char* major_mime_type() { | 258 static const char* major_mime_type() { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 277 // Initializes this filter, returns true if successful, false otherwise. | 277 // Initializes this filter, returns true if successful, false otherwise. |
| 278 virtual bool Initialize(AudioDecoder* decoder) = 0; | 278 virtual bool Initialize(AudioDecoder* decoder) = 0; |
| 279 | 279 |
| 280 // Sets the output volume. | 280 // Sets the output volume. |
| 281 virtual void SetVolume(float volume) = 0; | 281 virtual void SetVolume(float volume) = 0; |
| 282 }; | 282 }; |
| 283 | 283 |
| 284 } // namespace media | 284 } // namespace media |
| 285 | 285 |
| 286 #endif // MEDIA_BASE_FILTERS_H_ | 286 #endif // MEDIA_BASE_FILTERS_H_ |
| OLD | NEW |