From e16197a6c02f27037cbbfe9c73a106d082cdd1c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 26 Mar 2013 19:22:18 -0400 Subject: [PATCH] buffer: fix gobject-introspection annotations, esp. for gst_buffer_fill --- gst/gstallocator.c | 9 +++++---- gst/gstbuffer.c | 12 ++++++------ gst/gstbuffer.h | 1 - 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gst/gstallocator.c b/gst/gstallocator.c index a80b9a1a63..1cca2948b1 100644 --- a/gst/gstallocator.c +++ b/gst/gstallocator.c @@ -595,19 +595,20 @@ _priv_gst_memory_initialize (void) /** * gst_memory_new_wrapped: * @flags: #GstMemoryFlags - * @data: data to wrap + * @data: (array length=size) (element-type guint8) (transfer none): data to + * wrap * @maxsize: allocated size of @data * @offset: offset in @data * @size: size of valid data - * @user_data: user_data - * @notify: called with @user_data when the memory is freed + * @user_data: (allow-none): user_data + * @notify: (allow-none) (scope async) (closure user_data): called with @user_data when the memory is freed * * Allocate a new memory block that wraps the given @data. * * The prefix/padding must be filled with 0 if @flags contains * #GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively. * - * Returns: a new #GstMemory. + * Returns: (transfer full): a new #GstMemory. */ GstMemory * gst_memory_new_wrapped (GstMemoryFlags flags, gpointer data, diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c index 9cf3082424..8bb8af3490 100644 --- a/gst/gstbuffer.c +++ b/gst/gstbuffer.c @@ -691,12 +691,12 @@ no_memory: /** * gst_buffer_new_wrapped_full: * @flags: #GstMemoryFlags - * @data: (array length=size) (element-type guint8): data to wrap + * @data: (array length=size) (element-type guint8) (transfer none): data to wrap * @maxsize: allocated size of @data * @offset: offset in @data * @size: size of valid data - * @user_data: user_data - * @notify: called with @user_data when the memory is freed + * @user_data: (allow-none): user_data + * @notify: (allow-none) (scope async) (closure user_data): called with @user_data when the memory is freed * * Allocate a new buffer that wraps the given memory. @data must point to * @maxsize of memory, the wrapped buffer will have the region from @offset and @@ -726,7 +726,7 @@ gst_buffer_new_wrapped_full (GstMemoryFlags flags, gpointer data, /** * gst_buffer_new_wrapped: - * @data: (array length=size) (element-type guint8): data to wrap + * @data: (array length=size) (element-type guint8) (transfer full): data to wrap * @size: allocated size of @data * * Creates a new buffer that wraps the given @data. The memory will be freed @@ -1492,7 +1492,7 @@ gst_buffer_unmap (GstBuffer * buffer, GstMapInfo * info) * gst_buffer_fill: * @buffer: a #GstBuffer. * @offset: the offset to fill - * @src: the source address + * @src: (array length=size) (element-type guint8): the source address * @size: the size to fill * * Copy @size bytes from @src to @buffer at @offset. @@ -1594,7 +1594,7 @@ gst_buffer_extract (GstBuffer * buffer, gsize offset, gpointer dest, gsize size) * gst_buffer_memcmp: * @buffer: a #GstBuffer. * @offset: the offset in @buffer - * @mem: the memory to compare + * @mem: (array length=size) (element-type guint8): the memory to compare * @size: the size to compare * * Compare @size bytes starting from @offset in @buffer with the memory in @mem. diff --git a/gst/gstbuffer.h b/gst/gstbuffer.h index 49ad3d5467..37fc00fc64 100644 --- a/gst/gstbuffer.h +++ b/gst/gstbuffer.h @@ -307,7 +307,6 @@ gboolean gst_buffer_map (GstBuffer *buffer, GstMapInfo *info, void gst_buffer_unmap (GstBuffer *buffer, GstMapInfo *info); - /* refcounting */ /** * gst_buffer_ref: