From: Víctor Manuel Jáquez Leal Date: Thu, 20 May 2021 11:47:11 +0000 (+0200) Subject: libs: va: display: Handle auto clean up macros. X-Git-Tag: 1.19.3~507^2~359 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9514340d2db0432e71eef74578057ed21e3af8dd;p=platform%2Fupstream%2Fgstreamer.git 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: --- 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