FdAllocator.alloc

Return a gst.memory.Memory that wraps a generic file descriptor.

Parameters

allocator gst.allocator.Allocator

allocator to be used for this memory

fd int

file descriptor

size size_t

memory size

flags gstallocators.types.FdMemoryFlags

extra #GstFdMemoryFlags

Return Value

Type: gst.memory.Memory

a GstMemory based on allocator. When the buffer will be released the allocator will close the fd unless the GST_FD_MEMORY_FLAG_DONT_CLOSE flag is specified. The memory is only mmapped on gst.buffer.Buffer.map request.