| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 class Filter; | 43 class Filter; |
| 44 class FilterHost; | 44 class FilterHost; |
| 45 | 45 |
| 46 // Used for completing asynchronous methods. | 46 // Used for completing asynchronous methods. |
| 47 typedef Callback0::Type FilterCallback; | 47 typedef Callback0::Type FilterCallback; |
| 48 | 48 |
| 49 class Filter : public base::RefCountedThreadSafe<Filter> { | 49 class Filter : public base::RefCountedThreadSafe<Filter> { |
| 50 public: | 50 public: |
| 51 Filter(); | 51 Filter(); |
| 52 | 52 |
| 53 virtual bool supports_codec_id(int codec_id) { return false; } |
| 54 virtual const char* filter_name() { return "UnknownMediaFilter"; } |
| 55 |
| 53 // Return the major mime type for this filter. | 56 // Return the major mime type for this filter. |
| 54 virtual const char* major_mime_type() const; | 57 virtual const char* major_mime_type() const; |
| 55 | 58 |
| 56 // Sets the private member |host_|. This is the first method called by | 59 // Sets the private member |host_|. This is the first method called by |
| 57 // the FilterHost after a filter is created. The host holds a strong | 60 // the FilterHost after a filter is created. The host holds a strong |
| 58 // reference to the filter. The reference held by the host is guaranteed | 61 // reference to the filter. The reference held by the host is guaranteed |
| 59 // to be released before the host object is destroyed by the pipeline. | 62 // to be released before the host object is destroyed by the pipeline. |
| 60 virtual void set_host(FilterHost* host); | 63 virtual void set_host(FilterHost* host); |
| 61 | 64 |
| 62 virtual FilterHost* host(); | 65 virtual FilterHost* host(); |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 // buffer. | 321 // buffer. |
| 319 virtual bool HasEnded() = 0; | 322 virtual bool HasEnded() = 0; |
| 320 | 323 |
| 321 // Sets the output volume. | 324 // Sets the output volume. |
| 322 virtual void SetVolume(float volume) = 0; | 325 virtual void SetVolume(float volume) = 0; |
| 323 }; | 326 }; |
| 324 | 327 |
| 325 } // namespace media | 328 } // namespace media |
| 326 | 329 |
| 327 #endif // MEDIA_BASE_FILTERS_H_ | 330 #endif // MEDIA_BASE_FILTERS_H_ |
| OLD | NEW |