OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 // Installs a permanent callback for passing decoded audio output. | 261 // Installs a permanent callback for passing decoded audio output. |
262 typedef base::Callback<void(scoped_refptr<Buffer>)> ConsumeAudioSamplesCB; | 262 typedef base::Callback<void(scoped_refptr<Buffer>)> ConsumeAudioSamplesCB; |
263 void set_consume_audio_samples_callback( | 263 void set_consume_audio_samples_callback( |
264 const ConsumeAudioSamplesCB& callback) { | 264 const ConsumeAudioSamplesCB& callback) { |
265 consume_audio_samples_callback_ = callback; | 265 consume_audio_samples_callback_ = callback; |
266 } | 266 } |
267 | 267 |
268 protected: | 268 protected: |
269 AudioDecoder(); | 269 AudioDecoder(); |
270 ~AudioDecoder(); | 270 virtual ~AudioDecoder(); |
271 | 271 |
272 // Executes the permanent callback to pass off decoded audio. | 272 // Executes the permanent callback to pass off decoded audio. |
273 void ConsumeAudioSamples(scoped_refptr<Buffer> buffer); | 273 void ConsumeAudioSamples(scoped_refptr<Buffer> buffer); |
274 | 274 |
275 private: | 275 private: |
276 ConsumeAudioSamplesCB consume_audio_samples_callback_; | 276 ConsumeAudioSamplesCB consume_audio_samples_callback_; |
277 }; | 277 }; |
278 | 278 |
279 | 279 |
280 class VideoRenderer : public Filter { | 280 class VideoRenderer : public Filter { |
(...skipping 19 matching lines...) Expand all Loading... |
300 // buffer. | 300 // buffer. |
301 virtual bool HasEnded() = 0; | 301 virtual bool HasEnded() = 0; |
302 | 302 |
303 // Sets the output volume. | 303 // Sets the output volume. |
304 virtual void SetVolume(float volume) = 0; | 304 virtual void SetVolume(float volume) = 0; |
305 }; | 305 }; |
306 | 306 |
307 } // namespace media | 307 } // namespace media |
308 | 308 |
309 #endif // MEDIA_BASE_FILTERS_H_ | 309 #endif // MEDIA_BASE_FILTERS_H_ |
OLD | NEW |