allocators: Add/fix various annotations
authorSebastian Dröge <sebastian@centricular.com>
Mon, 17 Oct 2022 08:31:05 +0000 (11:31 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 18 Oct 2022 10:51:17 +0000 (13:51 +0300)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3194>

subprojects/gst-plugins-base/gst-libs/gst/allocators/gstdmabuf.c
subprojects/gst-plugins-base/gst-libs/gst/allocators/gstfdmemory.c

index 3f4eaa9..2793b73 100644 (file)
@@ -121,9 +121,8 @@ gst_dmabuf_allocator_init (GstDmaBufAllocator * allocator)
  *
  * Return a new dmabuf allocator.
  *
- * Returns: (transfer full): a new dmabuf allocator, or NULL if the allocator
- *    isn't available. Use gst_object_unref() to release the allocator after
- *    usage
+ * Returns: (transfer full): a new dmabuf allocator. Use gst_object_unref() to
+ * release the allocator after usage
  *
  * Since: 1.2
  */
@@ -146,7 +145,7 @@ gst_dmabuf_allocator_new (void)
  *
  * Return a %GstMemory that wraps a dmabuf file descriptor.
  *
- * Returns: (transfer full): a GstMemory based on @allocator.
+ * Returns: (transfer full) (nullable): a GstMemory based on @allocator.
  * When the buffer will be released dmabuf allocator will close the @fd.
  * The memory is only mmapped on gst_buffer_map() request.
  *
@@ -169,7 +168,7 @@ gst_dmabuf_allocator_alloc (GstAllocator * allocator, gint fd, gsize size)
  *
  * Return a %GstMemory that wraps a dmabuf file descriptor.
  *
- * Returns: (transfer full): a GstMemory based on @allocator.
+ * Returns: (transfer full) (nullable): a GstMemory based on @allocator.
  *
  * When the buffer will be released the allocator will close the @fd unless
  * the %GST_FD_MEMORY_FLAG_DONT_CLOSE flag is specified.
index 398914c..e2e64d4 100644 (file)
@@ -246,9 +246,8 @@ gst_fd_allocator_init (GstFdAllocator * allocator)
  *
  * Return a new fd allocator.
  *
- * Returns: (transfer full): a new fd allocator, or NULL if the allocator
- *    isn't available. Use gst_object_unref() to release the allocator after
- *    usage
+ * Returns: (transfer full): a new fd allocator. Use gst_object_unref() to
+ * release the allocator after usage
  *
  * Since: 1.6
  */
@@ -272,7 +271,7 @@ gst_fd_allocator_new (void)
  *
  * Return a %GstMemory that wraps a generic file descriptor.
  *
- * Returns: (transfer full): a GstMemory based on @allocator.
+ * Returns: (transfer full) (nullable): a GstMemory based on @allocator.
  * When the buffer will be released the allocator will close the @fd unless
  * the %GST_FD_MEMORY_FLAG_DONT_CLOSE flag is specified.
  * The memory is only mmapped on gst_buffer_map() request.