base: add (nullable) annotations to return values

https://bugzilla.gnome.org/show_bug.cgi?id=731542
This commit is contained in:
Evan Nemerson 2014-06-11 17:12:20 -07:00 committed by Sebastian Dröge
parent ddd5e30726
commit c38f3254f8
5 changed files with 32 additions and 32 deletions

View file

@ -425,7 +425,7 @@ gst_adapter_try_to_merge_up (GstAdapter * adapter, gsize size)
*
* Returns %NULL if @size bytes are not available.
*
* Returns: (transfer none) (array length=size) (element-type guint8):
* Returns: (transfer none) (array length=size) (element-type guint8) (nullable):
* a pointer to the first @size bytes of data, or %NULL
*/
gconstpointer
@ -708,7 +708,7 @@ gst_adapter_take_internal (GstAdapter * adapter, gsize nbytes)
*
* Free-function: g_free
*
* Returns: (transfer full) (array length=nbytes) (element-type guint8):
* Returns: (transfer full) (array length=nbytes) (element-type guint8) (nullable):
* oven-fresh hot data, or %NULL if @nbytes bytes are not available
*/
gpointer
@ -758,8 +758,8 @@ gst_adapter_take (GstAdapter * adapter, gsize nbytes)
*
* Free-function: gst_buffer_unref
*
* Returns: (transfer full): a #GstBuffer containing the first @nbytes of
* the adapter, or %NULL if @nbytes bytes are not available.
* Returns: (transfer full) (nullable): a #GstBuffer containing the first
* @nbytes of the adapter, or %NULL if @nbytes bytes are not available.
* gst_buffer_unref() when no longer needed.
*
* Since: 1.2
@ -840,8 +840,8 @@ done:
*
* Free-function: gst_buffer_unref
*
* Returns: (transfer full): a #GstBuffer containing the first @nbytes of
* the adapter, or %NULL if @nbytes bytes are not available.
* Returns: (transfer full) (nullable): a #GstBuffer containing the first
* @nbytes of the adapter, or %NULL if @nbytes bytes are not available.
* gst_buffer_unref() when no longer needed.
*/
GstBuffer *
@ -917,9 +917,9 @@ done:
* Caller owns returned list and contained buffers. gst_buffer_unref() each
* buffer in the list before freeing the list after usage.
*
* Returns: (element-type Gst.Buffer) (transfer full): a #GList of buffers
* containing the first @nbytes of the adapter, or %NULL if @nbytes bytes
* are not available
* Returns: (element-type Gst.Buffer) (transfer full) (nullable): a #GList of
* buffers containing the first @nbytes of the adapter, or %NULL if @nbytes
* bytes are not available
*/
GList *
gst_adapter_take_list (GstAdapter * adapter, gsize nbytes)

View file

@ -904,9 +904,9 @@ gst_base_sink_get_ts_offset (GstBaseSink * sink)
*
* Free-function: gst_sample_unref
*
* Returns: (transfer full): a #GstSample. gst_sample_unref() after usage.
* This function returns %NULL when no buffer has arrived in the sink yet
* or when the sink is not in PAUSED or PLAYING.
* Returns: (transfer full) (nullable): a #GstSample. gst_sample_unref() after
* usage. This function returns %NULL when no buffer has arrived in the
* sink yet or when the sink is not in PAUSED or PLAYING.
*/
GstSample *
gst_base_sink_get_last_sample (GstBaseSink * sink)

View file

