gl: add necessary get_type() functions for allocation params structures
authorMatthew Waters <matthew@centricular.com>
Tue, 10 Jan 2017 08:58:48 +0000 (19:58 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:26 +0000 (19:32 +0000)
All using the existing GstGLAllocationParams infrastructure

gst-libs/gst/gl/gstglbasememory.c
gst-libs/gst/gl/gstglbasememory.h
gst-libs/gst/gl/gstglbuffer.c
gst-libs/gst/gl/gstglbuffer.h
gst-libs/gst/gl/gstglmemory.c
gst-libs/gst/gl/gstglmemory.h
gst-libs/gst/gl/gstglrenderbuffer.c
gst-libs/gst/gl/gstglrenderbuffer.h

index 4c663f8..0a01dfe 100644 (file)
@@ -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)
 {
index 622eef1..fea124a 100644 (file)
 
 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);
index d50fd6d..ba67e2d 100644 (file)
@@ -345,6 +345,11 @@ _gst_gl_buffer_allocation_params_free_data (GstGLBufferAllocationParams *
   gst_gl_allocation_params_free_data (&params->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
index f139f2d..01deb8a 100644 (file)
@@ -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)
 
 /**
index 31e102e..428b46a 100644 (file)
@@ -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)
index a7f488c..9a55b9d 100644 (file)
@@ -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)
index f21ef54..aca17c0 100644 (file)
@@ -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)
 {
index 5a9a1c0..b624120 100644 (file)
@@ -102,6 +102,9 @@ struct _GstGLRenderbufferAllocatorClass
 
 #include <gst/gl/gstglbasememory.h>
 
+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;