Functions

dmabuf_memory_get_fd (mem)

fd_memory_get_fd (mem)

is_dmabuf_memory (mem)

is_fd_memory (mem)

is_phys_memory (mem)

phys_memory_get_phys_addr (mem)

Details

GstAllocators.dmabuf_memory_get_fd(mem)
Parameters:

mem (Gst.Memory) – 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 Gst.Memory. Use dup to take a copy if you intend to use it beyond the lifetime of this Gst.Memory.

Return type:

int

Return the file descriptor associated with mem.

New in version 1.2.

GstAllocators.fd_memory_get_fd(mem)
Parameters:

mem (Gst.Memory) – Gst.Memory

Returns:

the fd of mem or -1 when there is no fd on mem

Return type:

int

Get the fd from mem. Call GstAllocators.is_fd_memory() to check if mem has an fd.

New in version 1.6.

GstAllocators.is_dmabuf_memory(mem)
Parameters:

mem (Gst.Memory) – the memory to be check

Returns:

True if mem is dmabuf memory, otherwise False

Return type:

bool

Check if mem is dmabuf memory.

New in version 1.2.

GstAllocators.is_fd_memory(mem)
Parameters:

mem (Gst.Memory) – Gst.Memory

Returns:

True when mem has an fd that can be retrieved with GstAllocators.fd_memory_get_fd().

Return type:

bool

Check if mem is memory backed by an fd

New in version 1.6.

GstAllocators.is_phys_memory(mem)
Parameters:

mem (Gst.Memory) – a Gst.Memory

Returns:

whether the memory at mem is backed by physical memory

Return type:

bool

New in version 1.14.

GstAllocators.phys_memory_get_phys_addr(mem)
Parameters:

mem (Gst.Memory) – a Gst.Memory

Returns:

Physical memory address that is backing mem, or 0 if none

Return type:

int

New in version 1.14.