From 9a360a47bf09ec60d58d1411f9649ef2e5aac2b7 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Fri, 20 Apr 2018 21:53:16 +0200 Subject: [PATCH] audio: fix some GIR annotations Mostly related to out and array parameters --- gst-libs/gst/audio/audio-converter.c | 7 ++++--- gst-libs/gst/audio/audio-info.c | 2 +- gst-libs/gst/audio/gstaudiodecoder.c | 4 ++-- gst-libs/gst/audio/gstaudioringbuffer.c | 19 ++++++++++--------- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/gst-libs/gst/audio/audio-converter.c b/gst-libs/gst/audio/audio-converter.c index a401606cce..c3bcb82db5 100644 --- a/gst-libs/gst/audio/audio-converter.c +++ b/gst-libs/gst/audio/audio-converter.c @@ -368,12 +368,13 @@ gst_audio_converter_update_config (GstAudioConverter * convert, /** * gst_audio_converter_get_config: * @convert: a #GstAudioConverter - * @in_rate: result input rate - * @out_rate: result output rate + * @in_rate: (out) (optional): result input rate + * @out_rate: (out) (optional): result output rate * * Get the current configuration of @convert. * - * Returns: a #GstStructure that remains valid for as long as @convert is valid + * Returns: (transfer none): + * a #GstStructure that remains valid for as long as @convert is valid * or until gst_audio_converter_update_config() is called. */ const GstStructure * diff --git a/gst-libs/gst/audio/audio-info.c b/gst-libs/gst/audio/audio-info.c index 140ca1c785..f64c9ddacf 100644 --- a/gst-libs/gst/audio/audio-info.c +++ b/gst-libs/gst/audio/audio-info.c @@ -399,7 +399,7 @@ invalid_channel_positions: * @src_fmt: #GstFormat of the @src_val * @src_val: value to convert * @dest_fmt: #GstFormat of the @dest_val - * @dest_val: pointer to destination value + * @dest_val: (out): pointer to destination value * * Converts among various #GstFormat types. This function handles * GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index 90d7cfee96..0c4fb80a14 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -3203,8 +3203,8 @@ gst_audio_decoder_get_latency (GstAudioDecoder * dec, /** * gst_audio_decoder_get_parse_state: * @dec: a #GstAudioDecoder - * @sync: a pointer to a variable to hold the current sync state - * @eos: a pointer to a variable to hold the current eos state + * @sync: (out) (optional): a pointer to a variable to hold the current sync state + * @eos: (out) (optional): a pointer to a variable to hold the current eos state * * Return current parsing (sync and eos) state. */ diff --git a/gst-libs/gst/audio/gstaudioringbuffer.c b/gst-libs/gst/audio/gstaudioringbuffer.c index 50749dc7d6..991b774f3a 100644 --- a/gst-libs/gst/audio/gstaudioringbuffer.c +++ b/gst-libs/gst/audio/gstaudioringbuffer.c @@ -352,7 +352,7 @@ parse_error: * @src_fmt: the source format * @src_val: the source value * @dest_fmt: the destination format - * @dest_val: a location to store the converted value + * @dest_val: (out): a location to store the converted value * * Convert @src_val in @src_fmt to the equivalent value in @dest_fmt. The result * will be put in @dest_val. @@ -1667,10 +1667,10 @@ not_started: * gst_audio_ring_buffer_commit: * @buf: the #GstAudioRingBuffer to commit * @sample: the sample position of the data - * @data: the data to commit + * @data: (array length=in_samples): the data to commit * @in_samples: the number of samples in the data to commit * @out_samples: the number of samples to write to the ringbuffer - * @accum: accumulator for rate conversion. + * @accum: (inout): accumulator for rate conversion. * * Commit @in_samples samples pointed to by @data to the ringbuffer @buf. * @@ -1720,9 +1720,9 @@ gst_audio_ring_buffer_commit (GstAudioRingBuffer * buf, guint64 * sample, * gst_audio_ring_buffer_read: * @buf: the #GstAudioRingBuffer to read from * @sample: the sample position of the data - * @data: where the data should be read + * @data: (array length=len): where the data should be read * @len: the number of samples in data to read - * @timestamp: where the timestamp is returned + * @timestamp: (out): where the timestamp is returned * * Read @len samples from the ringbuffer into the memory pointed * to by @data. @@ -1857,9 +1857,10 @@ not_started: /** * gst_audio_ring_buffer_prepare_read: * @buf: the #GstAudioRingBuffer to read from - * @segment: the segment to read - * @readptr: the pointer to the memory where samples can be read - * @len: the number of bytes to read + * @segment: (out): the segment to read + * @readptr: (out) (array length=len): + * the pointer to the memory where samples can be read + * @len: (out): the number of bytes to read * * Returns a pointer to memory where the data from segment @segment * can be found. This function is mostly used by subclasses. @@ -2011,7 +2012,7 @@ position_less_channels (const GstAudioChannelPosition * pos, guint channels) /** * gst_audio_ring_buffer_set_channel_positions: * @buf: the #GstAudioRingBuffer - * @position: the device channel positions + * @position: (array): the device channel positions * * Tell the ringbuffer about the device's channel positions. This must * be called in when the ringbuffer is acquired.