Chromium Code Reviews| 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 done_cb->Run(); |
|
dmac
2011/05/26 17:55:42
Maybe I'm being slow this morning, but why is this
Wez
2011/05/26 18:48:21
Reverted.
I was thinking of this as an unnecessar
| |
| 106 delete done_cb; | |
| 106 } | 107 } |
| 107 | 108 |
| 108 // Derived class can implement this method and perform seeking logic prior | 109 // Derived class can implement this method and perform seeking logic prior |
| 109 // to the base class. | 110 // to the base class. |
| 110 virtual void DoSeek(base::TimeDelta time, Task* done_cb) = 0; | 111 virtual void DoSeek(base::TimeDelta time, Task* done_cb) = 0; |
| 111 | 112 |
| 112 // Method that must be implemented by the derived class. If the decode | 113 // Method that must be implemented by the derived class. If the decode |
| 113 // operation produces one or more outputs, the derived class should call | 114 // operation produces one or more outputs, the derived class should call |
| 114 // the EnequeueResult() method from within this method. | 115 // the EnequeueResult() method from within this method. |
| 115 virtual void DoDecode(Buffer* input) = 0; | 116 virtual void DoDecode(Buffer* input) = 0; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 302 | 303 |
| 303 // Callback to update pipeline statistics. | 304 // Callback to update pipeline statistics. |
| 304 scoped_ptr<StatisticsCallback> statistics_callback_; | 305 scoped_ptr<StatisticsCallback> statistics_callback_; |
| 305 | 306 |
| 306 DISALLOW_COPY_AND_ASSIGN(DecoderBase); | 307 DISALLOW_COPY_AND_ASSIGN(DecoderBase); |
| 307 }; | 308 }; |
| 308 | 309 |
| 309 } // namespace media | 310 } // namespace media |
| 310 | 311 |
| 311 #endif // MEDIA_FILTERS_DECODER_BASE_H_ | 312 #endif // MEDIA_FILTERS_DECODER_BASE_H_ |
| OLD | NEW |