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..a1a93644cc180081699f2bd6033f5a2a576c785a 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_helpers::MakeGLContextCurrentCb& make_context_current_cb, |
+ const gpu_vda_helpers::BindGLImageCb& 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 TryInitializeDecodeOnSeparateThread( |
+ 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_helpers::MakeGLContextCurrentCb make_context_current_cb_; |
+ gpu_vda_helpers::BindGLImageCb bind_image_cb_; |
media::VideoDecodeAccelerator::Client* client_; |
State state_; |