|  |  |  | GStreamer Base Plugins 1.0 Library Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
#include <gst/allocators/gstdmabuf.h> 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);
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. [allow-none] | 
| 
 | dmabuf file descriptor | 
| 
 | memory size | 
| Returns : | a GstMemory based on allocator.
When the buffer will be released dmabuf allocator will close thefd.
The memory is only mmapped ongst_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 | 
Since 1.2