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

Unified Diff: content/common/gpu/media/gpu_video_decode_accelerator.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/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 eb6459b37c3e5c0ce87780f41a3c575aface7efe..00ae7d2ce657fea10a737664ad89831822bd9113 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/public/common/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"
@@ -75,19 +76,8 @@ class GpuVideoDecodeAccelerator
IPC::Message* init_done_msg);
private:
- typedef scoped_ptr<media::VideoDecodeAccelerator>(
- GpuVideoDecodeAccelerator::*CreateVDAFp)();
-
class MessageFilter;
- scoped_ptr<media::VideoDecodeAccelerator> CreateDXVAVDA();
- scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2VDA();
- scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2SliceVDA();
- scoped_ptr<media::VideoDecodeAccelerator> CreateVaapiVDA();
- scoped_ptr<media::VideoDecodeAccelerator> CreateVTVDA();
- scoped_ptr<media::VideoDecodeAccelerator> CreateOzoneVDA();
- scoped_ptr<media::VideoDecodeAccelerator> CreateAndroidVDA();
-
// We only allow self-delete, from OnWillDestroyStub(), after cleanup there.
~GpuVideoDecodeAccelerator() override;
@@ -110,11 +100,6 @@ class GpuVideoDecodeAccelerator
// Helper for replying to the creation request.
void SendCreateDecoderReply(IPC::Message* message, bool succeeded);
- // 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);
-
// Route ID to communicate with the host.
const int32_t host_route_id_;
@@ -126,9 +111,17 @@ class GpuVideoDecodeAccelerator
// The underlying VideoDecodeAccelerator.
scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_;
+ // Callback to return current GLContext, if available.
+ gpu_vda_helpers::GetGLContextCb 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_;
+ gpu_vda_helpers::MakeGLContextCurrentCb make_context_current_cb_;
+
+ // Callback to bind a GLImage to a given texture id and target.
+ gpu_vda_helpers::BindGLImageCb bind_image_cb_;
+
+ // Callback to return a WeakPtr to GLES2Decoder.
+ gpu_vda_helpers::GetGLES2DecoderCb get_gles2_decoder_cb_;
// The texture dimensions as requested by ProvidePictureBuffers().
gfx::Size texture_dimensions_;

Powered by Google App Engine
This is Rietveld 408576698