summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Nemerson <evan@nemerson.com>2014-06-11 17:12:20 -0700
committerSebastian Dröge <sebastian@centricular.com>2014-06-26 18:55:25 +0200
commitc38f3254f8ae34749385d7a720ac9052844572c6 (patch)
treeb89de216514cc59673467d1e84bc7093d0c5bab1
parentddd5e307260b6b81ba549bcd1bfe41b25d44acd5 (diff)
base: add (nullable) annotations to return values
https://bugzilla.gnome.org/show_bug.cgi?id=731542
-rw-r--r--libs/gst/base/gstadapter.c18
-rw-r--r--libs/gst/base/gstbasesink.c6
-rw-r--r--libs/gst/base/gstcollectpads.c2
-rw-r--r--libs/gst/base/gstindex.c4
-rw-r--r--libs/gst/base/gsttypefindhelper.c34
5 files changed, 32 insertions, 32 deletions
diff --git a/libs/gst/base/gstadapter.c b/libs/gst/base/gstadapter.c
index 3d23fdb02..18fa77ec8 100644
--- a/libs/gst/base/gstadapter.c
+++ b/libs/gst/base/gstadapter.c
@@ -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)
diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c
index b6fc1fcf8..bcd1e5511 100644
--- a/libs/gst/base/gstbasesink.c
+++ b/libs/gst/base/gstbasesink.c
@@ -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)
diff --git a/libs/gst/base/gstcollectpads.c b/libs/gst/base/gstcollectpads.c
index 8f97b71f0..41e4722a2 100644
--- a/libs/gst/base/gstcollectpads.c
+++ b/libs/gst/base/gstcollectpads.c
@@ -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 *
diff --git a/libs/gst/base/gstindex.c b/libs/gst/base/gstindex.c
index b614d2c1b..272f0e707 100644
--- a/libs/gst/base/gstindex.c
+++ b/libs/gst/base/gstindex.c
@@ -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 *
diff --git a/libs/gst/base/gsttypefindhelper.c b/libs/gst/base/gsttypefindhelper.c
index 1a0d32772..b2fb21ca5 100644
--- a/libs/gst/base/gsttypefindhelper.c
+++ b/libs/gst/base/gsttypefindhelper.c
@@ -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)