From: Daniel Morin Date: Mon, 15 Aug 2022 02:31:29 +0000 (-0400) Subject: gst-play: missing cleanup for g_autoptr X-Git-Tag: 1.22.0~1090 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2fcf85796332f3332e6d6f403202d8535c8a203;p=platform%2Fupstream%2Fgstreamer.git gst-play: missing cleanup for g_autoptr Without this change cleanup function for g_autoptr is not defined for GstPlayMediaInfo, GstPlaySignalAdapter, GstPlayVideoRenderer, GstPlayVideoOverlayVideoRenderer and GstPlayVisualization. Cleanup function was defined in gstplay.h, but missing in other header files. Part-of: --- diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-media-info.h b/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-media-info.h index 6796a38..b78698a 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-media-info.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-media-info.h @@ -215,6 +215,10 @@ const gchar * gst_play_subtitle_info_get_language (const GstPlaySubtitleInfo* in typedef struct _GstPlayMediaInfo GstPlayMediaInfo; typedef struct _GstPlayMediaInfoClass GstPlayMediaInfoClass; +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPlayMediaInfo, g_object_unref) +#endif + GST_PLAY_API GType gst_play_media_info_get_type (void); diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-signal-adapter.h b/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-signal-adapter.h index 4159ce2..da0082c 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-signal-adapter.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-signal-adapter.h @@ -39,6 +39,10 @@ G_BEGIN_DECLS */ #define GST_PLAY_SIGNAL_ADAPTER_CAST(obj) ((GstPlaySignalAdapter*)(obj)) +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPlaySignalAdapter, g_object_unref) +#endif + GST_PLAY_API GType gst_play_signal_adapter_get_type (void); diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-video-overlay-video-renderer.h b/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-video-overlay-video-renderer.h index 1390f9a..2d3b701 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-video-overlay-video-renderer.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-video-overlay-video-renderer.h @@ -48,6 +48,10 @@ typedef struct _GstPlayVideoOverlayVideoRendererClass */ #define GST_PLAY_VIDEO_OVERLAY_VIDEO_RENDERER_CAST(obj) ((GstPlayVideoOverlayVideoRenderer*)(obj)) +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPlayVideoOverlayVideoRenderer, g_object_unref) +#endif + GST_PLAY_API GType gst_play_video_overlay_video_renderer_get_type (void); diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-video-renderer.h b/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-video-renderer.h index d140ba6..802b57b 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-video-renderer.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-video-renderer.h @@ -49,6 +49,10 @@ struct _GstPlayVideoRendererInterface { GstElement * (*create_video_sink) (GstPlayVideoRenderer * self, GstPlay * play); }; +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPlayVideoRenderer, g_object_unref) +#endif + GST_PLAY_API GType gst_play_video_renderer_get_type (void); diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-visualization.h b/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-visualization.h index 6f08bf5..4c9bc86 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-visualization.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-visualization.h @@ -56,6 +56,10 @@ GstPlayVisualization ** gst_play_visualizations_get (void); GST_PLAY_API void gst_play_visualizations_free (GstPlayVisualization **viss); +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPlayVisualization, gst_play_visualization_free) +#endif + G_END_DECLS #endif /* __GST_PLAY_VISUALIZATION_H__ */