From 636d6ac37dcbea141e98a56378f0ca1e1b220105 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Fri, 13 Apr 2018 20:15:46 +0200 Subject: [PATCH] base: fix some GIR annotations Mostly related to out parameters and their transfer --- libs/gst/base/gstbaseparse.c | 2 +- libs/gst/base/gstbytereader.c | 2 +- libs/gst/base/gstbytewriter.c | 3 +-- libs/gst/base/gstcollectpads.c | 2 +- libs/gst/base/gstcollectpads.h | 2 +- libs/gst/base/gsttypefindhelper.c | 4 ++-- libs/gst/base/gsttypefindhelper.h | 2 +- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index 99283b8e85..8ac6a3f59e 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -1649,7 +1649,7 @@ gst_base_parse_src_event_default (GstBaseParse * parse, GstEvent * event) * @src_format: #GstFormat describing the source format. * @src_value: Source value to be converted. * @dest_format: #GstFormat defining the converted format. - * @dest_value: Pointer where the conversion result will be put. + * @dest_value: (out): Pointer where the conversion result will be put. * * Default implementation of "convert" vmethod in #GstBaseParse class. * diff --git a/libs/gst/base/gstbytereader.c b/libs/gst/base/gstbytereader.c index 0045ce93e1..72f720a038 100644 --- a/libs/gst/base/gstbytereader.c +++ b/libs/gst/base/gstbytereader.c @@ -954,7 +954,7 @@ gst_byte_reader_masked_scan_uint32 (const GstByteReader * reader, guint32 mask, * @offset: offset from which to start scanning, relative to the current * position * @size: number of bytes to scan from offset - * @value: pointer to uint32 to return matching data + * @value: (out): pointer to uint32 to return matching data * * Scan for pattern @pattern with applied mask @mask in the byte reader data, * starting from offset @offset relative to the current position. diff --git a/libs/gst/base/gstbytewriter.c b/libs/gst/base/gstbytewriter.c index 72364fca29..705a35e48d 100644 --- a/libs/gst/base/gstbytewriter.c +++ b/libs/gst/base/gstbytewriter.c @@ -624,8 +624,7 @@ CREATE_WRITE_STRING_FUNC (32, guint32); /** * gst_byte_writer_put_string_utf8: * @writer: #GstByteWriter instance - * @data: (transfer none) (array zero-terminated=1) (type utf8): UTF8 string to - * write + * @data: (transfer none): UTF8 string to write * * Writes a NUL-terminated UTF8 string to @writer (including the terminator). * diff --git a/libs/gst/base/gstcollectpads.c b/libs/gst/base/gstcollectpads.c index 7afe1db353..13fe2e1704 100644 --- a/libs/gst/base/gstcollectpads.c +++ b/libs/gst/base/gstcollectpads.c @@ -482,7 +482,7 @@ gst_collect_pads_set_query_function (GstCollectPads * pads, * @pads: the collectpads to use * @cdata: collect data of corresponding pad * @buf: buffer being clipped -* @outbuf: (allow-none): output buffer with running time, or NULL if clipped +* @outbuf: (allow-none) (out): output buffer with running time, or NULL if clipped * @user_data: user data (unused) * * Convenience clipping function that converts incoming buffer's timestamp diff --git a/libs/gst/base/gstcollectpads.h b/libs/gst/base/gstcollectpads.h index b843d5ba3d..156e445d66 100644 --- a/libs/gst/base/gstcollectpads.h +++ b/libs/gst/base/gstcollectpads.h @@ -253,7 +253,7 @@ typedef gboolean (*GstCollectPadsQueryFunction) (GstCollectPads *pads, Gs * @pads: a #GstCollectPads * @data: a #GstCollectData * @inbuffer: (transfer full): the input #GstBuffer - * @outbuffer: the output #GstBuffer + * @outbuffer: (out): the output #GstBuffer * @user_data: user data * * A function that will be called when @inbuffer is received on the pad managed diff --git a/libs/gst/base/gsttypefindhelper.c b/libs/gst/base/gsttypefindhelper.c index 1b38325480..1723f3472e 100644 --- a/libs/gst/base/gsttypefindhelper.c +++ b/libs/gst/base/gsttypefindhelper.c @@ -493,8 +493,8 @@ buf_helper_find_suggest (gpointer data, guint probability, GstCaps * caps) /** * gst_type_find_helper_for_data: * @obj: (allow-none): object doing the typefinding, or %NULL (used for logging) - * @data: (in) (transfer none): a pointer with data to typefind - * @size: (in): the size of @data + * @data: (transfer none) (array length=size): * a pointer with data to typefind + * @size: the size of @data * @prob: (out) (allow-none): location to store the probability of the found * caps, or %NULL * diff --git a/libs/gst/base/gsttypefindhelper.h b/libs/gst/base/gsttypefindhelper.h index d35027793d..6f032ca789 100644 --- a/libs/gst/base/gsttypefindhelper.h +++ b/libs/gst/base/gsttypefindhelper.h @@ -51,7 +51,7 @@ GstCaps * gst_type_find_helper_for_extension (GstObject * obj, * @parent: (allow-none): the parent of @obj or %NULL * @offset: the offset of the range * @length: the length of the range - * @buffer: a memory location to hold the result buffer + * @buffer: (out): a memory location to hold the result buffer * * This function will be called by gst_type_find_helper_get_range() when * typefinding functions request to peek at the data of a stream at certain -- 2.34.1