| Index: media/filters/gpu_video_decoder.h
|
| diff --git a/media/filters/gpu_video_decoder.h b/media/filters/gpu_video_decoder.h
|
| index f7e3f8f17b560b4d256e9eb7cc05c8818c0304cd..def596060b375b3beb4d2aeaedf2f6690c31e759 100644
|
| --- a/media/filters/gpu_video_decoder.h
|
| +++ b/media/filters/gpu_video_decoder.h
|
| @@ -28,17 +28,17 @@ class SkBitmap;
|
| namespace media {
|
|
|
| class DecoderBuffer;
|
| -class VDAClientProxy;
|
|
|
| // GPU-accelerated video decoder implementation. Relies on
|
| // AcceleratedVideoDecoderMsg_Decode and friends.
|
| -// All methods internally trampoline to the |message_loop| passed to the ctor.
|
| class MEDIA_EXPORT GpuVideoDecoder
|
| : public VideoDecoder,
|
| public VideoDecodeAccelerator::Client {
|
| public:
|
| // Helper interface for specifying factories needed to instantiate a
|
| // GpuVideoDecoder.
|
| + // TODO(wuchengli): move this out of GpuVideoDecoder because RTCVideoDecoder
|
| + // also uses this.
|
| class MEDIA_EXPORT Factories : public base::RefCountedThreadSafe<Factories> {
|
| public:
|
| // Caller owns returned pointer.
|
| @@ -77,6 +77,7 @@ class MEDIA_EXPORT GpuVideoDecoder
|
| virtual ~Factories();
|
| };
|
|
|
| + // |message_loop| should be the same as the one running |factories|.
|
| GpuVideoDecoder(const scoped_refptr<base::MessageLoopProxy>& message_loop,
|
| const scoped_refptr<Factories>& factories);
|
|
|
| @@ -133,13 +134,6 @@ class MEDIA_EXPORT GpuVideoDecoder
|
| void GetBufferData(int32 id, base::TimeDelta* timetamp,
|
| gfx::Rect* visible_rect, gfx::Size* natural_size);
|
|
|
| - // Sets |vda_| and |weak_vda_| on the GVD thread and runs |status_cb|.
|
| - void SetVDA(const PipelineStatusCB& status_cb,
|
| - VideoDecodeAccelerator* vda,
|
| - base::WeakPtr<VideoDecodeAccelerator> weak_vda);
|
| -
|
| - // Call VDA::Destroy() on |vda_loop_proxy_| ensuring that |this| outlives the
|
| - // Destroy() call.
|
| void DestroyVDA();
|
|
|
| // A shared memory segment and its allocated size.
|
| @@ -161,28 +155,16 @@ class MEDIA_EXPORT GpuVideoDecoder
|
|
|
| bool needs_bitstream_conversion_;
|
|
|
| - // Message loop on which to fire callbacks and trampoline calls to this class
|
| - // if they arrive on other loops.
|
| + // Message loop which this class and |factories_| run on.
|
| scoped_refptr<base::MessageLoopProxy> gvd_loop_proxy_;
|
| base::WeakPtrFactory<GpuVideoDecoder> weak_factory_;
|
| base::WeakPtr<GpuVideoDecoder> weak_this_;
|
|
|
| - // Message loop on which to makes all calls to vda_. (beware this loop may be
|
| - // paused during the Pause/Flush/Stop dance PipelineImpl::Stop() goes
|
| - // through).
|
| - scoped_refptr<base::MessageLoopProxy> vda_loop_proxy_;
|
| -
|
| scoped_refptr<Factories> factories_;
|
|
|
| - // Proxies calls from |vda_| to |gvd_loop_proxy_| and used to safely detach
|
| - // during shutdown.
|
| - scoped_refptr<VDAClientProxy> client_proxy_;
|
| -
|
| - // Populated during Initialize() via SetVDA() (on success) and unchanged
|
| - // until an error occurs.
|
| + // Populated during Initialize() (on success) and unchanged until an error
|
| + // occurs.
|
| scoped_ptr<VideoDecodeAccelerator> vda_;
|
| - // Used to post tasks from the GVD thread to the VDA thread safely.
|
| - base::WeakPtr<VideoDecodeAccelerator> weak_vda_;
|
|
|
| // Callbacks that are !is_null() only during their respective operation being
|
| // asynchronously executed.
|
|
|