gl: add get_type() implementations for all of our memory types
authorMatthew Waters <matthew@centricular.com>
Wed, 6 Jan 2021 00:16:18 +0000 (11:16 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 13 Jan 2021 13:40:58 +0000 (13:40 +0000)
Otherwise, various bindings can't really know the type of an object as
required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/999>

gst-libs/gst/gl/egl/gstglmemoryegl.c
gst-libs/gst/gl/egl/gstglmemoryegl.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/gstglmemorypbo.c
gst-libs/gst/gl/gstglmemorypbo.h
gst-libs/gst/gl/gstglrenderbuffer.c
gst-libs/gst/gl/gstglrenderbuffer.h

index 84b07c9..15a57bd 100644 (file)
@@ -55,6 +55,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_MEMORY);
 G_DEFINE_TYPE (GstGLMemoryEGLAllocator, gst_gl_memory_egl_allocator,
     GST_TYPE_GL_MEMORY_ALLOCATOR);
 
+GST_DEFINE_MINI_OBJECT_TYPE (GstGLMemoryEGL, gst_gl_memory_egl);
+
 /**
  * gst_is_gl_memory_egl:
  * @mem: a #GstMemory to test
index a45b6f9..2891f1f 100644 (file)
@@ -65,6 +65,15 @@ struct _GstGLMemoryEGL
  */
 #define GST_GL_MEMORY_EGL_ALLOCATOR_NAME "GLMemoryEGL"
 
+/**
+ * GST_TYPE_GL_MEMORY_EGL:
+ *
+ * Since: 1.18.3
+ */
+#define GST_TYPE_GL_MEMORY_EGL (gst_gl_memory_egl_get_type())
+GST_GL_API
+GType gst_gl_memory_egl_get_type(void);
+
 GST_GL_API
 void          gst_gl_memory_egl_init_once               (void);
 
index 5a45007..52d1ece 100644 (file)
@@ -70,6 +70,8 @@
 GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_BUFFER);
 #define GST_CAT_DEFUALT GST_CAT_GL_BUFFER
 
+GST_DEFINE_MINI_OBJECT_TYPE (GstGLBuffer, gst_gl_buffer);
+
 static GstAllocator *_gl_buffer_allocator;
 
 static gboolean
index 883e8c8..c14a585 100644 (file)
@@ -131,6 +131,15 @@ struct _GstGLBufferAllocatorClass
  */
 #define GST_GL_BUFFER_ALLOCATOR_NAME   "GLBuffer"
 
+/**
+ * GST_TYPE_GL_BUFFER:
+ *
+ * Since: 1.18.3
+ */
+#define GST_TYPE_GL_BUFFER (gst_gl_buffer_get_type())
+GST_GL_API
+GType gst_gl_buffer_get_type(void);
+
 GST_GL_API
 void          gst_gl_buffer_init_once (void);
 GST_GL_API
index 76c04eb..fa0a1fb 100644 (file)
@@ -88,6 +88,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_MEMORY);
 G_DEFINE_TYPE (GstGLMemoryAllocator, gst_gl_memory_allocator,
     GST_TYPE_GL_BASE_MEMORY_ALLOCATOR);
 
+GST_DEFINE_MINI_OBJECT_TYPE (GstGLMemory, gst_gl_memory);
+
 typedef struct
 {
   /* in */
index 78a6579..d51504c 100644 (file)
@@ -249,6 +249,15 @@ struct _GstGLMemoryAllocatorClass
  */
 #define GST_GL_MEMORY_ALLOCATOR_NAME   "GLMemory"
 
+/**
+ * GST_TYPE_GL_MEMORY:
+ *
+ * Since: 1.18.3
+ */
+#define GST_TYPE_GL_MEMORY (gst_gl_memory_get_type())
+GST_GL_API
+GType gst_gl_memory_get_type(void);
+
 GST_GL_API
 void            gst_gl_memory_init_once (void);
 GST_GL_API
index 260f193..04c1237 100644 (file)
@@ -104,6 +104,8 @@ static GstAllocator *_gl_allocator;
 G_DEFINE_TYPE (GstGLMemoryPBOAllocator, gst_gl_memory_pbo_allocator,
     GST_TYPE_GL_MEMORY_ALLOCATOR);
 
+GST_DEFINE_MINI_OBJECT_TYPE (GstGLMemoryPBO, gst_gl_memory_pbo);
+
 typedef struct
 {
   /* in */
index afba59c..3bc7d3f 100644 (file)
@@ -59,6 +59,15 @@ struct _GstGLMemoryPBO
  */
 #define GST_GL_MEMORY_PBO_ALLOCATOR_NAME   "GLMemoryPBO"
 
+/**
+ * GST_TYPE_GL_MEMORY_PBO
+ *
+ * Since: 1.18.3
+ */
+#define GST_TYPE_GL_MEMORY_PBO (gst_gl_memory_pbo_get_type())
+GST_GL_API
+GType gst_gl_memory_pbo_get_type(void);
+
 GST_GL_API
 void          gst_gl_memory_pbo_init_once               (void);
 GST_GL_API
index 4399c7e..ef5ce29 100644 (file)
@@ -59,6 +59,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_RENDERBUFFER);
 G_DEFINE_TYPE (GstGLRenderbufferAllocator, gst_gl_renderbuffer_allocator,
     GST_TYPE_GL_BASE_MEMORY_ALLOCATOR);
 
+GST_DEFINE_MINI_OBJECT_TYPE (GstGLRenderbuffer, gst_gl_renderbuffer);
+
 static guint
 _new_renderbuffer (GstGLContext * context, guint format, guint width,
     guint height)
index cffe44c..84be319 100644 (file)
@@ -143,6 +143,15 @@ GstGLRenderbufferAllocationParams *     gst_gl_renderbuffer_allocation_params_ne
                                                                                              gpointer user_data,
                                                                                              GDestroyNotify notify);
 
+/**
+ * GST_TYPE_GL_RENDERBUFFER:
+ *
+ * Since: 1.18.3
+ */
+#define GST_TYPE_GL_RENDERBUFFER (gst_gl_renderbuffer_get_type())
+GST_GL_API
+GType gst_gl_renderbuffer_get_type(void);
+
 GST_GL_API
 void            gst_gl_renderbuffer_init_once   (void);