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 // A base class that provides the plumbing for a decoder filters. | 5 // A base class that provides the plumbing for a decoder filters. |
6 | 6 |
7 #ifndef MEDIA_FILTERS_DECODER_BASE_H_ | 7 #ifndef MEDIA_FILTERS_DECODER_BASE_H_ |
8 #define MEDIA_FILTERS_DECODER_BASE_H_ | 8 #define MEDIA_FILTERS_DECODER_BASE_H_ |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // a fatal error. The derived class should NOT call the filter host's | 95 // a fatal error. The derived class should NOT call the filter host's |
96 // InitializationComplete() method. If this method returns true, then the | 96 // InitializationComplete() method. If this method returns true, then the |
97 // base class will call the host to complete initialization. | 97 // base class will call the host to complete initialization. |
98 virtual void DoInitialize(DemuxerStream* demuxer_stream, bool* success, | 98 virtual void DoInitialize(DemuxerStream* demuxer_stream, bool* success, |
99 Task* done_cb) = 0; | 99 Task* done_cb) = 0; |
100 | 100 |
101 // Method that may be implemented by the derived class if desired. It will | 101 // Method that may be implemented by the derived class if desired. It will |
102 // be called from within the Filter::Stop() method prior to stopping the | 102 // be called from within the Filter::Stop() method prior to stopping the |
103 // base class. | 103 // base class. |
104 virtual void DoStop(Task* done_cb) { | 104 virtual void DoStop(Task* done_cb) { |
105 AutoTaskRunner done_runner(done_cb); | 105 base::ScopedTaskRunner run_done_cb(done_cb); |
106 } | 106 } |
107 | 107 |
108 // Derived class can implement this method and perform seeking logic prior | 108 // Derived class can implement this method and perform seeking logic prior |
109 // to the base class. | 109 // to the base class. |
110 virtual void DoSeek(base::TimeDelta time, Task* done_cb) = 0; | 110 virtual void DoSeek(base::TimeDelta time, Task* done_cb) = 0; |
111 | 111 |
112 // Method that must be implemented by the derived class. If the decode | 112 // Method that must be implemented by the derived class. If the decode |
113 // operation produces one or more outputs, the derived class should call | 113 // operation produces one or more outputs, the derived class should call |
114 // the EnequeueResult() method from within this method. | 114 // the EnequeueResult() method from within this method. |
115 virtual void DoDecode(Buffer* input) = 0; | 115 virtual void DoDecode(Buffer* input) = 0; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 302 |
303 // Callback to update pipeline statistics. | 303 // Callback to update pipeline statistics. |
304 scoped_ptr<StatisticsCallback> statistics_callback_; | 304 scoped_ptr<StatisticsCallback> statistics_callback_; |
305 | 305 |
306 DISALLOW_COPY_AND_ASSIGN(DecoderBase); | 306 DISALLOW_COPY_AND_ASSIGN(DecoderBase); |
307 }; | 307 }; |
308 | 308 |
309 } // namespace media | 309 } // namespace media |
310 | 310 |
311 #endif // MEDIA_FILTERS_DECODER_BASE_H_ | 311 #endif // MEDIA_FILTERS_DECODER_BASE_H_ |
OLD | NEW |