From 9514340d2db0432e71eef74578057ed21e3af8dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 20 May 2021 13:47:11 +0200 Subject: [PATCH] libs: va: display: Handle auto clean up macros. Add G_DEFINE_AUTOPTR_CLEANUP_FUNC macro for display classes, so auto pointers are possible to users. Part-of: --- gst-libs/gst/va/gstvadisplay.h | 2 ++ gst-libs/gst/va/gstvadisplay_drm.h | 2 ++ gst-libs/gst/va/gstvadisplay_wrapped.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/gst-libs/gst/va/gstvadisplay.h b/gst-libs/gst/va/gstvadisplay.h index a4f4fcb..3db6955 100644 --- a/gst-libs/gst/va/gstvadisplay.h +++ b/gst-libs/gst/va/gstvadisplay.h @@ -73,6 +73,8 @@ typedef enum #define GST_IS_VA_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VA_DISPLAY)) #define GST_VA_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_VA_DISPLAY, GstVaDisplayClass)) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaDisplay, gst_object_unref) + /** * GstVaDisplay: * @parent: parent #GstObject diff --git a/gst-libs/gst/va/gstvadisplay_drm.h b/gst-libs/gst/va/gstvadisplay_drm.h index 6cf9326..496e893 100644 --- a/gst-libs/gst/va/gstvadisplay_drm.h +++ b/gst-libs/gst/va/gstvadisplay_drm.h @@ -31,6 +31,8 @@ G_BEGIN_DECLS #define GST_IS_VA_DISPLAY_DRM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VA_DISPLAY_DRM)) #define GST_VA_DISPLAY_DRM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_VA_DISPLAY_DRM, GstVaDisplayDrmClass)) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaDisplayDrm, gst_object_unref) + GST_VA_API GType gst_va_display_drm_get_type (void); GST_VA_API diff --git a/gst-libs/gst/va/gstvadisplay_wrapped.h b/gst-libs/gst/va/gstvadisplay_wrapped.h index 7634f13..8a7945b 100644 --- a/gst-libs/gst/va/gstvadisplay_wrapped.h +++ b/gst-libs/gst/va/gstvadisplay_wrapped.h @@ -31,6 +31,8 @@ G_BEGIN_DECLS #define GST_IS_VA_DISPLAY_WRAPPED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VA_DISPLAY_WRAPPED)) #define GST_VA_DISPLAY_WRAPPED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_VA_DISPLAY_WRAPPED, GstVaDisplayWrappedClass)) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaDisplayWrapped, gst_object_unref) + GST_VA_API GType gst_va_display_wrapped_get_type (void); GST_VA_API -- 2.7.4