GstStream/GstStreamCollection: add g_autoptr() support
authorBrendan Shanks <brendan.shanks@teradek.com>
Thu, 26 Jan 2017 23:32:31 +0000 (15:32 -0800)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 27 Jan 2017 00:07:51 +0000 (00:07 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=777810

gst/gststreamcollection.h
gst/gststreams.h

index 49734bd..c1b8caa 100644 (file)
@@ -103,6 +103,10 @@ GstStream *gst_stream_collection_get_stream (GstStreamCollection *collection, gu
 gboolean gst_stream_collection_add_stream (GstStreamCollection *collection,
                                            GstStream *stream);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstStreamCollection, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_STREAM_COLLECTION_H__ */
index 2df1c76..4cd1858 100644 (file)
@@ -130,6 +130,11 @@ void     gst_stream_set_caps (GstStream *stream, GstCaps *caps);
 GstCaps *gst_stream_get_caps (GstStream *stream);
 
 const gchar *gst_stream_type_get_name (GstStreamType stype);
+
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstStream, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_STREAMS_H__ */