From 4088363aead586c3dbcd0400b7f959744e49ad37 Mon Sep 17 00:00:00 2001 From: Evan Nemerson Date: Wed, 11 Jun 2014 16:19:01 -0700 Subject: [PATCH] introspection: add some missing allow-none annotations to in params https://bugzilla.gnome.org/show_bug.cgi?id=730957 --- gst/gstbufferpool.c | 4 ++-- gst/gstelement.c | 2 +- gst/gstinfo.h | 2 +- gst/gstmessage.c | 8 ++++---- gst/gstobject.c | 4 ++-- gst/gstpad.c | 4 ++-- gst/gstpad.h | 54 ++++++++++++++++++++++++++--------------------------- gst/gstplugin.h | 11 ++++++----- gst/gstpreset.c | 2 +- gst/gsttaglist.c | 4 ++-- 10 files changed, 48 insertions(+), 47 deletions(-) diff --git a/gst/gstbufferpool.c b/gst/gstbufferpool.c index 6c14ce4..92f6648 100644 --- a/gst/gstbufferpool.c +++ b/gst/gstbufferpool.c @@ -823,8 +823,8 @@ gst_buffer_pool_config_set_params (GstStructure * config, GstCaps * caps, /** * gst_buffer_pool_config_set_allocator: * @config: a #GstBufferPool configuration - * @allocator: a #GstAllocator - * @params: #GstAllocationParams + * @allocator: (allow-none): a #GstAllocator + * @params: (allow-none): #GstAllocationParams * * Set the @allocator and @params on @config. * diff --git a/gst/gstelement.c b/gst/gstelement.c index 5bcaa5e..3fbe7fe 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -1731,7 +1731,7 @@ gst_element_post_message (GstElement * element, GstMessage * message) /** * _gst_element_error_printf: - * @format: the printf-like format to use, or %NULL + * @format: (allow-none): the printf-like format to use, or %NULL * * This function is only used internally by the gst_element_error() macro. * diff --git a/gst/gstinfo.h b/gst/gstinfo.h index 319e841..5c802bd 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -197,7 +197,7 @@ struct _GstDebugCategory { /** * GST_STR_NULL: - * @str: The string to check. + * @str: (allow-none): The string to check. * * Macro to use when a string must not be %NULL, but may be %NULL. If the string * is %NULL, "(NULL)" is printed instead. diff --git a/gst/gstmessage.c b/gst/gstmessage.c index 5014016..15c5328 100644 --- a/gst/gstmessage.c +++ b/gst/gstmessage.c @@ -256,8 +256,8 @@ gst_message_init (GstMessageImpl * message, GstMessageType type, * gst_message_new_custom: * @type: The #GstMessageType to distinguish messages * @src: The object originating the message. - * @structure: (transfer full): the structure for the message. The message - * will take ownership of the structure. + * @structure: (transfer full) (allow-none): the structure for the + * message. The message will take ownership of the structure. * * Create a new custom-typed message. This can be used for anything not * handled by other message-specific functions to pass a message to the @@ -785,8 +785,8 @@ gst_message_new_application (GstObject * src, GstStructure * structure) /** * gst_message_new_element: * @src: (transfer none): The object originating the message. - * @structure: (transfer full): The structure for the message. The message - * will take ownership of the structure. + * @structure: (transfer full): The structure for the + * message. The message will take ownership of the structure. * * Create a new element-specific message. This is meant as a generic way of * allowing one-way communication from an element to an application, for example diff --git a/gst/gstobject.c b/gst/gstobject.c index 0250003..5691bec 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -312,7 +312,7 @@ gst_object_ref_sink (gpointer object) * gst_object_replace: * @oldobj: (inout) (transfer full) (nullable): pointer to a place of * a #GstObject to replace - * @newobj: (transfer none): a new #GstObject + * @newobj: (transfer none) (allow-none): a new #GstObject * * Atomically modifies a pointer to point to a new object. * The reference count of @oldobj is decreased and the reference count of @@ -588,7 +588,7 @@ had_parent: /** * gst_object_set_name: * @object: a #GstObject - * @name: new name of object + * @name: (allow-none): new name of object * * Sets the name of @object, or gives @object a guaranteed unique * name (if @name is %NULL). diff --git a/gst/gstpad.c b/gst/gstpad.c index 838c956..28170ac 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -766,7 +766,7 @@ gst_pad_get_property (GObject * object, guint prop_id, /** * gst_pad_new: - * @name: the name of the new pad. + * @name: (allow-none): the name of the new pad. * @direction: the #GstPadDirection of the pad. * * Creates a new pad with the given name in the given direction. @@ -789,7 +789,7 @@ gst_pad_new (const gchar * name, GstPadDirection direction) /** * gst_pad_new_from_template: * @templ: the pad template to use - * @name: the name of the element + * @name: (allow-none): the name of the element * * Creates a new pad with the given name from the given template. * If name is %NULL, a guaranteed unique name (across all pads) diff --git a/gst/gstpad.h b/gst/gstpad.h index 4963ef0..2ac335c 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -251,9 +251,9 @@ typedef gboolean (*GstPadActivateModeFunction) (GstPad *pad, GstObject *parent, /** * GstPadChainFunction: * @pad: the sink #GstPad that performed the chain. - * @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, - * @parent is guaranteed to be not-%NULL and remain valid during the - * execution of this function. + * @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + * flag is set, @parent is guaranteed to be not-%NULL and remain valid + * during the execution of this function. * @buffer: the #GstBuffer that is chained, not %NULL. * * A function that will be called on sinkpads when chaining buffers. @@ -274,9 +274,9 @@ typedef GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstObject *parent, /** * GstPadChainListFunction: * @pad: the sink #GstPad that performed the chain. - * @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, - * @parent is guaranteed to be not-%NULL and remain valid during the - * execution of this function. + * @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + * flag is set, @parent is guaranteed to be not-%NULL and remain valid + * during the execution of this function. * @list: the #GstBufferList that is chained, not %NULL. * * A function that will be called on sinkpads when chaining buffer lists. @@ -297,9 +297,9 @@ typedef GstFlowReturn (*GstPadChainListFunction) (GstPad *pad, GstObject *paren /** * GstPadGetRangeFunction: * @pad: the src #GstPad to perform the getrange on. - * @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, - * @parent is guaranteed to be not-%NULL and remain valid during the - * execution of this function. + * @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + * flag is set, @parent is guaranteed to be not-%NULL and remain valid + * during the execution of this function. * @offset: the offset of the range * @length: the length of the range * @buffer: a memory location to hold the result buffer, cannot be %NULL. @@ -348,9 +348,9 @@ typedef GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad, GstObject *parent /** * GstPadEventFunction: * @pad: the #GstPad to handle the event. - * @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, - * @parent is guaranteed to be not-%NULL and remain valid during the - * execution of this function. + * @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + * flag is set, @parent is guaranteed to be not-%NULL and remain valid + * during the execution of this function. * @event: the #GstEvent to handle. * * Function signature to handle an event for the pad. @@ -365,9 +365,9 @@ typedef gboolean (*GstPadEventFunction) (GstPad *pad, GstObject *parent, /** * GstPadIterIntLinkFunction: * @pad: The #GstPad to query. - * @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, - * @parent is guaranteed to be not-%NULL and remain valid during the - * execution of this function. + * @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + * flag is set, @parent is guaranteed to be not-%NULL and remain valid + * during the execution of this function. * * The signature of the internal pad link iterator function. * @@ -382,9 +382,9 @@ typedef GstIterator* (*GstPadIterIntLinkFunction) (GstPad *pad, Gst /** * GstPadQueryFunction: * @pad: the #GstPad to query. - * @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, - * @parent is guaranteed to be not-%NULL and remain valid during the - * execution of this function. + * @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + * flag is set, @parent is guaranteed to be not-%NULL and remain valid + * during the execution of this function. * @query: the #GstQuery object to execute * * The signature of the query function. @@ -399,9 +399,9 @@ typedef gboolean (*GstPadQueryFunction) (GstPad *pad, GstObject *parent, /** * GstPadLinkFunction: * @pad: the #GstPad that is linked. - * @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, - * @parent is guaranteed to be not-%NULL and remain valid during the - * execution of this function. + * @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + * flag is set, @parent is guaranteed to be not-%NULL and remain valid + * during the execution of this function. * @peer: the peer #GstPad of the link * * Function signature to handle a new link on the pad. @@ -412,9 +412,9 @@ typedef GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad, GstObject *parent, /** * GstPadUnlinkFunction: * @pad: the #GstPad that is linked. - * @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, - * @parent is guaranteed to be not-%NULL and remain valid during the - * execution of this function. + * @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT + * flag is set, @parent is guaranteed to be not-%NULL and remain valid + * during the execution of this function. * * Function signature to handle a unlinking the pad prom its peer. */ @@ -524,8 +524,8 @@ typedef enum * GstPadProbeInfo: * @type: the current probe type * @id: the id of the probe - * @data: type specific data, check the @type field to know the datatype. - * This field can be %NULL. + * @data: (allow-none): type specific data, check the @type field to know the + * datatype. This field can be %NULL. * @offset: offset of pull probe, this field is valid when @type contains * #GST_PAD_PROBE_TYPE_PULL * @size: size of pull probe, this field is valid when @type contains @@ -581,7 +581,7 @@ typedef GstPadProbeReturn (*GstPadProbeCallback) (GstPad *pad, GstPadProbeIn /** * GstPadStickyEventsForeachFunction: * @pad: the #GstPad. - * @event: a sticky #GstEvent. + * @event: (allow-none): a sticky #GstEvent. * @user_data: the #gpointer to optional user data. * * Callback used by gst_pad_sticky_events_foreach(). diff --git a/gst/gstplugin.h b/gst/gstplugin.h index 500be30..6e49332 100644 --- a/gst/gstplugin.h +++ b/gst/gstplugin.h @@ -145,11 +145,12 @@ typedef gboolean (*GstPluginInitFullFunc) (GstPlugin *plugin, gpointer user_data * @source: source module plugin belongs to * @package: shipped package plugin belongs to * @origin: URL to provider of plugin - * @release_datetime: date time string in ISO 8601 format (or rather, a - * subset thereof), or %NULL. Allowed are the following formats: - * "YYYY-MM-DD" and "YYY-MM-DDTHH:MMZ" (with 'T' a separator and 'Z' - * indicating UTC/Zulu time). This field should be set via the - * GST_PACKAGE_RELEASE_DATETIME preprocessor macro. + * @release_datetime: (allow-none): date time string in ISO 8601 + * format (or rather, a subset thereof), or %NULL. Allowed are the + * following formats: "YYYY-MM-DD" and "YYY-MM-DDTHH:MMZ" (with + * 'T' a separator and 'Z' indicating UTC/Zulu time). This field + * should be set via the %GST_PACKAGE_RELEASE_DATETIME + * preprocessor macro. * * A plugin should export a variable of this type called plugin_desc. The plugin * loader will use the data provided there to initialize the plugin. diff --git a/gst/gstpreset.c b/gst/gstpreset.c index 8a9738f..27db9ec 100644 --- a/gst/gstpreset.c +++ b/gst/gstpreset.c @@ -1069,7 +1069,7 @@ gst_preset_delete_preset (GstPreset * preset, const gchar * name) * @preset: a #GObject that implements #GstPreset * @name: preset name * @tag: meta data item name - * @value: new value + * @value: (allow-none): new value * * Sets a new @value for an existing meta data item or adds a new item. Meta * data @tag names can be something like e.g. "comment". Supplying %NULL for the diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index 3bdacd8..be502c3 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -1133,8 +1133,8 @@ gst_tag_list_insert (GstTagList * into, const GstTagList * from, /** * gst_tag_list_merge: - * @list1: first list to merge - * @list2: second list to merge + * @list1: (allow-none): first list to merge + * @list2: (allow-none): second list to merge * @mode: the mode to use * * Merges the two given lists into a new list. If one of the lists is %NULL, a -- 2.7.4