Index: content/common/gpu/media/gpu_video_decode_accelerator.h |
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.h b/content/common/gpu/media/gpu_video_decode_accelerator.h |
index 541271f3451562180f9f9b45e92c96de68f46799..accbb946f82e35500d1d767cd0b3920749854a17 100644 |
--- a/content/common/gpu/media/gpu_video_decode_accelerator.h |
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.h |
@@ -16,6 +16,7 @@ |
#include "base/memory/shared_memory.h" |
#include "base/synchronization/waitable_event.h" |
#include "content/common/gpu/gpu_command_buffer_stub.h" |
+#include "content/common/gpu/media/gpu_video_decode_accelerator_helpers.h" |
#include "gpu/command_buffer/service/texture_manager.h" |
#include "gpu/config/gpu_info.h" |
#include "ipc/ipc_listener.h" |
@@ -77,31 +78,8 @@ class GpuVideoDecodeAccelerator |
bool Initialize(const media::VideoDecodeAccelerator::Config& config); |
private: |
- typedef scoped_ptr<media::VideoDecodeAccelerator> ( |
- GpuVideoDecodeAccelerator::*CreateVDAFp)(); |
- |
class MessageFilter; |
-#if defined(OS_WIN) |
- scoped_ptr<media::VideoDecodeAccelerator> CreateDXVAVDA(); |
-#endif |
-#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) |
- scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2VDA(); |
- scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2SliceVDA(); |
-#endif |
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
- scoped_ptr<media::VideoDecodeAccelerator> CreateVaapiVDA(); |
-#endif |
-#if defined(OS_MACOSX) |
- scoped_ptr<media::VideoDecodeAccelerator> CreateVTVDA(); |
-#endif |
-#if !defined(OS_CHROMEOS) && defined(USE_OZONE) |
- scoped_ptr<media::VideoDecodeAccelerator> CreateOzoneVDA(); |
-#endif |
-#if defined(OS_ANDROID) |
- scoped_ptr<media::VideoDecodeAccelerator> CreateAndroidVDA(); |
-#endif |
- |
// We only allow self-delete, from OnWillDestroyStub(), after cleanup there. |
~GpuVideoDecodeAccelerator() override; |
@@ -121,13 +99,6 @@ class GpuVideoDecodeAccelerator |
// Sets the texture to cleared. |
void SetTextureCleared(const media::Picture& picture); |
-#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX) |
- // Helper to bind |image| to the texture specified by |client_texture_id|. |
- void BindImage(uint32_t client_texture_id, |
- uint32_t texture_target, |
- scoped_refptr<gl::GLImage> image); |
-#endif |
- |
// Helper function to call NotifyError in the |child_task_runner_| thread. |
void CallOrPostNotifyError(media::VideoDecodeAccelerator::Error error); |
@@ -142,9 +113,17 @@ class GpuVideoDecodeAccelerator |
// The underlying VideoDecodeAccelerator. |
scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; |
+ // Callback to return current GLContext, if available. |
+ GetGLContextCallback get_gl_context_cb_; |
+ |
// Callback for making the relevant context current for GL calls. |
- // Returns false if failed. |
- base::Callback<bool(void)> make_context_current_; |
+ MakeGLContextCurrentCallback make_context_current_cb_; |
+ |
+ // Callback to bind a GLImage to a given texture id and target. |
+ BindGLImageCallback bind_image_cb_; |
+ |
+ // Callback to return a WeakPtr to GLES2Decoder. |
+ GetGLES2DecoderCallback get_gles2_decoder_cb_; |
// The texture dimensions as requested by ProvidePictureBuffers(). |
gfx::Size texture_dimensions_; |