allocators: add some since markers and misc other doc clean-ups

This commit is contained in:
Tim-Philipp Müller 2013-02-19 09:40:31 +00:00
parent 320c992b94
commit 4179fe42e0

View file

@ -1,7 +1,5 @@
/* /* GStreamer dmabuf allocator
* gstdmabuf.c * Copyright (C) 2013 Linaro SA
*
* Copyright (C) Linaro SA 2013
* Author: Benjamin Gaignard <benjamin.gaignard@linaro.org> for Linaro. * Author: Benjamin Gaignard <benjamin.gaignard@linaro.org> for Linaro.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -27,6 +25,7 @@
* @short_description: Memory wrapper for Linux dmabuf memory * @short_description: Memory wrapper for Linux dmabuf memory
* @see_also: #GstMemory * @see_also: #GstMemory
* *
* Since: 1.2
*/ */
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
@ -226,10 +225,13 @@ _dmabuf_mem_init (void)
/** /**
* gst_dmabuf_allocator_obtain: * gst_dmabuf_allocator_obtain:
* *
* Returns a dmabuf allocator. * Return a dmabuf allocator.
* *
* Returns: (transfer full): a dmabuf allocator or NULL if the allocator isn't found * Returns: (transfer full): a dmabuf allocator, or NULL if the allocator
* Use gst_object_unref() to release the allocator after usage. * isn't available. Use gst_object_unref() to release the allocator after
* usage
*
* Since: 1.2
*/ */
GstAllocator * GstAllocator *
gst_dmabuf_allocator_obtain (void) gst_dmabuf_allocator_obtain (void)
@ -245,17 +247,19 @@ gst_dmabuf_allocator_obtain (void)
return allocator; return allocator;
} }
/* /**
* gst_dmabuf_allocator_alloc: * gst_dmabuf_allocator_alloc:
* @allocator: allocator to be used for this memory * @allocator: allocator to be used for this memory
* @fd: dmabuf file descriptor * @fd: dmabuf file descriptor
* @size: memory size * @size: memory size
* *
* Returns a %GstMemory that wraps a dmabuf file descriptor. * Return a %GstMemory that wraps a dmabuf file descriptor.
* *
* Returns: (transfer full): a GstMemory based on @allocator. * Returns: (transfer full): a GstMemory based on @allocator.
* When the buffer will be released dmabuf allocator will close the @fd. * When the buffer will be released dmabuf allocator will close the @fd.
* The memory is only mmapped on gst_buffer_mmap() request. * The memory is only mmapped on gst_buffer_mmap() request.
*
* Since: 1.2
*/ */
GstMemory * GstMemory *
gst_dmabuf_allocator_alloc (GstAllocator * allocator, gint fd, gsize size) gst_dmabuf_allocator_alloc (GstAllocator * allocator, gint fd, gsize size)
@ -292,10 +296,11 @@ gst_dmabuf_allocator_alloc (GstAllocator * allocator, gint fd, gsize size)
* gst_dmabuf_memory_get_fd: * gst_dmabuf_memory_get_fd:
* @mem: the memory to get the file descriptor * @mem: the memory to get the file descriptor
* *
* Returns the file descriptor associated with @mem * Return the file descriptor associated with @mem.
* *
* Returns: the file descriptor associated with the memory * Returns: the file descriptor associated with the memory, or -1
* else return -1 *
* Since: 1.2
*/ */
gint gint
gst_dmabuf_memory_get_fd (GstMemory * mem) gst_dmabuf_memory_get_fd (GstMemory * mem)
@ -313,7 +318,9 @@ gst_dmabuf_memory_get_fd (GstMemory * mem)
* *
* Check if @mem is dmabuf memory. * Check if @mem is dmabuf memory.
* *
* Returns: %TRUE if @mem is dmabuf memory * Returns: %TRUE if @mem is dmabuf memory, otherwise %FALSE
*
* Since: 1.2
*/ */
gboolean gboolean
gst_is_dmabuf_memory (GstMemory * mem) gst_is_dmabuf_memory (GstMemory * mem)
@ -321,7 +328,7 @@ gst_is_dmabuf_memory (GstMemory * mem)
return g_strcmp0 (mem->allocator->mem_type, ALLOCATOR_NAME) == 0; return g_strcmp0 (mem->allocator->mem_type, ALLOCATOR_NAME) == 0;
} }
#else #else /* !HAVE_MMAP */
GstAllocator * GstAllocator *
gst_dmabuf_allocator_obtain (void) gst_dmabuf_allocator_obtain (void)