From a1f2da88bffbb85baa566612d314c50e89c92055 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 10 Jan 2017 19:58:48 +1100 Subject: [PATCH] gl: add necessary get_type() functions for allocation params structures All using the existing GstGLAllocationParams infrastructure --- docs/libs/gst-plugins-bad-libs.types | 7 +++++-- gst-libs/gst/gl/gstglbasememory.c | 2 ++ gst-libs/gst/gl/gstglbasememory.h | 4 ++++ gst-libs/gst/gl/gstglbuffer.c | 5 +++++ gst-libs/gst/gl/gstglbuffer.h | 4 ++++ gst-libs/gst/gl/gstglmemory.c | 4 ++++ gst-libs/gst/gl/gstglmemory.h | 5 +++++ gst-libs/gst/gl/gstglrenderbuffer.c | 5 +++++ gst-libs/gst/gl/gstglrenderbuffer.h | 3 +++ 9 files changed, 37 insertions(+), 2 deletions(-) diff --git a/docs/libs/gst-plugins-bad-libs.types b/docs/libs/gst-plugins-bad-libs.types index ff31ee9dc8..6d5a82b357 100644 --- a/docs/libs/gst-plugins-bad-libs.types +++ b/docs/libs/gst-plugins-bad-libs.types @@ -39,11 +39,14 @@ gst_mpegts_stream_type_get_type gst_insert_bin_get_type -gst_gl_buffer_allocator_get_type -gst_gl_base_memory_allocator_get_type gst_gl_allocation_params_get_type +gst_gl_base_memory_allocator_get_type +gst_gl_buffer_allocation_params_get_type +gst_gl_buffer_allocator_get_type +gst_gl_video_allocation_params_get_type gst_gl_memory_allocator_get_type gst_gl_memory_pbo_allocator_get_type +gst_gl_renderbuffer_allocation_params_get_type gst_gl_renderbuffer_allocator_get_type gst_gl_base_filter_get_type gst_gl_buffer_pool_get_type diff --git a/gst-libs/gst/gl/gstglbasememory.c b/gst-libs/gst/gl/gstglbasememory.c index 4c663f8dc5..0a01dfeafc 100644 --- a/gst-libs/gst/gl/gstglbasememory.c +++ b/gst-libs/gst/gl/gstglbasememory.c @@ -46,6 +46,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_BASE_MEMORY); #define GST_CAT_DEFUALT GST_CAT_GL_BASE_MEMORY +GST_DEFINE_MINI_OBJECT_TYPE (GstGLBaseMemory, gst_gl_base_memory); + GQuark gst_gl_base_memory_error_quark (void) { diff --git a/gst-libs/gst/gl/gstglbasememory.h b/gst-libs/gst/gl/gstglbasememory.h index 622eef1107..fea124aa23 100644 --- a/gst-libs/gst/gl/gstglbasememory.h +++ b/gst-libs/gst/gl/gstglbasememory.h @@ -29,6 +29,10 @@ G_BEGIN_DECLS +#define GST_TYPE_GL_BASE_MEMORY (gst_gl_base_memory_get_type()) +GST_EXPORT +GType gst_gl_base_memory_get_type(void); + #define GST_TYPE_GL_BASE_MEMORY_ALLOCATOR (gst_gl_base_memory_allocator_get_type()) GST_EXPORT GType gst_gl_base_memory_allocator_get_type(void); diff --git a/gst-libs/gst/gl/gstglbuffer.c b/gst-libs/gst/gl/gstglbuffer.c index d50fd6d0b9..ba67e2d62f 100644 --- a/gst-libs/gst/gl/gstglbuffer.c +++ b/gst-libs/gst/gl/gstglbuffer.c @@ -345,6 +345,11 @@ _gst_gl_buffer_allocation_params_free_data (GstGLBufferAllocationParams * gst_gl_allocation_params_free_data (¶ms->parent); } +G_DEFINE_BOXED_TYPE (GstGLBufferAllocationParams, + gst_gl_buffer_allocation_params, + (GBoxedCopyFunc) gst_gl_allocation_params_copy, + (GBoxedFreeFunc) gst_gl_allocation_params_free); + /** * gst_gl_buffer_allocation_params_new: * @context: a #GstGLContext diff --git a/gst-libs/gst/gl/gstglbuffer.h b/gst-libs/gst/gl/gstglbuffer.h index f139f2d17d..01deb8a8c7 100644 --- a/gst-libs/gst/gl/gstglbuffer.h +++ b/gst-libs/gst/gl/gstglbuffer.h @@ -60,6 +60,10 @@ struct _GstGLBuffer typedef struct _GstGLBufferAllocationParams GstGLBufferAllocationParams; +#define GST_TYPE_GL_BUFFER_ALLOCATION_PARAMS (gst_gl_buffer_allocation_params_get_type()) +GST_EXPORT +GType gst_gl_buffer_allocation_params_get_type (void); + #define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER (1 << 4) /** diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c index 31e102e32b..428b46a05d 100644 --- a/gst-libs/gst/gl/gstglmemory.c +++ b/gst-libs/gst/gl/gstglmemory.c @@ -1043,6 +1043,10 @@ gst_is_gl_memory (GstMemory * mem) GST_TYPE_GL_MEMORY_ALLOCATOR); } +G_DEFINE_BOXED_TYPE (GstGLVideoAllocationParams, gst_gl_video_allocation_params, + (GBoxedCopyFunc) gst_gl_allocation_params_copy, + (GBoxedFreeFunc) gst_gl_allocation_params_free); + static void _gst_gl_video_allocation_params_set_video_alignment (GstGLVideoAllocationParams * params, GstVideoAlignment * valign) diff --git a/gst-libs/gst/gl/gstglmemory.h b/gst-libs/gst/gl/gstglmemory.h index a7f488c278..9a55b9df56 100644 --- a/gst-libs/gst/gl/gstglmemory.h +++ b/gst-libs/gst/gl/gstglmemory.h @@ -83,6 +83,11 @@ struct _GstGLMemory gpointer _padding[GST_PADDING]; }; + +#define GST_TYPE_GL_VIDEO_ALLOCATION_PARAMS (gst_gl_video_allocation_params_get_type()) +GST_EXPORT +GType gst_gl_video_allocation_params_get_type (void); + typedef struct _GstGLVideoAllocationParams GstGLVideoAllocationParams; #define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO (1 << 3) diff --git a/gst-libs/gst/gl/gstglrenderbuffer.c b/gst-libs/gst/gl/gstglrenderbuffer.c index f21ef54a49..aca17c050a 100644 --- a/gst-libs/gst/gl/gstglrenderbuffer.c +++ b/gst-libs/gst/gl/gstglrenderbuffer.c @@ -334,6 +334,11 @@ gst_is_gl_renderbuffer (GstMemory * mem) GST_TYPE_GL_RENDERBUFFER_ALLOCATOR); } +G_DEFINE_BOXED_TYPE (GstGLRenderbufferAllocationParams, + gst_gl_renderbuffer_allocation_params, + (GBoxedCopyFunc) gst_gl_allocation_params_copy, + (GBoxedFreeFunc) gst_gl_allocation_params_free); + static void _gst_gl_rb_alloc_params_free_data (GstGLRenderbufferAllocationParams * params) { diff --git a/gst-libs/gst/gl/gstglrenderbuffer.h b/gst-libs/gst/gl/gstglrenderbuffer.h index 5a9a1c07b9..b624120cab 100644 --- a/gst-libs/gst/gl/gstglrenderbuffer.h +++ b/gst-libs/gst/gl/gstglrenderbuffer.h @@ -102,6 +102,9 @@ struct _GstGLRenderbufferAllocatorClass #include +GType gst_gl_renderbuffer_allocation_params_get_type (void); +#define GST_TYPE_RENDERBUFFER_ALLOCATION_PARAMS (gst_gl_renderbuffer_allocation_params_get_type) + typedef struct { GstGLAllocationParams parent;