GstVa.VaAllocator¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GstVa.VaAllocator(**kwargs)¶
- Bases:
- Abstract:
No
There are two types of VA allocators:
New in version 1.22.
- classmethod alloc(allocator)¶
- Parameters:
allocator (
Gst.Allocator
) – aGst.Allocator
- Returns:
a
Gst.Memory
backed with a VASurfaceID;None
, otherwise.- Return type:
Allocate a new VASurfaceID backed
Gst.Memory
.New in version 1.22.
- classmethod flush(allocator)¶
- Parameters:
allocator (
Gst.Allocator
) – aGst.Allocator
Removes all the memories in allocator's pool.
New in version 1.22.
- classmethod get_format(allocator)¶
- Parameters:
allocator (
Gst.Allocator
) – aGst.Allocator
- Returns:
True
if allocator is already configured;False
otherwise.- info:
- 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:
display (
GstVa.VaDisplay
) – aGstVa.VaDisplay
surface_formats ([
int
]) – aGLib.Array
of validGstVideo.VideoFormat
for surfaces in current VA context.
- Returns:
- Return type:
Instanciate a new pooled
Gst.Allocator
backed by VASurfaceID.New in version 1.22.
- classmethod peek_display(allocator)¶
- Parameters:
allocator (
Gst.Allocator
) – aGst.Allocator
- Returns:
the display which this allocator belongs to. The reference of the display is unchanged.
- Return type:
New in version 1.22.
- classmethod prepare_buffer(allocator, buffer)¶
- Parameters:
allocator (
Gst.Allocator
) – aGst.Allocator
buffer (
Gst.Buffer
) – an emptyGst.Buffer
- Returns:
- Return type:
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:
allocator (
Gst.Allocator
) – aGst.Allocator
info (
GstVideo.VideoInfo
) – aGstVideo.VideoInfo
usage_hint (
int
) – VA usage hintfeat_use_derived (
GstVa.VaFeature
) – aGstVa.VaFeature
- Returns:
True
if the configuration is valid or updated;False
if configuration is not valid or not updated.- info:
- 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:
allocator (
Gst.Allocator
) – aGst.Allocator
buffer (
Gst.Buffer
) – aGst.Buffer
- Returns:
- Return type:
Populates an empty buffer with a VASuface backed
Gst.Memory
.New in version 1.22.