mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
gl: make all GObjects inherit from GstObject
Aids memory leak debugging with GST_TRACE=mem-live
This commit is contained in:
parent
6c1a4e30c4
commit
857200ff40
13 changed files with 21 additions and 20 deletions
|
@ -374,8 +374,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_gl_color_convert_debug);
|
||||||
#define DEBUG_INIT \
|
#define DEBUG_INIT \
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_gl_color_convert_debug, "glconvert", 0, "convert");
|
GST_DEBUG_CATEGORY_INIT (gst_gl_color_convert_debug, "glconvert", 0, "convert");
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstGLColorConvert, gst_gl_color_convert, G_TYPE_OBJECT,
|
G_DEFINE_TYPE_WITH_CODE (GstGLColorConvert, gst_gl_color_convert,
|
||||||
DEBUG_INIT);
|
GST_TYPE_OBJECT, DEBUG_INIT);
|
||||||
static void gst_gl_color_convert_finalize (GObject * object);
|
static void gst_gl_color_convert_finalize (GObject * object);
|
||||||
|
|
||||||
#define GST_GL_COLOR_CONVERT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
|
#define GST_GL_COLOR_CONVERT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
|
||||||
|
|
|
@ -44,7 +44,7 @@ GType gst_gl_color_convert_get_type (void);
|
||||||
struct _GstGLColorConvert
|
struct _GstGLColorConvert
|
||||||
{
|
{
|
||||||
/* <private> */
|
/* <private> */
|
||||||
GObject parent;
|
GstObject parent;
|
||||||
|
|
||||||
GMutex lock;
|
GMutex lock;
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ struct _GstGLColorConvert
|
||||||
*/
|
*/
|
||||||
struct _GstGLColorConvertClass
|
struct _GstGLColorConvertClass
|
||||||
{
|
{
|
||||||
GObjectClass object_class;
|
GstObjectClass object_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -122,7 +122,7 @@ load_gles2_module (gpointer user_data)
|
||||||
GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
|
GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
|
||||||
|
|
||||||
#define gst_gl_context_parent_class parent_class
|
#define gst_gl_context_parent_class parent_class
|
||||||
G_DEFINE_ABSTRACT_TYPE (GstGLContext, gst_gl_context, G_TYPE_OBJECT);
|
G_DEFINE_ABSTRACT_TYPE (GstGLContext, gst_gl_context, GST_TYPE_OBJECT);
|
||||||
|
|
||||||
#define GST_GL_CONTEXT_GET_PRIVATE(o) \
|
#define GST_GL_CONTEXT_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_CONTEXT, GstGLContextPrivate))
|
(G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_CONTEXT, GstGLContextPrivate))
|
||||||
|
|
|
@ -68,7 +68,7 @@ typedef enum
|
||||||
*/
|
*/
|
||||||
struct _GstGLContext {
|
struct _GstGLContext {
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GObject parent;
|
GstObject parent;
|
||||||
|
|
||||||
GstGLWindow *window;
|
GstGLWindow *window;
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ struct _GstGLContext {
|
||||||
* @swap_buffers: swap the default framebuffer's front/back buffers
|
* @swap_buffers: swap the default framebuffer's front/back buffers
|
||||||
*/
|
*/
|
||||||
struct _GstGLContextClass {
|
struct _GstGLContextClass {
|
||||||
GObjectClass parent_class;
|
GstObjectClass parent_class;
|
||||||
|
|
||||||
guintptr (*get_gl_context) (GstGLContext *context);
|
guintptr (*get_gl_context) (GstGLContext *context);
|
||||||
GstGLAPI (*get_gl_api) (GstGLContext *context);
|
GstGLAPI (*get_gl_api) (GstGLContext *context);
|
||||||
|
|
|
@ -55,7 +55,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_gl_display_debug);
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_gl_display_debug, "gldisplay", 0, "opengl display"); \
|
GST_DEBUG_CATEGORY_INIT (gst_gl_display_debug, "gldisplay", 0, "opengl display"); \
|
||||||
GST_DEBUG_CATEGORY_GET (gst_context, "GST_CONTEXT");
|
GST_DEBUG_CATEGORY_GET (gst_context, "GST_CONTEXT");
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstGLDisplay, gst_gl_display, G_TYPE_OBJECT,
|
G_DEFINE_TYPE_WITH_CODE (GstGLDisplay, gst_gl_display, GST_TYPE_OBJECT,
|
||||||
DEBUG_INIT);
|
DEBUG_INIT);
|
||||||
|
|
||||||
#define GST_GL_DISPLAY_GET_PRIVATE(o) \
|
#define GST_GL_DISPLAY_GET_PRIVATE(o) \
|
||||||
|
|
|
@ -67,7 +67,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_gl_download_debug);
|
||||||
#define DEBUG_INIT \
|
#define DEBUG_INIT \
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_gl_download_debug, "gldownload", 0, "download");
|
GST_DEBUG_CATEGORY_INIT (gst_gl_download_debug, "gldownload", 0, "download");
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstGLDownload, gst_gl_download, G_TYPE_OBJECT,
|
G_DEFINE_TYPE_WITH_CODE (GstGLDownload, gst_gl_download, GST_TYPE_OBJECT,
|
||||||
DEBUG_INIT);
|
DEBUG_INIT);
|
||||||
static void gst_gl_download_finalize (GObject * object);
|
static void gst_gl_download_finalize (GObject * object);
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ GType gst_gl_download_get_type (void);
|
||||||
struct _GstGLDownload
|
struct _GstGLDownload
|
||||||
{
|
{
|
||||||
/* <private> */
|
/* <private> */
|
||||||
GObject parent;
|
GstObject parent;
|
||||||
|
|
||||||
GMutex lock;
|
GMutex lock;
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ struct _GstGLDownload
|
||||||
struct _GstGLDownloadClass
|
struct _GstGLDownloadClass
|
||||||
{
|
{
|
||||||
/* <private> */
|
/* <private> */
|
||||||
GObjectClass object_class;
|
GstObjectClass object_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GstGLDownload * gst_gl_download_new (GstGLContext * context);
|
GstGLDownload * gst_gl_download_new (GstGLContext * context);
|
||||||
|
|
|
@ -115,7 +115,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_gl_shader_debug);
|
||||||
|
|
||||||
#define DEBUG_INIT \
|
#define DEBUG_INIT \
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_gl_shader_debug, "glshader", 0, "shader");
|
GST_DEBUG_CATEGORY_INIT (gst_gl_shader_debug, "glshader", 0, "shader");
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstGLShader, gst_gl_shader, G_TYPE_OBJECT, DEBUG_INIT);
|
G_DEFINE_TYPE_WITH_CODE (GstGLShader, gst_gl_shader, GST_TYPE_OBJECT,
|
||||||
|
DEBUG_INIT);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_cleanup_shader (GstGLContext * context, GstGLShader * shader)
|
_cleanup_shader (GstGLContext * context, GstGLShader * shader)
|
||||||
|
|
|
@ -48,7 +48,7 @@ typedef enum {
|
||||||
|
|
||||||
struct _GstGLShader {
|
struct _GstGLShader {
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GObject parent;
|
GstObject parent;
|
||||||
|
|
||||||
GstGLContext *context;
|
GstGLContext *context;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ struct _GstGLShader {
|
||||||
|
|
||||||
struct _GstGLShaderClass {
|
struct _GstGLShaderClass {
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GObjectClass parent_class;
|
GstObjectClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* methods */
|
/* methods */
|
||||||
|
|
|
@ -92,7 +92,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_gl_upload_debug);
|
||||||
#define DEBUG_INIT \
|
#define DEBUG_INIT \
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_gl_upload_debug, "glupload", 0, "upload");
|
GST_DEBUG_CATEGORY_INIT (gst_gl_upload_debug, "glupload", 0, "upload");
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstGLUpload, gst_gl_upload, G_TYPE_OBJECT, DEBUG_INIT);
|
G_DEFINE_TYPE_WITH_CODE (GstGLUpload, gst_gl_upload, GST_TYPE_OBJECT, DEBUG_INIT);
|
||||||
static void gst_gl_upload_finalize (GObject * object);
|
static void gst_gl_upload_finalize (GObject * object);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ GType gst_gl_upload_get_type (void);
|
||||||
struct _GstGLUpload
|
struct _GstGLUpload
|
||||||
{
|
{
|
||||||
/* <private> */
|
/* <private> */
|
||||||
GObject parent;
|
GstObject parent;
|
||||||
|
|
||||||
GMutex lock;
|
GMutex lock;
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ struct _GstGLUpload
|
||||||
*/
|
*/
|
||||||
struct _GstGLUploadClass
|
struct _GstGLUploadClass
|
||||||
{
|
{
|
||||||
GObjectClass object_class;
|
GstObjectClass object_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GstGLUpload * gst_gl_upload_new (GstGLContext * context);
|
GstGLUpload * gst_gl_upload_new (GstGLContext * context);
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
|
GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
|
||||||
|
|
||||||
#define gst_gl_window_parent_class parent_class
|
#define gst_gl_window_parent_class parent_class
|
||||||
G_DEFINE_ABSTRACT_TYPE (GstGLWindow, gst_gl_window, G_TYPE_OBJECT);
|
G_DEFINE_ABSTRACT_TYPE (GstGLWindow, gst_gl_window, GST_TYPE_OBJECT);
|
||||||
|
|
||||||
#define GST_GL_WINDOW_GET_PRIVATE(o) \
|
#define GST_GL_WINDOW_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_WINDOW, GstGLWindowPrivate))
|
(G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_WINDOW, GstGLWindowPrivate))
|
||||||
|
|
|
@ -64,7 +64,7 @@ typedef void (*GstGLWindowResizeCB) (gpointer data, guint width, guint height);
|
||||||
*/
|
*/
|
||||||
struct _GstGLWindow {
|
struct _GstGLWindow {
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GObject parent;
|
GstObject parent;
|
||||||
|
|
||||||
GMutex lock;
|
GMutex lock;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ struct _GstGLWindow {
|
||||||
* @close: close the connection to the display
|
* @close: close the connection to the display
|
||||||
*/
|
*/
|
||||||
struct _GstGLWindowClass {
|
struct _GstGLWindowClass {
|
||||||
GObjectClass parent_class;
|
GstObjectClass parent_class;
|
||||||
|
|
||||||
guintptr (*get_display) (GstGLWindow *window);
|
guintptr (*get_display) (GstGLWindow *window);
|
||||||
void (*set_window_handle) (GstGLWindow *window, guintptr id);
|
void (*set_window_handle) (GstGLWindow *window, guintptr id);
|
||||||
|
|
Loading…
Reference in a new issue