| 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 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 return FILTER_VIDEO_RENDERER; | 307 return FILTER_VIDEO_RENDERER; |
| 308 } | 308 } |
| 309 | 309 |
| 310 static const char* major_mime_type() { | 310 static const char* major_mime_type() { |
| 311 return mime_type::kMajorTypeVideo; | 311 return mime_type::kMajorTypeVideo; |
| 312 } | 312 } |
| 313 | 313 |
| 314 // Initialize a VideoRenderer with the given VideoDecoder, executing the | 314 // Initialize a VideoRenderer with the given VideoDecoder, executing the |
| 315 // callback upon completion. | 315 // callback upon completion. |
| 316 virtual void Initialize(VideoDecoder* decoder, FilterCallback* callback) = 0; | 316 virtual void Initialize(VideoDecoder* decoder, FilterCallback* callback) = 0; |
| 317 |
| 318 // Returns true if this filter has received and processed an end-of-stream |
| 319 // buffer. |
| 320 virtual bool HasEnded() = 0; |
| 317 }; | 321 }; |
| 318 | 322 |
| 319 | 323 |
| 320 class AudioRenderer : public MediaFilter { | 324 class AudioRenderer : public MediaFilter { |
| 321 public: | 325 public: |
| 322 static const FilterType filter_type() { | 326 static const FilterType filter_type() { |
| 323 return FILTER_AUDIO_RENDERER; | 327 return FILTER_AUDIO_RENDERER; |
| 324 } | 328 } |
| 325 | 329 |
| 326 static const char* major_mime_type() { | 330 static const char* major_mime_type() { |
| 327 return mime_type::kMajorTypeAudio; | 331 return mime_type::kMajorTypeAudio; |
| 328 } | 332 } |
| 329 | 333 |
| 330 // Initialize a AudioRenderer with the given AudioDecoder, executing the | 334 // Initialize a AudioRenderer with the given AudioDecoder, executing the |
| 331 // callback upon completion. | 335 // callback upon completion. |
| 332 virtual void Initialize(AudioDecoder* decoder, FilterCallback* callback) = 0; | 336 virtual void Initialize(AudioDecoder* decoder, FilterCallback* callback) = 0; |
| 333 | 337 |
| 338 // Returns true if this filter has received and processed an end-of-stream |
| 339 // buffer. |
| 340 virtual bool HasEnded() = 0; |
| 341 |
| 334 // Sets the output volume. | 342 // Sets the output volume. |
| 335 virtual void SetVolume(float volume) = 0; | 343 virtual void SetVolume(float volume) = 0; |
| 336 }; | 344 }; |
| 337 | 345 |
| 338 } // namespace media | 346 } // namespace media |
| 339 | 347 |
| 340 #endif // MEDIA_BASE_FILTERS_H_ | 348 #endif // MEDIA_BASE_FILTERS_H_ |
| OLD | NEW |