@ -606,7 +606,7 @@ gst_collect_pads_set_flush_function (GstCollectPads * pads,
*
* MT safe.
*
* Returns: a new #GstCollectData to identify the new pad. Or %NULL
* Returns: (nullable): a new #GstCollectData to identify the new pad. Or %NULL
* if wrong parameters are supplied.
*/
GstCollectData *

View file

@ -918,7 +918,7 @@ gst_index_compare_func (gconstpointer a, gconstpointer b, gpointer user_data)
*
* Finds the given format/value in the index
*
* Returns: the entry associated with the value or %NULL if the
* Returns: (nullable): the entry associated with the value or %NULL if the
* value was not found.
*/
GstIndexEntry *
@ -949,7 +949,7 @@ gst_index_get_assoc_entry (GstIndex * index, gint id,
* Finds the given format/value in the index with the given
* compare function and user_data.
*
* Returns: the entry associated with the value or %NULL if the
* Returns: (nullable): the entry associated with the value or %NULL if the
* value was not found.
*/
GstIndexEntry *

View file

@ -75,8 +75,8 @@ typedef struct
* for performance reasons, but mostly because pointers returned by us need
* to stay valid until typefinding has finished)
*
* Returns: address of the data or %NULL if buffer does not cover the
* requested range.
* Returns: (nullable): address of the data or %NULL if buffer does not cover
* the requested range.
*/
static const guint8 *
helper_find_peek (gpointer data, gint64 offset, guint size)
@ -269,8 +269,8 @@ helper_find_get_length (gpointer data)
*
* Free-function: gst_caps_unref
*
* Returns: (transfer full): the #GstCaps corresponding to the data stream.
* Returns %NULL if no #GstCaps matches the data stream.
* Returns: (transfer full) (nullable): the #GstCaps corresponding to the data
* stream. Returns %NULL if no #GstCaps matches the data stream.
*/
GstCaps *
gst_type_find_helper_get_range (GstObject * obj, GstObject * parent,
@ -388,8 +388,8 @@ gst_type_find_helper_get_range (GstObject * obj, GstObject * parent,
*
* Free-function: gst_caps_unref
*
* Returns: (transfer full): the #GstCaps corresponding to the data stream.
* Returns %NULL if no #GstCaps matches the data stream.
* Returns: (transfer full) (nullable): the #GstCaps corresponding to the data
* stream. Returns %NULL if no #GstCaps matches the data stream.
*/
GstCaps *
@ -426,8 +426,8 @@ typedef struct
*
* Get data pointer within a buffer.
*
* Returns: address inside the buffer or %NULL if buffer does not cover the
* requested range.
* Returns: (nullable): address inside the buffer or %NULL if buffer does not
* cover the requested range.
*/
static const guint8 *
buf_helper_find_peek (gpointer data, gint64 off, guint size)
@ -499,9 +499,9 @@ buf_helper_find_suggest (gpointer data, GstTypeFindProbability probability,
*
* Free-function: gst_caps_unref
*
* Returns: (transfer full): the #GstCaps corresponding to the data, or %NULL
* if no type could be found. The caller should free the caps returned
* with gst_caps_unref().
* Returns: (transfer full) (nullable): the #GstCaps corresponding to the data,
* or %NULL if no type could be found. The caller should free the caps
* returned with gst_caps_unref().
*/
GstCaps *
gst_type_find_helper_for_data (GstObject * obj, const guint8 * data, gsize size,
@ -570,9 +570,9 @@ gst_type_find_helper_for_data (GstObject * obj, const guint8 * data, gsize size,
*
* Free-function: gst_caps_unref
*
* Returns: (transfer full): the #GstCaps corresponding to the data, or %NULL
* if no type could be found. The caller should free the caps returned
* with gst_caps_unref().
* Returns: (transfer full) (nullable): the #GstCaps corresponding to the data,
* or %NULL if no type could be found. The caller should free the caps
* returned with gst_caps_unref().
*/
GstCaps *
gst_type_find_helper_for_buffer (GstObject * obj, GstBuffer * buf,
@ -607,9 +607,9 @@ gst_type_find_helper_for_buffer (GstObject * obj, GstBuffer * buf,
*
* Free-function: gst_caps_unref
*
* Returns: (transfer full): the #GstCaps corresponding to @extension, or
* %NULL if no type could be found. The caller should free the caps
* returned with gst_caps_unref().
* Returns: (transfer full) (nullable): the #GstCaps corresponding to
* @extension, or %NULL if no type could be found. The caller should free
* the caps returned with gst_caps_unref().
*/
GstCaps *
gst_type_find_helper_for_extension (GstObject * obj, const gchar * extension)