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.Memorybacked 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:
Trueif allocator is already configured;Falseotherwise.- 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.VaDisplaysurface_formats ([
int]) – aGLib.Arrayof validGstVideo.VideoFormatfor surfaces in current VA context.
- Returns:
- Return type:
Instanciate a new pooled
Gst.Allocatorbacked 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.Allocatorbuffer (
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.Allocatorinfo (
GstVideo.VideoInfo) – aGstVideo.VideoInfousage_hint (
int) – VA usage hintfeat_use_derived (
GstVa.VaFeature) – aGstVa.VaFeature
- Returns:
Trueif the configuration is valid or updated;Falseif 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.Allocatorbuffer (
Gst.Buffer) – aGst.Buffer
- Returns:
- Return type:
Populates an empty buffer with a VASuface backed
Gst.Memory.New in version 1.22.