| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 virtual void EnableBitstreamConverter() = 0; | 195 virtual void EnableBitstreamConverter() = 0; |
| 196 | 196 |
| 197 protected: | 197 protected: |
| 198 // Optional method that is implemented by filters that support extended | 198 // Optional method that is implemented by filters that support extended |
| 199 // interfaces. The filter should return a pointer to the interface | 199 // interfaces. The filter should return a pointer to the interface |
| 200 // associated with the |interface_id| string if they support it, otherwise | 200 // associated with the |interface_id| string if they support it, otherwise |
| 201 // return NULL to indicate the interface is unknown. The derived filter | 201 // return NULL to indicate the interface is unknown. The derived filter |
| 202 // should NOT AddRef() the interface. The DemuxerStream::QueryInterface() | 202 // should NOT AddRef() the interface. The DemuxerStream::QueryInterface() |
| 203 // public template function will assign the interface to a scoped_refptr<>. | 203 // public template function will assign the interface to a scoped_refptr<>. |
| 204 virtual void* QueryInterface(const char* interface_id) { return NULL; } | 204 virtual void* QueryInterface(const char* interface_id); |
| 205 | 205 |
| 206 friend class base::RefCountedThreadSafe<DemuxerStream>; | 206 friend class base::RefCountedThreadSafe<DemuxerStream>; |
| 207 virtual ~DemuxerStream(); | 207 virtual ~DemuxerStream(); |
| 208 }; | 208 }; |
| 209 | 209 |
| 210 | 210 |
| 211 class VideoDecoder : public Filter { | 211 class VideoDecoder : public Filter { |
| 212 public: | 212 public: |
| 213 virtual const char* major_mime_type() const; | 213 virtual const char* major_mime_type() const; |
| 214 virtual bool requires_message_loop() const; | 214 virtual bool requires_message_loop() const; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 // buffer. | 318 // buffer. |
| 319 virtual bool HasEnded() = 0; | 319 virtual bool HasEnded() = 0; |
| 320 | 320 |
| 321 // Sets the output volume. | 321 // Sets the output volume. |
| 322 virtual void SetVolume(float volume) = 0; | 322 virtual void SetVolume(float volume) = 0; |
| 323 }; | 323 }; |
| 324 | 324 |
| 325 } // namespace media | 325 } // namespace media |
| 326 | 326 |
| 327 #endif // MEDIA_BASE_FILTERS_H_ | 327 #endif // MEDIA_BASE_FILTERS_H_ |
| OLD | NEW |