taskpool: modify transfer annotations for push() and join()
authorMathieu Duponchelle <mathieu@centricular.com>
Tue, 3 Nov 2020 01:33:32 +0000 (02:33 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 5 Nov 2020 18:18:28 +0000 (18:18 +0000)
While the default implementation passes NULL around as the
task handle, other implementations can only provide a safe
API by having that handle map to a refcounted opaque type.

While what's passed around is a gpointer, a valid transfer
type annotation has informative value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>

gst/gsttaskpool.c

index 89c8905..658c0a3 100644 (file)
@@ -233,7 +233,7 @@ gst_task_pool_cleanup (GstTaskPool * pool)
  *
  * Start the execution of a new thread from @pool.
  *
- * Returns: (transfer none) (nullable): a pointer that should be used
+ * Returns: (transfer full) (nullable): a pointer that should be used
  * for the gst_task_pool_join function. This pointer can be %NULL, you
  * must check @error to detect errors.
  */
@@ -263,7 +263,7 @@ not_supported:
 /**
  * gst_task_pool_join:
  * @pool: a #GstTaskPool
- * @id: the id
+ * @id: (transfer full): the id
  *
  * Join a task and/or return it to the pool. @id is the id obtained from
  * gst_task_pool_push().