core: Add g_autoptr() support to all types
authorXavier Claessens <xavier.claessens@collabora.com>
Tue, 10 Nov 2015 17:38:59 +0000 (12:38 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Mon, 14 Dec 2015 17:06:55 +0000 (12:06 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=754464

65 files changed:
gst/gstallocator.h
gst/gstatomicqueue.h
gst/gstbin.h
gst/gstbuffer.h
gst/gstbufferlist.h
gst/gstbus.h
gst/gstcaps.h
gst/gstcapsfeatures.h
gst/gstclock.h
gst/gstcontext.h
gst/gstcontrolbinding.h
gst/gstcontrolsource.h
gst/gstdatetime.h
gst/gstdevice.h
gst/gstdevicemonitor.h
gst/gstdeviceprovider.h
gst/gstdeviceproviderfactory.h
gst/gstelement.h
gst/gstelementfactory.h
gst/gstevent.h
gst/gstghostpad.h
gst/gstiterator.h
gst/gstmemory.h
gst/gstmessage.h
gst/gstobject.h
gst/gstpad.h
gst/gstpadtemplate.h
gst/gstparse.h
gst/gstpipeline.h
gst/gstplugin.h
gst/gstpluginfeature.h
gst/gstquery.h
gst/gstregistry.h
gst/gstsample.h
gst/gstsegment.h
gst/gststructure.h
gst/gstsystemclock.h
gst/gsttaglist.h
gst/gsttask.h
gst/gsttaskpool.h
gst/gsttoc.h
gst/gsttracer.h
gst/gsttracerfactory.h
gst/gsttypefindfactory.h
gst/gsturi.h
libs/gst/base/gstadapter.h
libs/gst/base/gstbaseparse.h
libs/gst/base/gstbasesink.h
libs/gst/base/gstbasesrc.h
libs/gst/base/gstbasetransform.h
libs/gst/base/gstcollectpads.h
libs/gst/base/gstdataqueue.h
libs/gst/base/gstflowcombiner.h
libs/gst/base/gstpushsrc.h
libs/gst/check/gsttestclock.h
libs/gst/controller/gstargbcontrolbinding.h
libs/gst/controller/gstdirectcontrolbinding.h
libs/gst/controller/gstinterpolationcontrolsource.h
libs/gst/controller/gstlfocontrolsource.h
libs/gst/controller/gsttimedvaluecontrolsource.h
libs/gst/controller/gsttriggercontrolsource.h
libs/gst/net/gstnetclientclock.h
libs/gst/net/gstnettimepacket.h
libs/gst/net/gstnettimeprovider.h
libs/gst/net/gstptpclock.h

index f0e84d8..8293620 100644 (file)
@@ -170,6 +170,10 @@ GstMemory *    gst_memory_new_wrapped  (GstMemoryFlags flags, gpointer data, gsi
                                         gsize offset, gsize size, gpointer user_data,
                                         GDestroyNotify notify);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAllocationParams, gst_allocation_params_free)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_ALLOCATOR_H__ */
index 3f674c3..a46e6ec 100644 (file)
@@ -53,6 +53,10 @@ gpointer           gst_atomic_queue_peek        (GstAtomicQueue* queue);
 
 guint              gst_atomic_queue_length      (GstAtomicQueue * queue);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAtomicQueue, gst_atomic_queue_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_ATOMIC_QUEUE_H__ */
index 33c8d98..c8ffeff 100644 (file)
@@ -198,6 +198,10 @@ GstIterator*       gst_bin_iterate_all_by_interface (GstBin *bin, GType iface);
 gboolean        gst_bin_recalculate_latency      (GstBin * bin);
 
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstBin, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 
index dd35db0..f52fe91 100644 (file)
@@ -614,6 +614,14 @@ const GstMetaInfo *gst_parent_buffer_meta_get_info (void);
 GstParentBufferMeta *gst_buffer_add_parent_buffer_meta (GstBuffer *buffer,
     GstBuffer *ref);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstBuffer, gst_buffer_unref)
