| Index: media/filters/gpu_video_decoder.h
|
| diff --git a/media/filters/gpu_video_decoder.h b/media/filters/gpu_video_decoder.h
|
| index 61c8b562a061a17d8ecf8cbfce48ff57cb5e0b9f..53201ac40032ad08bba55a6f32c5cb962fe0d3a0 100644
|
| --- a/media/filters/gpu_video_decoder.h
|
| +++ b/media/filters/gpu_video_decoder.h
|
| @@ -10,6 +10,7 @@
|
| #include <utility>
|
| #include <vector>
|
|
|
| +#include "base/memory/weak_ptr.h"
|
| #include "media/base/pipeline_status.h"
|
| #include "media/base/demuxer_stream.h"
|
| #include "media/base/video_decoder.h"
|
| @@ -130,9 +131,10 @@ class MEDIA_EXPORT GpuVideoDecoder
|
| void GetBufferData(int32 id, base::TimeDelta* timetamp,
|
| gfx::Rect* visible_rect, gfx::Size* natural_size);
|
|
|
| - // Set |vda_| and |weak_vda_| on the VDA thread (in practice the render
|
| - // thread).
|
| - void SetVDA(VideoDecodeAccelerator* vda);
|
| + // 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.
|
| @@ -163,6 +165,8 @@ class MEDIA_EXPORT GpuVideoDecoder
|
| // MessageLoop on which to fire callbacks and trampoline calls to this class
|
| // if they arrive on other loops.
|
| 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
|
|
|