Chromium Code Reviews| Index: media/base/filters.h |
| diff --git a/media/base/filters.h b/media/base/filters.h |
| index 901a91bc4f3950dc446f51880557150b6fe63b0c..4fe120272139ae3432466697fb05d9f9bb8ad42a 100644 |
| --- a/media/base/filters.h |
| +++ b/media/base/filters.h |
| @@ -33,6 +33,7 @@ |
| #include "base/time.h" |
| #include "media/base/audio_decoder_config.h" |
| #include "media/base/media_format.h" |
| +#include "media/base/pipeline_status.h" |
| #include "media/base/video_frame.h" |
| struct AVStream; |
| @@ -62,6 +63,12 @@ enum Preload { |
| // Used for completing asynchronous methods. |
| typedef Callback0::Type FilterCallback; |
| +typedef base::Callback<void(PipelineStatus)> FilterStatusCB; |
| + |
| +// This function copies |cb|, calls Reset() on |cb|, and then calls Run() |
| +// on the copy. This is used in the common case where you need to clear |
| +// a callback member variable before running the callback. |
| +void RunAndResetCB(FilterStatusCB* cb, PipelineStatus status); |
|
Ami GONE FROM CHROMIUM
2011/05/12 22:49:26
In that case, s/RunAndResetCB/ResetAndRunCB/ ?
acolwell GONE FROM CHROMIUM
2011/05/13 00:49:10
Done.
|
| // Used for updating pipeline statistics. |
| typedef Callback1<const PipelineStatistics&>::Type StatisticsCallback; |
| @@ -104,7 +111,7 @@ class Filter : public base::RefCountedThreadSafe<Filter> { |
| // Carry out any actions required to seek to the given time, executing the |
| // callback upon completion. |
| - virtual void Seek(base::TimeDelta time, FilterCallback* callback); |
| + virtual void Seek(base::TimeDelta time, const FilterStatusCB& callback); |
| // This method is called from the pipeline when the audio renderer |
| // is disabled. Filters can ignore the notification if they do not |