+#endif
+
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstBufferPool, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_BUFFER_H__ */
index df5c0c4..0d3315b 100644 (file)
@@ -150,6 +150,10 @@ GstBufferList *          gst_buffer_list_copy_deep             (const GstBufferL
 
 #define gst_buffer_list_add(l,b) gst_buffer_list_insert((l),-1,(b));
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstBufferList, gst_buffer_list_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_BUFFER_LIST_H__ */
index d369682..ed49b2e 100644 (file)
@@ -179,6 +179,10 @@ void                    gst_bus_remove_signal_watch     (GstBus * bus);
 void                    gst_bus_enable_sync_message_emission (GstBus * bus);
 void                    gst_bus_disable_sync_message_emission (GstBus * bus);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstBus, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_BUS_H__ */
index 9b25030..b9d00dd 100644 (file)
@@ -501,6 +501,10 @@ GstCaps *         gst_caps_fixate                  (GstCaps *caps) G_GNUC_WARN_U
 gchar *           gst_caps_to_string               (const GstCaps *caps) G_GNUC_MALLOC;
 GstCaps *         gst_caps_from_string             (const gchar   *string) G_GNUC_WARN_UNUSED_RESULT;
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstCaps, gst_caps_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_CAPS_H__ */
index 618e43f..ba1e5c5 100644 (file)
@@ -79,6 +79,10 @@ void              gst_caps_features_add_id ( GstCapsFeatures * features, GQuark
 void              gst_caps_features_remove (GstCapsFeatures * features, const gchar * feature);
 void              gst_caps_features_remove_id (GstCapsFeatures * features, GQuark feature);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstCapsFeatures, gst_caps_features_free)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_CAPS_FEATURES_H__ */
index f81b27a..9c2f888 100644 (file)
@@ -575,6 +575,10 @@ gboolean                gst_clock_periodic_id_reinit    (GstClock * clock,
                                                          GstClockTime start_time,
                                                          GstClockTime interval);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstClock, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_CLOCK_H__ */
index 722bd29..d8a126c 100644 (file)
@@ -142,6 +142,10 @@ GstStructure *        gst_context_writable_structure       (GstContext * context
 
 gboolean              gst_context_is_persistent            (const GstContext * context);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstContext, gst_context_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_CONTEXT_H__ */
index f870d34..2f11f2e 100644 (file)
@@ -115,6 +115,10 @@ gboolean            gst_control_binding_get_g_value_array  (GstControlBinding *b
 
 void                gst_control_binding_set_disabled       (GstControlBinding * binding, gboolean disabled);
 gboolean            gst_control_binding_is_disabled        (GstControlBinding * binding);
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstControlBinding, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_CONTROL_BINDING_H__ */
index 655205b..b1b5b1b 100644 (file)
@@ -133,6 +133,14 @@ gboolean       gst_control_source_get_value             (GstControlSource *self,
 gboolean       gst_control_source_get_value_array       (GstControlSource *self, GstClockTime timestamp,
                                                          GstClockTime interval, guint n_values,
                                                          gdouble *values);
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstControlSource, gst_object_unref)
+#endif
+
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstValueArray, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_CONTROL_SOURCE_H__ */
index f2bfd02..2d579b9 100644 (file)
@@ -118,6 +118,10 @@ GstDateTime *   gst_date_time_ref                (GstDateTime * datetime);
 
 void            gst_date_time_unref              (GstDateTime * datetime);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDateTime, gst_date_time_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_DATE_TIME_H__ */
index 79eb908..f50efe2 100644 (file)
@@ -102,6 +102,10 @@ gboolean        gst_device_has_classes        (GstDevice * device,
                                                const gchar * classes);
 
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDevice, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_DEVICE_H__ */
index 4d9c014..5564130 100644 (file)
@@ -100,6 +100,10 @@ gchar **  gst_device_monitor_get_providers (GstDeviceMonitor * monitor);
 void      gst_device_monitor_set_show_all_devices (GstDeviceMonitor * monitor, gboolean show_all);
 gboolean  gst_device_monitor_get_show_all_devices (GstDeviceMonitor * monitor);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDeviceMonitor, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_DEVICE_MONITOR_H__ */
index 239faeb..a83447d 100644 (file)
@@ -144,6 +144,10 @@ const gchar * gst_device_provider_class_get_metadata       (GstDeviceProviderCla
 /* factory management */
 GstDeviceProviderFactory * gst_device_provider_get_factory (GstDeviceProvider * provider);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDeviceProvider, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_DEVICE_PROVIDER_H__ */
index edda736..8c7e24f 100644 (file)
@@ -85,6 +85,10 @@ gboolean      gst_device_provider_factory_has_classes (GstDeviceProviderFactory
 GList *       gst_device_provider_factory_list_get_device_providers (
                                                        GstRank minrank) G_GNUC_MALLOC;
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDeviceProviderFactory, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_DEVICE_PROVIDER_FACTORY_H__ */
index cb4f8b8..0bd92d0 100644 (file)
@@ -811,6 +811,10 @@ void                    gst_element_lost_state          (GstElement * element);
 /* factory management */
 GstElementFactory*      gst_element_get_factory         (GstElement *element);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstElement, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_ELEMENT_H__ */
index 17e55ce..788f1c7 100644 (file)
@@ -205,6 +205,10 @@ GList *       gst_element_factory_list_get_elements (GstElementFactoryListType t
 GList *       gst_element_factory_list_filter       (GList *list, const GstCaps *caps,
                                                      GstPadDirection direction,
                                                      gboolean subsetonly) G_GNUC_MALLOC;
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstElementFactory, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_ELEMENT_FACTORY_H__ */
index 4dc4447..e20c820 100644 (file)
@@ -563,6 +563,10 @@ void            gst_event_parse_toc_select      (GstEvent *event, gchar **uid);
 GstEvent*       gst_event_new_segment_done      (GstFormat format, gint64 position) G_GNUC_MALLOC;
 void            gst_event_parse_segment_done    (GstEvent *event, GstFormat *format, gint64 *position);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstEvent, gst_event_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_EVENT_H__ */
index cb09031..4e59ec0 100644 (file)
@@ -123,6 +123,14 @@ gboolean         gst_ghost_pad_activate_mode_default  (GstPad * pad, GstObject *
 gboolean         gst_ghost_pad_internal_activate_mode_default   (GstPad * pad, GstObject * parent,
                                                                  GstPadMode mode, gboolean active);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstGhostPad, gst_object_unref)
+#endif
+
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstProxyPad, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_GHOST_PAD_H__ */
index 264f197..6785672 100644 (file)
@@ -268,6 +268,10 @@ GstIteratorResult       gst_iterator_foreach            (GstIterator *it,
 gboolean                gst_iterator_find_custom        (GstIterator *it, GCompareFunc func,
                                                          GValue *elem, gpointer user_data);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstIterator, gst_iterator_free)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_ITERATOR_H__ */
index dc65c78..5d6edec 100644 (file)
@@ -362,6 +362,14 @@ GstMemory *    gst_memory_share        (GstMemory *mem, gssize offset, gssize si
 /* span memory */
 gboolean       gst_memory_is_span      (GstMemory *mem1, GstMemory *mem2, gsize *offset);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstMemory, gst_memory_unref)
+#endif
+
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAllocator, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_MEMORY_H__ */
index 7c99be5..1ea4085 100644 (file)
@@ -593,6 +593,10 @@ GstMessage *    gst_message_new_device_removed    (GstObject * src, GstDevice *
 void            gst_message_parse_device_removed  (GstMessage * message, GstDevice ** device);
 
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstMessage, gst_message_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_MESSAGE_H__ */
index b478f3b..f5b9b36 100644 (file)
@@ -265,6 +265,10 @@ gboolean        gst_object_get_g_value_array      (GstObject * object, const gch
 GstClockTime    gst_object_get_control_rate       (GstObject * object);
 void            gst_object_set_control_rate       (GstObject * object, GstClockTime control_rate);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstObject, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_OBJECT_H__ */
index 539dcfb..20fd9a2 100644 (file)
@@ -1433,6 +1433,10 @@ gboolean         gst_pad_query_default                   (GstPad *pad, GstObject *parent,
 gboolean               gst_pad_forward                         (GstPad *pad, GstPadForwardFunction forward,
                                                                 gpointer user_data);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPad, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_PAD_H__ */
index 636b143..9491647 100644 (file)
@@ -188,6 +188,10 @@ GstCaps*           gst_pad_template_get_caps               (GstPadTemplate *templ);
 
 void                    gst_pad_template_pad_created            (GstPadTemplate * templ, GstPad * pad);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPadTemplate, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_PAD_TEMPLATE_H__ */
index b1ec83d..c2456c9 100644 (file)
@@ -113,6 +113,10 @@ GstElement      * gst_parse_launchv_full (const gchar     ** argv,
                                           GstParseFlags      flags,
                                           GError          ** error) G_GNUC_MALLOC;
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstParseContext, gst_parse_context_free)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_PARSE_H__ */
index 73fdeb4..ee0efe0 100644 (file)
@@ -108,6 +108,10 @@ GstClockTime    gst_pipeline_get_latency        (GstPipeline *pipeline);
 void            gst_pipeline_set_auto_flush_bus (GstPipeline *pipeline, gboolean auto_flush);
 gboolean        gst_pipeline_get_auto_flush_bus (GstPipeline *pipeline);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPipeline, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_PIPELINE_H__ */
index ff6041f..67e8e59 100644 (file)
@@ -358,6 +358,10 @@ void                    gst_plugin_add_dependency_simple (GstPlugin   * plugin,
 
 void gst_plugin_list_free (GList *list);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPlugin, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_PLUGIN_H__ */
index 08abb73..38a489d 100644 (file)
@@ -139,6 +139,10 @@ gboolean        gst_plugin_feature_check_version        (GstPluginFeature *featu
 gint            gst_plugin_feature_rank_compare_func    (gconstpointer p1,
                                                         gconstpointer p2);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPluginFeature, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 
index e015bb0..9f7353c 100644 (file)
@@ -479,6 +479,10 @@ gboolean        gst_query_parse_context_type       (GstQuery * query, const gcha
 void            gst_query_set_context              (GstQuery *query, GstContext *context);
 void            gst_query_parse_context            (GstQuery *query, GstContext **context);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstQuery, gst_query_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_QUERY_H__ */
index d0a665b..d72f497 100644 (file)
@@ -99,6 +99,10 @@ gboolean                gst_registry_check_feature_version (GstRegistry *registr
                                                             guint        min_minor,
                                                             guint        min_micro);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstRegistry, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_REGISTRY_H__ */
index c451a4c..6637fa3 100644 (file)
@@ -137,6 +137,10 @@ gst_sample_copy (const GstSample * buf)
  */
 #define         gst_value_get_sample(v)         GST_SAMPLE_CAST (g_value_get_boxed(v))
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstSample, gst_sample_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_SAMPLE_H__ */
index 5487123..1fcfd4a 100644 (file)
@@ -246,6 +246,10 @@ gboolean     gst_segment_do_seek             (GstSegment * segment, gdouble rate
                                               GstSeekType stop_type, guint64 stop, gboolean * update);
 gboolean     gst_segment_is_equal            (const GstSegment * s0, const GstSegment * s1);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstSegment, gst_segment_free)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_SEGMENT_H__ */
index a2b7926..e746ab0 100644 (file)
@@ -336,6 +336,10 @@ gboolean              gst_structure_can_intersect (const GstStructure * struct1,
 GstStructure *        gst_structure_intersect     (const GstStructure * struct1,
                                                    const GstStructure * struct2) G_GNUC_MALLOC;
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstStructure, gst_structure_free)
+#endif
+
 G_END_DECLS
 
 #endif
index c142708..02105ee 100644 (file)
@@ -83,6 +83,10 @@ GType                   gst_system_clock_get_type       (void);
 GstClock*               gst_system_clock_obtain         (void);
 void                    gst_system_clock_set_default    (GstClock *new_clock);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstSystemClock, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_SYSTEM_CLOCK_H__ */
index b49893d..21ff06d 100644 (file)
@@ -1078,6 +1078,10 @@ gst_tag_list_copy (const GstTagList * taglist)
  */
 #define GST_TAG_PRIVATE_DATA                         "private-data"
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTagList, gst_tag_list_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_TAGLIST_H__ */
index 85117ff..c56cf5e 100644 (file)
@@ -194,6 +194,10 @@ gboolean        gst_task_pause          (GstTask *task);
 
 gboolean        gst_task_join           (GstTask *task);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTask, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_TASK_H__ */
index a1195dc..f8927c5 100644 (file)
@@ -96,6 +96,10 @@ void            gst_task_pool_join        (GstTaskPool *pool, gpointer id);
 
 void           gst_task_pool_cleanup     (GstTaskPool *pool);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTaskPool, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_TASK_POOL_H__ */
index cb77862..68f3a35 100644 (file)
@@ -184,6 +184,23 @@ GstTocEntry *      gst_toc_entry_get_parent              (GstTocEntry *entry);
 
 const gchar *      gst_toc_entry_type_get_nick     (GstTocEntryType type);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+static inline void
+_gst_autoptr_toc_unref (GstToc *toc)
+{
+  gst_toc_unref (toc);
+}
+
+static inline void
+_gst_autoptr_toc_entry_unref (GstTocEntry *entry)
+{
+  gst_toc_entry_unref (entry);
+}
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstToc, _gst_autoptr_toc_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTocEntry, _gst_autoptr_toc_entry_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_TOC_H__ */
index 8c8e5d4..a5953f2 100644 (file)
@@ -73,6 +73,10 @@ gboolean gst_tracer_register (GstPlugin * plugin, const gchar * name, GType type
 /* tracing module helpers */
 void gst_tracer_log_trace (GstStructure * s);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracer, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_TRACER_H__ */
index 8e9370c..09d357f 100644 (file)
@@ -50,6 +50,10 @@ GType           gst_tracer_factory_get_type          (void);
 GList *         gst_tracer_factory_get_list          (void);
 
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracerFactory, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_TRACER_FACTORY_H__ */
index 64238ce..02573f7 100644 (file)
@@ -57,6 +57,10 @@ gboolean        gst_type_find_factory_has_function      (GstTypeFindFactory *fac
 void            gst_type_find_factory_call_function     (GstTypeFindFactory *factory,
                                                          GstTypeFind *find);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTypeFindFactory, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_TYPE_FIND_FACTORY_H__ */
index a2d7823..6e1504c 100644 (file)
@@ -298,6 +298,10 @@ gst_uri_unref (GstUri * uri)
   gst_mini_object_unref (GST_MINI_OBJECT_CAST (uri));
 }
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstUri, gst_uri_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_URI_H__ */
index a5cfb68..bb8c77d 100644 (file)
@@ -82,6 +82,10 @@ gssize                  gst_adapter_masked_scan_uint32  (GstAdapter * adapter, g
 gssize                  gst_adapter_masked_scan_uint32_peek  (GstAdapter * adapter, guint32 mask,
                                                          guint32 pattern, gsize offset, gsize size, guint32 * value);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAdapter, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_ADAPTER_H__ */
index 94522cc..f3081ef 100644 (file)
@@ -349,6 +349,14 @@ void            gst_base_parse_merge_tags       (GstBaseParse  * parse,
                                                  GstTagList    * tags,
                                                  GstTagMergeMode mode);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstBaseParseFrame, gst_base_parse_frame_free)
+#endif
+
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstBaseParse, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_BASE_PARSE_H__ */
index f6e83e5..1df5d65 100644 (file)
@@ -254,6 +254,10 @@ GstClockReturn  gst_base_sink_wait_clock        (GstBaseSink *sink, GstClockTime
 GstFlowReturn   gst_base_sink_wait              (GstBaseSink *sink, GstClockTime time,
                                                  GstClockTimeDiff *jitter);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstBaseSink, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_BASE_SINK_H__ */
index 4ddfda9..a89c8a8 100644 (file)
@@ -272,6 +272,10 @@ void            gst_base_src_get_allocator    (GstBaseSrc *src,
                                                GstAllocationParams *params);
 
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstBaseSrc, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_BASE_SRC_H__ */
index ab795e8..2fe25ec 100644 (file)
@@ -317,6 +317,10 @@ void               gst_base_transform_reconfigure_sink (GstBaseTransform *trans);
 void           gst_base_transform_reconfigure_src  (GstBaseTransform *trans);
 gboolean gst_base_transform_update_src_caps (GstBaseTransform *trans,
                                              GstCaps *updated_caps);
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstBaseTransform, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_BASE_TRANSFORM_H__ */
index cfa29eb..0a73785 100644 (file)
@@ -410,6 +410,10 @@ gboolean        gst_collect_pads_query_default (GstCollectPads * pads, GstCollec
                                                 GstQuery * query, gboolean discard);
 
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstCollectPads, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_COLLECT_PADS_H__ */
index cc454f8..f1fd9be 100644 (file)
@@ -161,6 +161,10 @@ void           gst_data_queue_get_level      (GstDataQueue * queue, GstDataQueue
 
 void           gst_data_queue_limits_changed (GstDataQueue * queue);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDataQueue, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_DATA_QUEUE_H__ */
index 79e4bed..2ea3937 100644 (file)
@@ -60,6 +60,10 @@ void              gst_flow_combiner_reset (GstFlowCombiner * combiner);
 
 GType             gst_flow_combiner_get_type (void);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstFlowCombiner, gst_flow_combiner_free)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_FLOW_COMBINER_H__ */
index 768d4ba..dbee559 100644 (file)
@@ -84,6 +84,10 @@ struct _GstPushSrcClass {
 
 GType gst_push_src_get_type(void);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPushSrc, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_PUSH_SRC_H__ */
index af7a5f1..cccbae3 100644 (file)
@@ -114,6 +114,10 @@ guint         gst_test_clock_process_id_list (GstTestClock * test_clock,
 
 GstClockTime  gst_test_clock_id_list_get_latest_time (const GList * pending_list);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTestClock, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_TEST_CLOCK_H__ */
index 6b51197..c698b07 100644 (file)
@@ -93,6 +93,10 @@ GstControlBinding * gst_argb_control_binding_new   (GstObject * object, const gc
                                                             GstControlSource * cs_a, GstControlSource * cs_r,
                                                             GstControlSource * cs_g, GstControlSource * cs_b);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstARGBControlBinding, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_ARGB_CONTROL_BINDING_H__ */
index 0ee354b..5732ad8 100644 (file)
@@ -119,6 +119,10 @@ GstControlBinding * gst_direct_control_binding_new (GstObject * object, const gc
 GstControlBinding * gst_direct_control_binding_new_absolute (GstObject * object, const gchar * property_name, 
                                                     GstControlSource * cs);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDirectControlBinding, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_DIRECT_CONTROL_BINDING_H__ */
index c194517..bb3d78d 100644 (file)
@@ -97,6 +97,10 @@ GType gst_interpolation_mode_get_type (void);
 
 GstControlSource * gst_interpolation_control_source_new (void);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstInterpolationControlSource, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_INTERPOLATION_CONTROL_SOURCE_H__ */
index 337ab53..8724229 100644 (file)
@@ -95,6 +95,10 @@ GType gst_lfo_waveform_get_type (void);
 
 GstControlSource *gst_lfo_control_source_new (void);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstLFOControlSource, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_LFO_CONTROL_SOURCE_H__ */
index 04dd464..bfc5b07 100644 (file)
@@ -135,6 +135,10 @@ GList *         gst_timed_value_control_source_get_all        (GstTimedValueCont
 gint            gst_timed_value_control_source_get_count      (GstTimedValueControlSource * self);
 void            gst_timed_value_control_invalidate_cache      (GstTimedValueControlSource * self);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTimedValueControlSource, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_TIMED_VALUE_CONTROL_SOURCE_H__ */
index 16e3ac9..2e9f21c 100644 (file)
@@ -78,6 +78,10 @@ GType gst_trigger_control_source_get_type (void);
 
 GstControlSource *gst_trigger_control_source_new (void);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTriggerControlSource, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_TRIGGER_CONTROL_SOURCE_H__ */
index 0839d73..47850f5 100644 (file)
@@ -91,6 +91,14 @@ GType           gst_ntp_clock_get_type               (void);
 GstClock*      gst_ntp_clock_new               (const gchar *name, const gchar *remote_address,
                                                  gint remote_port, GstClockTime base_time);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNetClientClock, gst_object_unref)
+#endif
+
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNtpClock, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_NET_CLIENT_CLOCK_H__ */
index 3f82264..cccf191 100644 (file)
@@ -64,6 +64,10 @@ gboolean                gst_net_time_packet_send        (const GstNetTimePacket
                                                          GSocketAddress         * dest_address,
                                                          GError                ** error);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNetTimePacket, gst_net_time_packet_free)
+#endif
+
 G_END_DECLS
 
 
index d9834c2..f730d9e 100644 (file)
@@ -68,6 +68,10 @@ GstNetTimeProvider*     gst_net_time_provider_new       (GstClock *clock,
                                                          const gchar *address,
                                                          gint port);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNetTimeProvider, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 
index 7a85cab..1e69177 100644 (file)
@@ -143,6 +143,10 @@ void            gst_ptp_statistics_callback_remove (gulong id);
 GstClock*       gst_ptp_clock_new                  (const gchar *name,
                                                     guint domain);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPtpClock, gst_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GST_PTP_CLOCK_H__ */