mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
gl: add get_type() implementations for all of our memory types
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>
This commit is contained in:
parent
f5d971a19e
commit
b60951a4fa
10 changed files with 55 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue