Chromium Code Reviews| Index: media/base/video_renderer.h |
| diff --git a/media/base/video_renderer.h b/media/base/video_renderer.h |
| index 1b16264414059356d57b1500c5aac8cb1548125d..95cb44704d0d4772e2160a0a7351e19b493b164e 100644 |
| --- a/media/base/video_renderer.h |
| +++ b/media/base/video_renderer.h |
| @@ -5,6 +5,8 @@ |
| #ifndef MEDIA_BASE_VIDEO_RENDERER_H_ |
| #define MEDIA_BASE_VIDEO_RENDERER_H_ |
| +#include <list> |
| + |
| #include "base/callback.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/time.h" |
| @@ -17,11 +19,14 @@ class Size; |
| namespace media { |
| +class DemuxerStream; |
| class VideoDecoder; |
| class MEDIA_EXPORT VideoRenderer |
| : public base::RefCountedThreadSafe<VideoRenderer> { |
| public: |
| + typedef std::list<scoped_refptr<VideoDecoder> > VideoDecoderList; |
| + |
| // Used to update the pipeline's clock time. The parameter is the time that |
| // the clock should not exceed. |
| typedef base::Callback<void(base::TimeDelta)> TimeCB; |
| @@ -50,7 +55,8 @@ class MEDIA_EXPORT VideoRenderer |
| // |get_time_cb| is used to query the current media playback time. |
| // |
| // |get_duration_cb| is used to query the media duration. |
| - virtual void Initialize(const scoped_refptr<VideoDecoder>& decoder, |
| + virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, |
| + const VideoDecoderList& decoders, |
| const PipelineStatusCB& init_cb, |
| const StatisticsCB& statistics_cb, |
| const TimeCB& time_cb, |
| @@ -88,6 +94,14 @@ class MEDIA_EXPORT VideoRenderer |
| // Returns true if all video data has been rendered. |
| virtual bool HasEnded() = 0; |
| + // Prepare decoder for shutdown. This is a HACK needed because |
| + // PipelineImpl::Stop() goes through a Pause/Flush/Stop dance to all its |
| + // filters, waiting for each state transition to complete before starting the |
| + // next, but WebMediaPlayerImpl::Destroy() holds the renderer loop hostage for |
| + // the duration. Default implementation does nothing; derived decoders may |
|
Ami GONE FROM CHROMIUM
2012/08/09 20:30:18
There is no default implementation anymore (so upd
acolwell GONE FROM CHROMIUM
2012/08/09 22:23:32
Done.
|
| + // override as needed. http://crbug.com/110228 tracks removing this. |
| + virtual void PrepareForShutdownHack() = 0; |
| + |
| protected: |
| friend class base::RefCountedThreadSafe<VideoRenderer>; |