GstVa.VaDmabufAllocator

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 GstVa.VaDmabufAllocator GstVa.VaDmabufAllocator Gst.Allocator->GstVa.VaDmabufAllocator Gst.Object->Gst.Allocator

Subclasses:

None

Methods

Inherited:

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

Structs:

GObject.ObjectClass (5)

class

flush (allocator)

class

get_format (allocator)

class

new (display)

class

prepare_buffer (allocator, buffer)

class

set_format (allocator, usage_hint)

class

setup_buffer (allocator, buffer)

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)

Class Details

class GstVa.VaDmabufAllocator(**kwargs)
Bases:

Gst.Allocator

Abstract:

No

A pooled memory allocator backed by the DMABufs exported from a VASurfaceID. Also it is possible to import DMAbufs into a VASurfaceID.

New in version 1.22.

classmethod flush(allocator)
Parameters:

allocator (Gst.Allocator) – a Gst.Allocator

Removes all the memories in allocator's pool.

New in version 1.22.

classmethod get_format(allocator)
Parameters:

allocator (Gst.Allocator) – a Gst.Allocator

Returns:

True if allocator is already configured; False otherwise.

info:

a GstVideo.VideoInfoDmaDrm

usage_hint:

VA usage hint

Return type:

(bool, info: GstVideo.VideoInfoDmaDrm, usage_hint: int)

Gets current internal configuration of allocator.

New in version 1.22.

classmethod new(display)
Parameters:

display (GstVa.VaDisplay) – a GstVa.VaDisplay

Returns:

a new allocated Gst.Allocator

Return type:

Gst.Allocator

Instanciate a new pooled allocator backed with both DMABuf and VASurfaceID.

New in version 1.22.

classmethod prepare_buffer(allocator, buffer)
Parameters:
Returns:

True if buffer was populated correctly; False otherwise.

Return type:

bool

This method will populate buffer with pooled VASurfaceID/DMABuf memories. It doesn’t allocate new VASurfacesID.

New in version 1.22.

classmethod set_format(allocator, usage_hint)
Parameters:
Returns:

True if the configuration is valid or updated; False if configuration is not valid or not updated.

info:

a GstVideo.VideoInfoDmaDrm

Return type:

(bool, info: GstVideo.VideoInfoDmaDrm)

Sets the configuration defined by info and usage_hint for allocator, and it tries the configuration, if allocator has not allocated memories yet.

If allocator has memory allocated already, and frame size, format and modifier in info are the same as currently configured in allocator, the rest of info parameters are updated internally.

New in version 1.22.

classmethod setup_buffer(allocator, buffer)
Parameters:
Returns:

True if buffer is populated correctly; False otherwise.

Return type:

bool

This function creates a new VASurfaceID and exposes its DMABufs, later it populates the buffer with those DMABufs.

New in version 1.22.