OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 namespace media { | 39 namespace media { |
40 | 40 |
41 class AudioDecoder; | 41 class AudioDecoder; |
42 class Buffer; | 42 class Buffer; |
43 class Decoder; | 43 class Decoder; |
44 class DemuxerStream; | 44 class DemuxerStream; |
45 class Filter; | 45 class Filter; |
46 class FilterHost; | 46 class FilterHost; |
47 | 47 |
48 // These functions copy |*cb|, call Reset() on |*cb|, and then call Run() | |
49 // on the copy. This is used in the common case where you need to clear | |
50 // a callback member variable before running the callback. | |
51 MEDIA_EXPORT void ResetAndRunCB(PipelineStatusCB* cb, PipelineStatus status); | |
52 MEDIA_EXPORT void ResetAndRunCB(base::Closure* cb); | |
53 | |
54 class MEDIA_EXPORT Filter : public base::RefCountedThreadSafe<Filter> { | 48 class MEDIA_EXPORT Filter : public base::RefCountedThreadSafe<Filter> { |
55 public: | 49 public: |
56 Filter(); | 50 Filter(); |
57 | 51 |
58 // Sets the private member |host_|. This is the first method called by | 52 // Sets the private member |host_|. This is the first method called by |
59 // the FilterHost after a filter is created. The host holds a strong | 53 // the FilterHost after a filter is created. The host holds a strong |
60 // reference to the filter. The reference held by the host is guaranteed | 54 // reference to the filter. The reference held by the host is guaranteed |
61 // to be released before the host object is destroyed by the pipeline. | 55 // to be released before the host object is destroyed by the pipeline. |
62 virtual void set_host(FilterHost* host); | 56 virtual void set_host(FilterHost* host); |
63 | 57 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 | 210 |
217 // Resumes playback after underflow occurs. | 211 // Resumes playback after underflow occurs. |
218 // |buffer_more_audio| is set to true if you want to increase the size of the | 212 // |buffer_more_audio| is set to true if you want to increase the size of the |
219 // decoded audio buffer. | 213 // decoded audio buffer. |
220 virtual void ResumeAfterUnderflow(bool buffer_more_audio) = 0; | 214 virtual void ResumeAfterUnderflow(bool buffer_more_audio) = 0; |
221 }; | 215 }; |
222 | 216 |
223 } // namespace media | 217 } // namespace media |
224 | 218 |
225 #endif // MEDIA_BASE_FILTERS_H_ | 219 #endif // MEDIA_BASE_FILTERS_H_ |
OLD | NEW |