| Index: content/common/gpu/media/vt_video_decode_accelerator_mac.h
|
| diff --git a/content/common/gpu/media/vt_video_decode_accelerator_mac.h b/content/common/gpu/media/vt_video_decode_accelerator_mac.h
|
| index 2d222163823e4e7cf603d444761741c4c131c059..e06d5e281df22f2152cff35c259376a9f0391b00 100644
|
| --- a/content/common/gpu/media/vt_video_decode_accelerator_mac.h
|
| +++ b/content/common/gpu/media/vt_video_decode_accelerator_mac.h
|
| @@ -18,6 +18,7 @@
|
| #include "base/threading/thread.h"
|
| #include "base/threading/thread_checker.h"
|
| #include "content/common/gpu/media/vt_mac.h"
|
| +#include "content/public/common/gpu_video_decode_accelerator_helpers.h"
|
| #include "media/filters/h264_parser.h"
|
| #include "media/video/h264_poc.h"
|
| #include "media/video/video_decode_accelerator.h"
|
| @@ -35,9 +36,9 @@ bool InitializeVideoToolbox();
|
| class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
|
| public:
|
| explicit VTVideoDecodeAccelerator(
|
| - const base::Callback<bool(void)>& make_context_current,
|
| - const base::Callback<
|
| - void(uint32_t, uint32_t, scoped_refptr<gl::GLImage>)>& bind_image);
|
| + const gpu_vda::MakeGLContextCurrentCallback& make_context_current_cb,
|
| + const gpu_vda::BindGLImageCallback& bind_image_cb);
|
| +
|
| ~VTVideoDecodeAccelerator() override;
|
|
|
| // VideoDecodeAccelerator implementation.
|
| @@ -49,7 +50,10 @@ class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
|
| void Flush() override;
|
| void Reset() override;
|
| void Destroy() override;
|
| - bool CanDecodeOnIOThread() override;
|
| + bool TryToSetupDecodeOnSeparateThread(
|
| + const base::WeakPtr<Client>& decode_client,
|
| + const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner)
|
| + override;
|
|
|
| // Called by OutputThunk() when VideoToolbox finishes decoding a frame.
|
| void Output(
|
| @@ -189,9 +193,8 @@ class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
|
| //
|
| // GPU thread state.
|
| //
|
| - base::Callback<bool(void)> make_context_current_;
|
| - base::Callback<void(uint32_t, uint32_t, scoped_refptr<gl::GLImage>)>
|
| - bind_image_;
|
| + gpu_vda::MakeGLContextCurrentCallback make_context_current_cb_;
|
| + gpu_vda::BindGLImageCallback bind_image_cb_;
|
| media::VideoDecodeAccelerator::Client* client_;
|
| State state_;
|
|
|
|
|