From a10b35c011b8291bae7b5da959f5a9d6b9a7cc0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 21 Feb 2022 14:23:27 +0200 Subject: [PATCH] gl: Mark GL memory GType functions as deprecated They can't be used in any useful way. The type of every GstMemory is always GST_TYPE_MEMORY and the subtyping relationship has to be implemented on top of that via the associated allocator and mem_type string. Part-of: --- .../gst-plugins-base/gst-libs/gst/gl/egl/gstglmemoryegl.c | 2 ++ .../gst-plugins-base/gst-libs/gst/gl/egl/gstglmemoryegl.h | 3 ++- .../gst-plugins-base/gst-libs/gst/gl/gstglbasememory.c | 2 ++ .../gst-plugins-base/gst-libs/gst/gl/gstglbasememory.h | 7 ++++++- subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbuffer.c | 2 ++ subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbuffer.h | 3 ++- subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.c | 2 ++ subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.h | 3 ++- .../gst-plugins-base/gst-libs/gst/gl/gstglmemorypbo.c | 2 ++ .../gst-plugins-base/gst-libs/gst/gl/gstglmemorypbo.h | 3 ++- .../gst-plugins-base/gst-libs/gst/gl/gstglrenderbuffer.c | 2 ++ .../gst-plugins-base/gst-libs/gst/gl/gstglrenderbuffer.h | 3 ++- 12 files changed, 28 insertions(+), 6 deletions(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglmemoryegl.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglmemoryegl.c index 9ab3c075d1..6813ece672 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglmemoryegl.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglmemoryegl.c @@ -55,7 +55,9 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_MEMORY); G_DEFINE_TYPE (GstGLMemoryEGLAllocator, gst_gl_memory_egl_allocator, GST_TYPE_GL_MEMORY_ALLOCATOR); +#ifndef GST_REMOVE_DEPRECATED GST_DEFINE_MINI_OBJECT_TYPE (GstGLMemoryEGL, gst_gl_memory_egl); +#endif /** * gst_is_gl_memory_egl: diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglmemoryegl.h b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglmemoryegl.h index 2ee8f1a72d..b8a18bee2b 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglmemoryegl.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglmemoryegl.h @@ -69,9 +69,10 @@ struct _GstGLMemoryEGL * GST_TYPE_GL_MEMORY_EGL: * * Since: 1.20 + * Deprecated: 1.22: This type has no use. */ #define GST_TYPE_GL_MEMORY_EGL (gst_gl_memory_egl_get_type()) -GST_GL_API +GST_GL_DEPRECATED GType gst_gl_memory_egl_get_type(void); GST_GL_API diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbasememory.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbasememory.c index 746bd307e3..e182eb618f 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbasememory.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbasememory.c @@ -51,7 +51,9 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_BASE_MEMORY); #define GST_CAT_DEFUALT GST_CAT_GL_BASE_MEMORY +#ifndef GST_REMOVE_DEPRECATED GST_DEFINE_MINI_OBJECT_TYPE (GstGLBaseMemory, gst_gl_base_memory); +#endif /** * gst_gl_base_memory_error_quark: diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbasememory.h b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbasememory.h index 7582cf9f66..198c6296e5 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbasememory.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbasememory.h @@ -29,8 +29,13 @@ G_BEGIN_DECLS +/** + * GST_TYPE_GL_BASE_MEMORY: + * + * Deprecated: 1.22: This type has no use. + */ #define GST_TYPE_GL_BASE_MEMORY (gst_gl_base_memory_get_type()) -GST_GL_API +GST_GL_DEPRECATED GType gst_gl_base_memory_get_type(void); #define GST_TYPE_GL_BASE_MEMORY_ALLOCATOR (gst_gl_base_memory_allocator_get_type()) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbuffer.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbuffer.c index f60c710e67..612d054a79 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbuffer.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbuffer.c @@ -84,7 +84,9 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_BUFFER); #define GST_CAT_DEFUALT GST_CAT_GL_BUFFER +#ifndef GST_REMOVE_DEPRECATED GST_DEFINE_MINI_OBJECT_TYPE (GstGLBuffer, gst_gl_buffer); +#endif static GstAllocator *_gl_buffer_allocator; diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbuffer.h b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbuffer.h index 4cc7f9b31e..860dce321a 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbuffer.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglbuffer.h @@ -135,9 +135,10 @@ struct _GstGLBufferAllocatorClass * GST_TYPE_GL_BUFFER: * * Since: 1.20 + * Deprecated: 1.22: This type has no use. */ #define GST_TYPE_GL_BUFFER (gst_gl_buffer_get_type()) -GST_GL_API +GST_GL_DEPRECATED GType gst_gl_buffer_get_type(void); GST_GL_API diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.c index dbc765a391..9cb078749b 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.c @@ -88,7 +88,9 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_MEMORY); G_DEFINE_TYPE (GstGLMemoryAllocator, gst_gl_memory_allocator, GST_TYPE_GL_BASE_MEMORY_ALLOCATOR); +#ifndef GST_REMOVE_DEPRECATED GST_DEFINE_MINI_OBJECT_TYPE (GstGLMemory, gst_gl_memory); +#endif typedef struct { diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.h b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.h index daea4d12a7..8dff4124ab 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemory.h @@ -253,9 +253,10 @@ struct _GstGLMemoryAllocatorClass * GST_TYPE_GL_MEMORY: * * Since: 1.20 + * Deprecated: 1.22: This type has no use. */ #define GST_TYPE_GL_MEMORY (gst_gl_memory_get_type()) -GST_GL_API +GST_GL_DEPRECATED GType gst_gl_memory_get_type(void); GST_GL_API diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemorypbo.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemorypbo.c index 13fdba38bb..c06f4baede 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemorypbo.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemorypbo.c @@ -104,7 +104,9 @@ static GstAllocator *_gl_allocator; G_DEFINE_TYPE (GstGLMemoryPBOAllocator, gst_gl_memory_pbo_allocator, GST_TYPE_GL_MEMORY_ALLOCATOR); +#ifndef GST_REMOVE_DEPRECATED GST_DEFINE_MINI_OBJECT_TYPE (GstGLMemoryPBO, gst_gl_memory_pbo); +#endif typedef struct { diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemorypbo.h b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemorypbo.h index f40ca4f5e2..7df55aec9d 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemorypbo.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglmemorypbo.h @@ -63,9 +63,10 @@ struct _GstGLMemoryPBO * GST_TYPE_GL_MEMORY_PBO * * Since: 1.20 + * Deprecated: 1.22: This type has no use. */ #define GST_TYPE_GL_MEMORY_PBO (gst_gl_memory_pbo_get_type()) -GST_GL_API +GST_GL_DEPRECATED GType gst_gl_memory_pbo_get_type(void); GST_GL_API diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglrenderbuffer.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglrenderbuffer.c index 189c11aa72..b438f5d68a 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglrenderbuffer.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglrenderbuffer.c @@ -59,7 +59,9 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_RENDERBUFFER); G_DEFINE_TYPE (GstGLRenderbufferAllocator, gst_gl_renderbuffer_allocator, GST_TYPE_GL_BASE_MEMORY_ALLOCATOR); +#ifndef GST_REMOVE_DEPRECATED GST_DEFINE_MINI_OBJECT_TYPE (GstGLRenderbuffer, gst_gl_renderbuffer); +#endif static guint _new_renderbuffer (GstGLContext * context, guint format, guint width, diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglrenderbuffer.h b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglrenderbuffer.h index f77528760d..46bdc75cda 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglrenderbuffer.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglrenderbuffer.h @@ -147,9 +147,10 @@ GstGLRenderbufferAllocationParams * gst_gl_renderbuffer_allocation_params_ne * GST_TYPE_GL_RENDERBUFFER: * * Since: 1.20 + * Deprecated: 1.22: This type has no use. */ #define GST_TYPE_GL_RENDERBUFFER (gst_gl_renderbuffer_get_type()) -GST_GL_API +GST_GL_DEPRECATED GType gst_gl_renderbuffer_get_type(void); GST_GL_API