| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 virtual bool GetSize(int64* size_out) = 0; | 128 virtual bool GetSize(int64* size_out) = 0; |
| 129 | 129 |
| 130 // Returns true if we are performing streaming. In this case seeking is | 130 // Returns true if we are performing streaming. In this case seeking is |
| 131 // not possible. | 131 // not possible. |
| 132 virtual bool IsStreaming() = 0; | 132 virtual bool IsStreaming() = 0; |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 | 135 |
| 136 class Demuxer : public Filter { | 136 class Demuxer : public Filter { |
| 137 public: | 137 public: |
| 138 // Initialize a Demuxer with the given DataSource, executing the callback upon | |
| 139 // completion. | |
| 140 virtual void Initialize(DataSource* data_source, | |
| 141 FilterCallback* callback) = 0; | |
| 142 | |
| 143 // Returns the number of streams available | 138 // Returns the number of streams available |
| 144 virtual size_t GetNumberOfStreams() = 0; | 139 virtual size_t GetNumberOfStreams() = 0; |
| 145 | 140 |
| 146 // Returns the stream for the given index, NULL otherwise | 141 // Returns the stream for the given index, NULL otherwise |
| 147 virtual scoped_refptr<DemuxerStream> GetStream(int stream_id) = 0; | 142 virtual scoped_refptr<DemuxerStream> GetStream(int stream_id) = 0; |
| 148 }; | 143 }; |
| 149 | 144 |
| 150 | 145 |
| 151 class DemuxerStream : public base::RefCountedThreadSafe<DemuxerStream> { | 146 class DemuxerStream : public base::RefCountedThreadSafe<DemuxerStream> { |
| 152 public: | 147 public: |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 // buffer. | 291 // buffer. |
| 297 virtual bool HasEnded() = 0; | 292 virtual bool HasEnded() = 0; |
| 298 | 293 |
| 299 // Sets the output volume. | 294 // Sets the output volume. |
| 300 virtual void SetVolume(float volume) = 0; | 295 virtual void SetVolume(float volume) = 0; |
| 301 }; | 296 }; |
| 302 | 297 |
| 303 } // namespace media | 298 } // namespace media |
| 304 | 299 |
| 305 #endif // MEDIA_BASE_FILTERS_H_ | 300 #endif // MEDIA_BASE_FILTERS_H_ |
| OLD | NEW |