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 OnAssignment | 7 // who is actually reading from them, and return the results via OnAssignment |
8 // using the AssignableInterface<SomeBufferType> interface: | 8 // using the AssignableInterface<SomeBufferType> interface: |
9 // | 9 // |
10 // DemuxerStream(Video) <- VideoDecoder <- VideoRenderer | 10 // DemuxerStream(Video) <- VideoDecoder <- VideoRenderer |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 static const size_t kReadError = static_cast<size_t>(-1); | 106 static const size_t kReadError = static_cast<size_t>(-1); |
107 | 107 |
108 // Initializes this filter, returns true if successful, false otherwise. | 108 // Initializes this filter, returns true if successful, false otherwise. |
109 virtual bool Initialize(const std::string& url) = 0; | 109 virtual bool Initialize(const std::string& url) = 0; |
110 | 110 |
111 // Returns the MediaFormat for this filter. | 111 // Returns the MediaFormat for this filter. |
112 virtual const MediaFormat* GetMediaFormat() = 0; | 112 virtual const MediaFormat* GetMediaFormat() = 0; |
113 | 113 |
114 // Read the given amount of bytes into data, returns the number of bytes read | 114 // Read the given amount of bytes into data, returns the number of bytes read |
115 // if successful, kReadError otherwise. | 115 // if successful, kReadError otherwise. |
116 virtual size_t Read(char* data, size_t size) = 0; | 116 virtual size_t Read(uint8* data, size_t size) = 0; |
117 | 117 |
118 // Returns true and the current file position for this file, false if the | 118 // Returns true and the current file position for this file, false if the |
119 // file position could not be retrieved. | 119 // file position could not be retrieved. |
120 virtual bool GetPosition(int64* position_out) = 0; | 120 virtual bool GetPosition(int64* position_out) = 0; |
121 | 121 |
122 // Returns true if the file position could be set, false otherwise. | 122 // Returns true if the file position could be set, false otherwise. |
123 virtual bool SetPosition(int64 position) = 0; | 123 virtual bool SetPosition(int64 position) = 0; |
124 | 124 |
125 // Returns true and the file size, false if the file size could not be | 125 // Returns true and the file size, false if the file size could not be |
126 // retrieved. | 126 // retrieved. |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 // Initializes this filter, returns true if successful, false otherwise. | 234 // Initializes this filter, returns true if successful, false otherwise. |
235 virtual bool Initialize(AudioDecoder* decoder) = 0; | 235 virtual bool Initialize(AudioDecoder* decoder) = 0; |
236 | 236 |
237 // Sets the output volume. | 237 // Sets the output volume. |
238 virtual void SetVolume(float volume) = 0; | 238 virtual void SetVolume(float volume) = 0; |
239 }; | 239 }; |
240 | 240 |
241 } // namespace media | 241 } // namespace media |
242 | 242 |
243 #endif // MEDIA_BASE_FILTERS_H_ | 243 #endif // MEDIA_BASE_FILTERS_H_ |
OLD | NEW |