From 3efb73c1214e2e14a0548ba340161bec8b20c18b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 17 Dec 2010 19:14:41 +0100 Subject: [PATCH] gst: documentation fixups and annotation Reported by enabling the --warn-all option of g-ir-scanner --- gst/gstbufferlist.c | 2 +- gst/gstclock.c | 6 +++--- gst/gstelement.c | 6 +++--- gst/gstobject.c | 2 +- gst/gstpad.c | 2 +- gst/gstplugin.c | 9 +++++---- gst/gsttaglist.c | 2 +- gst/gstutils.c | 7 ++++--- 8 files changed, 19 insertions(+), 17 deletions(-) diff --git a/gst/gstbufferlist.c b/gst/gstbufferlist.c index 46a44590..358b5d1 100644 --- a/gst/gstbufferlist.c +++ b/gst/gstbufferlist.c @@ -300,7 +300,7 @@ gst_buffer_list_n_groups (GstBufferList * list) /** * gst_buffer_list_foreach: * @list: a #GstBufferList - * @func: a #GstBufferListFunc to call + * @func: (scope call): a #GstBufferListFunc to call * @user_data: user data passed to @func * * Call @func with @data for each buffer in @list. diff --git a/gst/gstclock.c b/gst/gstclock.c index 125998b..181e2f8 100644 --- a/gst/gstclock.c +++ b/gst/gstclock.c @@ -309,7 +309,7 @@ gst_clock_id_unref (GstClockID id) } /** - * gst_clock_new_single_shot_id + * gst_clock_new_single_shot_id: * @clock: The #GstClockID to get a single shot notification from * @time: the requested time * @@ -334,7 +334,7 @@ gst_clock_new_single_shot_id (GstClock * clock, GstClockTime time) } /** - * gst_clock_new_periodic_id + * gst_clock_new_periodic_id: * @clock: The #GstClockID to get a periodic notification id from * @start_time: the requested start time * @interval: the requested interval @@ -1167,7 +1167,7 @@ not_supported: } /** - * gst_clock_get_master + * gst_clock_get_master: * @clock: a #GstClock * * Get the master clock that @clock is slaved to or %NULL when the clock is diff --git a/gst/gstelement.c b/gst/gstelement.c index a290581..9137d4a 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -396,7 +396,7 @@ gst_element_provides_clock (GstElement * element) * An element is only required to provide a clock in the PAUSED * state. Some elements can provide a clock in other states. * - * Returns: the GstClock provided by the element or %NULL + * Returns: (transfer full): the GstClock provided by the element or %NULL * if no clock could be provided. Unref after usage. * * MT safe. @@ -466,7 +466,7 @@ gst_element_set_clock (GstElement * element, GstClock * clock) * Gets the currently configured clock of the element. This is the clock as was * last set with gst_element_set_clock(). * - * Returns: the #GstClock of the element. unref after usage. + * Returns: (transfer full): the #GstClock of the element. unref after usage. * * MT safe. */ @@ -1086,7 +1086,7 @@ gst_element_get_request_pad (GstElement * element, const gchar * name) * or gst_element_release_request_pad() in case of a request pad. * Use gst_element_get_static_pad() or gst_element_get_request_pad() instead. * - * Returns: the #GstPad if found, otherwise %NULL. Unref or Release after usage, + * Returns: (transfer full): the #GstPad if found, otherwise %NULL. Unref or Release after usage, * depending on the type of the pad. */ #ifndef GST_REMOVE_DEPRECATED diff --git a/gst/gstobject.c b/gst/gstobject.c index d4f755d..d18ca3c 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -298,7 +298,7 @@ gst_object_init (GstObject * object) * constructs like : * result = gst_object_ref (object->parent); * - * Returns: A pointer to @object + * Returns: (transfer full): A pointer to @object */ gpointer gst_object_ref (gpointer object) diff --git a/gst/gstpad.c b/gst/gstpad.c index 9c46704..f2adefa 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -5437,7 +5437,7 @@ gst_pad_set_element_private (GstPad * pad, gpointer priv) * Gets the private data of a pad. * No locking is performed in this function. * - * Returns: a #gpointer to the private data. + * Returns: (transfer none): a #gpointer to the private data. */ gpointer gst_pad_get_element_private (GstPad * pad) diff --git a/gst/gstplugin.c b/gst/gstplugin.c index f823a3b..1d36395 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -206,7 +206,7 @@ _gst_plugin_register_static (GstPluginDesc * desc) * library-specific namespace prefix in order to avoid name conflicts in * case a similar plugin with the same name ever gets added to GStreamer) * @description: description of the plugin - * @init_func: pointer to the init function of this plugin. + * @init_func: (scope call): pointer to the init function of this plugin. * @version: version string of the plugin * @license: effective license of plugin. Must be one of the approved licenses * (see #GstPluginDesc above) or the plugin will not be registered. @@ -269,7 +269,8 @@ gst_plugin_register_static (gint major_version, gint minor_version, * library-specific namespace prefix in order to avoid name conflicts in * case a similar plugin with the same name ever gets added to GStreamer) * @description: description of the plugin - * @init_full_func: pointer to the init function with user data of this plugin. + * @init_full_func: (scope call): pointer to the init function with user data + * of this plugin. * @version: version string of the plugin * @license: effective license of plugin. Must be one of the approved licenses * (see #GstPluginDesc above) or the plugin will not be registered. @@ -699,8 +700,8 @@ static GStaticMutex gst_plugin_loading_mutex = G_STATIC_MUTEX_INIT; * * Loads the given plugin and refs it. Caller needs to unref after use. * - * Returns: a reference to the existing loaded GstPlugin, a reference to the - * newly-loaded GstPlugin, or NULL if an error occurred. + * Returns: (transfer full): a reference to the existing loaded GstPlugin, a + * reference to the newly-loaded GstPlugin, or NULL if an error occurred. */ GstPlugin * gst_plugin_load_file (const gchar * filename, GError ** error) diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index 1f64b47..5ef48da 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -1120,7 +1120,7 @@ structure_foreach_wrapper (GQuark field_id, const GValue * value, /** * gst_tag_list_foreach: * @list: list to iterate over - * @func: function to be called for each tag + * @func: (scope call): function to be called for each tag * @user_data: (closure): user specified data * * Calls the given function for each tag inside the tag list. Note that if there diff --git a/gst/gstutils.c b/gst/gstutils.c index d712f55..0a15a3a 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -2645,7 +2645,8 @@ gst_buffer_merge (GstBuffer * buf1, GstBuffer * buf2) * unreffing the input parameters. Language bindings without * explicit reference counting should not wrap this function. * - * Returns: the new #GstBuffer which is the concatenation of the source buffers. + * Returns: (transfer full): the new #GstBuffer which is the concatenation of + * the source buffers. */ GstBuffer * gst_buffer_join (GstBuffer * buf1, GstBuffer * buf2) @@ -3641,7 +3642,7 @@ gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction) * and want them all ghosted, you will have to create the ghost pads * yourself). * - * Returns: a newly-created bin, or NULL if an error occurred. + * Returns: (transfer full): a newly-created bin, or NULL if an error occurred. * * Since: 0.10.3 */ @@ -3673,7 +3674,7 @@ gst_parse_bin_from_description (const gchar * bin_description, * and want them all ghosted, you will have to create the ghost pads * yourself). * - * Returns: a newly-created bin, or NULL if an error occurred. + * Returns: (transfer full): a newly-created bin, or NULL if an error occurred. * * Since: 0.10.20 */ -- 2.7.4