GstAllocators.DmaBufAllocator

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.Allocator Gst.Allocator GstAllocators.FdAllocator GstAllocators.FdAllocator Gst.Allocator->GstAllocators.FdAllocator Gst.Object->Gst.Allocator GstAllocators.DmaBufAllocator GstAllocators.DmaBufAllocator GstAllocators.FdAllocator->GstAllocators.DmaBufAllocator

Subclasses:

None

Methods

Inherited:

GstAllocators.FdAllocator (2), Gst.Allocator (5), Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

alloc (allocator, fd, size)

class

alloc_with_flags (allocator, fd, size, flags)

class

new ()

Virtual Methods

Inherited:

Gst.Allocator (2), Gst.Object (1), GObject.Object (7)

Properties

Inherited:

Gst.Object (2)

Signals

Inherited:

Gst.Object (1), GObject.Object (1)

Fields

Inherited:

Gst.Object (1), GObject.Object (1)

Name

Type

Access

Description

parent

GstAllocators.FdAllocator

r

Class Details

class GstAllocators.DmaBufAllocator(**kwargs)
Bases:

GstAllocators.FdAllocator

Abstract:

No

Structure:

GstAllocators.DmaBufAllocatorClass

Base class for allocators with dmabuf-backed memory

New in version 1.12.

classmethod alloc(allocator, fd, size)[source]
Parameters:
  • allocator (Gst.Allocator) – allocator to be used for this memory

  • fd (int) – dmabuf file descriptor

  • size (int) – memory size

Returns:

a Gst.Memory based on allocator. When the buffer will be released dmabuf allocator will close the fd. The memory is only mmapped on Gst.Buffer.map() request.

Return type:

Gst.Memory or None

Return a Gst.Memory that wraps a dmabuf file descriptor.

New in version 1.2.

classmethod alloc_with_flags(allocator, fd, size, flags)[source]
Parameters:
Returns:

a Gst.Memory based on allocator.

When the buffer will be released the allocator will close the fd unless the GstAllocators.FdMemoryFlags.DONT_CLOSE flag is specified. The memory is only mmapped on gst_buffer_mmap() request.

Return type:

Gst.Memory or None

Return a Gst.Memory that wraps a dmabuf file descriptor.

New in version 1.16.

classmethod new()[source]
Returns:

a new dmabuf allocator. Use Gst.Object.unref() to release the allocator after usage

Return type:

Gst.Allocator

Return a new dmabuf allocator.

New in version 1.2.