GstVa.VaAllocator

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

Subclasses:

None

Methods

Inherited:

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

Structs:

GObject.ObjectClass (5)

class

alloc (allocator)

class

flush (allocator)

class

get_format (allocator)

class

new (display, surface_formats)

class

peek_display (allocator)

class

prepare_buffer (allocator, buffer)

class

set_format (allocator, info, usage_hint, feat_use_derived)

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.VaAllocator(**kwargs)
Bases:

Gst.Allocator

Abstract:

No

There are two types of VA allocators:

New in version 1.22.

classmethod alloc(allocator)
Parameters:

allocator (Gst.Allocator) – a Gst.Allocator

Returns:

a Gst.Memory backed with a VASurfaceID; None, otherwise.

Return type:

Gst.Memory

Allocate a new VASurfaceID backed Gst.Memory.

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.VideoInfo

usage_hint:

VA usage hint

use_derived:

whether derived images are used for buffer mapping.

Return type:

(bool, info: GstVideo.VideoInfo, usage_hint: int, use_derived: bool)

Gets current internal configuration of allocator.

New in version 1.22.

classmethod new(display, surface_formats)
Parameters:
Returns:

a GstVa.VaDisplay

Return type:

Gst.Allocator

Instanciate a new pooled Gst.Allocator backed by VASurfaceID.

New in version 1.22.

classmethod peek_display(allocator)
Parameters:

allocator (Gst.Allocator) – a Gst.Allocator

Returns:

the display which this allocator belongs to. The reference of the display is unchanged.

Return type:

GstVa.VaDisplay

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 memories. It doesn’t allocate new VASurfacesID.

New in version 1.22.

classmethod set_format(allocator, info, usage_hint, feat_use_derived)
Parameters:
Returns:

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

info:

a GstVideo.VideoInfo

Return type:

(bool, info: GstVideo.VideoInfo)

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

If allocator has memory allocated already, and frame size and format 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; False otherwise.

Return type:

bool

Populates an empty buffer with a VASuface backed Gst.Memory.

New in version 1.22.