gst-play: missing cleanup for g_autoptr
authorDaniel Morin <daniel.morin@collabora.com>
Mon, 15 Aug 2022 02:31:29 +0000 (22:31 -0400)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 17 Aug 2022 06:52:00 +0000 (09:52 +0300)
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2888>

subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-media-info.h
subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-signal-adapter.h
subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-video-overlay-video-renderer.h
subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-video-renderer.h
subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay-visualization.h

index 6796a38..b78698a 100644 (file)
@@ -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);
 
index 4159ce2..da0082c 100644 (file)
@@ -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);
 
index 1390f9a..2d3b701 100644 (file)
@@ -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);
 
index d140ba6..802b57b 100644 (file)
@@ -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);
 
index 6f08bf5..4c9bc86 100644 (file)
@@ -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__ */