| GStreamer Base Plugins 1.0 Library Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <gst/allocators/gstdmabuf.h> GstAllocator * gst_dmabuf_allocator_new (void); GstMemory * gst_dmabuf_allocator_alloc (GstAllocator *allocator,gint fd,gsize size); gint gst_dmabuf_memory_get_fd (GstMemory *mem); gboolean gst_is_dmabuf_memory (GstMemory *mem);
GstAllocator * gst_dmabuf_allocator_new (void);
Return a new dmabuf allocator.
Returns : |
a new dmabuf allocator, or NULL if the allocator
isn't available. Use gst_object_unref() to release the allocator after
usage. [transfer full]
|
Since 1.2
GstMemory * gst_dmabuf_allocator_alloc (GstAllocator *allocator,gint fd,gsize size);
Return a GstMemory that wraps a dmabuf file descriptor.
|
allocator to be used for this memory |
|
dmabuf file descriptor |
|
memory size |
Returns : |
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_mmap() request. [transfer full]
|
Since 1.2
gint gst_dmabuf_memory_get_fd (GstMemory *mem);
Return the file descriptor associated with mem.
|
the memory to get the file descriptor |
Returns : |
the file descriptor associated with the memory, or -1. The file descriptor is still owned by the GstMemory. Use dup to take a copy if you intend to use it beyond the lifetime of this GstMemory. |
Since 1.2