DmaBufAllocator.alloc

gst.memory.Memory alloc(gst.allocator.Allocator allocator, int fd, size_t size)

Return a [gst.memory.Memory] that wraps a dmabuf file descriptor.

Parameters

allocatorallocator to be used for this memory
fddmabuf file descriptor
sizememory 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.Buffer.map] request.