GstVa.VaDmabufAllocator¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GstVa.VaDmabufAllocator(**kwargs)¶
- Bases:
- 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
) – 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
- 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
) – aGstVa.VaDisplay
- Returns:
a new allocated
Gst.Allocator
- Return type:
Instanciate a new pooled allocator backed with both DMABuf and VASurfaceID.
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/DMABuf memories. It doesn’t allocate new VASurfacesID.
New in version 1.22.
- classmethod set_format(allocator, usage_hint)¶
- Parameters:
allocator (
Gst.Allocator
) – aGst.Allocator
usage_hint (
int
) – VA usage hint
- Returns:
True
if the configuration is valid or updated;False
if configuration is not valid or not updated.- info:
- 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:
allocator (
Gst.Allocator
) – aGst.Allocator
buffer (
Gst.Buffer
) – an emptyGst.Buffer
- Returns:
- Return type:
This function creates a new VASurfaceID and exposes its DMABufs, later it populates the buffer with those DMABufs.
New in version 1.22.