alloc


Description:

public static Memory? alloc (Allocator allocator, int fd, size_t size, FdMemoryFlags flags)

Return a Memory that wraps a generic file descriptor.

Parameters:

allocator

allocator to be used for this memory

fd

file descriptor

size

memory size

flags

extra FdMemoryFlags

Returns:

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