| 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 < |
| 11 // DemuxerStream(Audio) <- AudioDecoder <- AudioRenderer | 11 // DemuxerStream(Audio) <- AudioDecoder <- AudioRenderer |
| 12 // | 12 // |
| 13 // Upstream -------------------------------------------------------> Downstream | 13 // Upstream -------------------------------------------------------> Downstream |
| 14 // <- Reads flow this way | 14 // <- Reads flow this way |
| 15 // Buffer assignments flow this way -> | 15 // Buffer assignments flow this way -> |
| 16 // | 16 // |
| 17 // Every filter maintains a reference to the scheduler, who maintains data | 17 // Every filter maintains a reference to the scheduler, who maintains data |
| 18 // shared between filters (i.e., reference clock value, playback state). The | 18 // shared between filters (i.e., reference clock value, playback state). The |
| 19 // scheduler is also responsible for scheduling filter tasks (i.e., a read on | 19 // scheduler is also responsible for scheduling filter tasks (i.e., a read on |
| 20 // a VideoDecoder would result in scheduling a Decode task). Filters can also | 20 // a VideoDecoder would result in scheduling a Decode task). Filters can also |
| 21 // use the scheduler to signal errors and shutdown playback. | 21 // use the scheduler to signal errors and shutdown playback. |
| 22 | 22 |
| 23 #ifndef MEDIA_BASE_FILTERS_H_ | 23 #ifndef MEDIA_BASE_FILTERS_H_ |
| 24 #define MEDIA_BASE_FILTERS_H_ | 24 #define MEDIA_BASE_FILTERS_H_ |
| 25 | 25 |
| 26 #include <limits> | 26 #include <limits> |
| 27 #include <string> | 27 #include <string> |
| 28 | 28 |
| 29 #include "base/callback.h" | 29 #include "base/callback.h" |
| 30 #include "base/callback_old.h" |
| 30 #include "base/memory/ref_counted.h" | 31 #include "base/memory/ref_counted.h" |
| 31 #include "base/memory/scoped_ptr.h" | 32 #include "base/memory/scoped_ptr.h" |
| 32 #include "base/time.h" | 33 #include "base/time.h" |
| 33 #include "media/base/audio_decoder_config.h" | 34 #include "media/base/audio_decoder_config.h" |
| 34 #include "media/base/media_format.h" | 35 #include "media/base/media_format.h" |
| 35 #include "media/base/video_frame.h" | 36 #include "media/base/video_frame.h" |
| 36 | 37 |
| 37 struct AVStream; | 38 struct AVStream; |
| 38 | 39 |
| 39 namespace media { | 40 namespace media { |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // buffer. | 293 // buffer. |
| 293 virtual bool HasEnded() = 0; | 294 virtual bool HasEnded() = 0; |
| 294 | 295 |
| 295 // Sets the output volume. | 296 // Sets the output volume. |
| 296 virtual void SetVolume(float volume) = 0; | 297 virtual void SetVolume(float volume) = 0; |
| 297 }; | 298 }; |
| 298 | 299 |
| 299 } // namespace media | 300 } // namespace media |
| 300 | 301 |
| 301 #endif // MEDIA_BASE_FILTERS_H_ | 302 #endif // MEDIA_BASE_FILTERS_H_ |
| OLD | NEW |