GstAllocators.DRMDumbAllocator

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.DRMDumbAllocator GstAllocators.DRMDumbAllocator Gst.Allocator->GstAllocators.DRMDumbAllocator Gst.Object->Gst.Allocator

Subclasses:

None

Methods

Inherited:

Gst.Allocator (5), Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new_with_device_path (drm_device_path)

class

new_with_fd (drm_fd)

alloc (drm_fourcc, width, height)

has_prime_export ()

Virtual Methods

Inherited:

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

Properties

Inherited:

Gst.Object (2)

Name

Type

Flags

Short Description

drm-device-path

str

r/w/co

DRM device path

drm-fd

int

r/w/co

DRM file descriptor

Signals

Inherited:

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

Fields

Inherited:

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

Class Details

class GstAllocators.DRMDumbAllocator(**kwargs)
Bases:

Gst.Allocator

Abstract:

No

Structure:

GstAllocators.DRMDumbAllocatorClass

Private intance object for GstAllocators.DRMDumbAllocator.

New in version 1.24.

classmethod new_with_device_path(drm_device_path)[source]
Parameters:

drm_device_path (str) – path to the DRM device to open

Returns:

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

Return type:

Gst.Allocator or None

Creates a new GstAllocators.DRMDumbAllocator for the specific device path. This function can fail if the path does not exist, is not a DRM device or if the DRM device doesnot support DUMB allocation.

New in version 1.24.

classmethod new_with_fd(drm_fd)[source]
Parameters:

drm_fd (int) – file descriptor of the DRM device

Returns:

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

Return type:

Gst.Allocator or None

Creates a new GstAllocators.DRMDumbAllocator for the specific file desciptor. This function can fail if the file descriptor is not a DRM device or if the DRM device does not support DUMB allocation.

New in version 1.24.

alloc(drm_fourcc, width, height)[source]
Parameters:
  • drm_fourcc (int) – the DRM format to allocate for

  • width (int) – padded width for this allocation

  • height (int) – padded height for this allocation

Returns:

a new DRM Dumb Gst.Memory. Use gst_memory_unref() to release the memory after usage.

out_pitch:

the pitch as returned by the driver

Return type:

(Gst.Memory, out_pitch: int)

Allocated a DRM buffer object for the specific drm_fourcc, width and height. Note that the DRM Dumb allocation interface is agnostic to the pixel format. This drm_fourcc is converted into a bpp (bit-per-pixel) number and the height is scaled according to the sub-sampling.

New in version 1.24.

has_prime_export()[source]
Returns:

True if the allocator support exporting dma-buf.

Return type:

bool

This function allow verifying if the driver support dma-buf exportation.

New in version 1.24.

Property Details

GstAllocators.DRMDumbAllocator.props.drm_device_path
Name:

drm-device-path

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

DRM device path

New in version 1.24.

GstAllocators.DRMDumbAllocator.props.drm_fd
Name:

drm-fd

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

DRM file descriptor

New in version 1.24.