Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Unified Diff: content/common/gpu/media/vt_video_decode_accelerator_mac.h

Issue 1745903002: Introduce GpuVideoDecodeAcceleratorFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;

Powered by Google App Engine
This is Rietveld 408576698