Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GstVa.buffer_pool_config_set_va_alignment(config, align)¶
- Parameters:
config (
Gst.Structure
) – theGst.Structure
with the pool’s configuration.align (
GstVideo.VideoAlignment
) – aGstVideo.VideoAlignment
Video alignment is not handled as expected by VA since it uses opaque surfaces, not directly mappable memory. Still, decoders might need to request bigger surfaces for coded size rather than display sizes. This method will set the coded size to bufferpool’s configuration, out of the typical video aligment.
New in version 1.20.2.
- GstVa.buffer_pool_config_set_va_allocation_params(config, usage_hint, use_derived)¶
- Parameters:
config (
Gst.Structure
) – theGst.Structure
with the pool’s configuration.usage_hint (
int
) – the VA usage hint for new VASurfaceID.use_derived (
GstVa.VaFeature
) – aGstVa.VaFeature
for derived mapping (only used when VA allocator).
Sets the usage hint for the buffers handled by the buffer pool.
New in version 1.22.
- GstVa.context_get_va_display(context, type_name, render_device_path)¶
- Parameters:
context (
Gst.Context
) – aGst.Context
may contain the displayrender_device_path (
str
) – thestr
string of render device path
- Returns:
whether we find a valid display in the context
- display_ptr:
the
GstVa.VaDisplay
we get
- Return type:
(
bool
, display_ptr:GstVa.VaDisplay
)
New in version 1.22.
- GstVa.context_set_va_display(context, display)¶
- Parameters:
context (
Gst.Context
) – aGst.Context
display (
GstVa.VaDisplay
) – theGstVa.VaDisplay
we want to set
Set the display in the context
New in version 1.22.
- GstVa.va_buffer_create_aux_surface(buffer)¶
- Parameters:
buffer (
Gst.Buffer
) – aGst.Buffer
- Returns:
True
if the new VASurfaceID is attached to buffer correctly;False
, otherwise.- Return type:
Creates a new VASurfaceID with buffer's allocator and attached it to it.
*This method is used only by plugin’s internal VA decoder.*
New in version 1.22.
- GstVa.va_buffer_peek_display(buffer)¶
- Parameters:
buffer (
Gst.Buffer
) – aGst.Buffer
- Returns:
the display which this buffer belongs to. The reference of the display is unchanged.
- Return type:
New in version 1.22.
- GstVa.va_context_query(element, context_type)¶
- Parameters:
element (
Gst.Element
) – aGst.Element
context_type (
str
) – thestr
string specify the context type name
Query the specified context type name.
New in version 1.22.
- GstVa.va_dmabuf_get_modifier_for_format(display, format, usage_hint)¶
- Parameters:
display (
GstVa.VaDisplay
) – aGstVa.VaDisplay
format (
GstVideo.VideoFormat
) – aGstVideo.VideoFormat
usage_hint (
int
) – VA usage hint
- Returns:
the underlying modifier.
- Return type:
Get the underlying modifier for specified format and usage_hint.
New in version 1.24.
- GstVa.va_dmabuf_memories_setup(display, drm_info, mem, fds, offset, usage_hint)¶
- Parameters:
display (
GstVa.VaDisplay
) – aGstVa.VaDisplay
drm_info (
GstVideo.VideoInfoDmaDrm
) – aGstVideo.VideoInfoDmaDrm
mem ([
Gst.Memory
]) – Memories. One per plane.fds ([
int
]) – array of DMABuf file descriptors.offset ([
int
]) – array of memory offsets.usage_hint (
int
) – VA usage hint.
- Returns:
True
if frame is imported correctly into a VASurfaceID;False
otherwise.- Return type:
It imports the array of mem, representing a single frame, into a VASurfaceID and it’s attached into every mem.
New in version 1.22.
- GstVa.va_element_propagate_display_context(element, display)¶
- Parameters:
element (
Gst.Element
) – aGst.Element
display (
GstVa.VaDisplay
) – theGstVa.VaDisplay
to propagate
Propagate display by posting it as
Gst.Context
in the pipeline’s bus.New in version 1.22.
- GstVa.va_ensure_element_data(element, render_device_path)¶
- Parameters:
element (
object
orNone
) – aGst.Element
render_device_path (
str
) – thestr
string of render device path
- Returns:
whether a
GstVa.VaDisplay
exists in display_ptr- display_ptr:
The
GstVa.VaDisplay
to ensure
- Return type:
(
bool
, display_ptr:GstVa.VaDisplay
)
Called by the va element to ensure a valid
GstVa.VaDisplay
.New in version 1.22.
- GstVa.va_handle_context_query(element, query, display)¶
- Parameters:
element (
Gst.Element
) – aGst.Element
display (
GstVa.VaDisplay
) – aGstVa.VaDisplay
to answer the query
- Returns:
whether we can handle the context query successfully
- Return type:
Used by elements when processing their pad’s queries, propagating element’s
GstVa.VaDisplay
if the processed query requests it.New in version 1.22.
- GstVa.va_handle_set_context(element, context, render_device_path)¶
- Parameters:
element (
Gst.Element
) – aGst.Element
context (
Gst.Context
) – aGst.Context
may contain the displayrender_device_path (
str
) – thestr
string of render device path
- Returns:
whether the display_ptr could be successfully set to a valid
GstVa.VaDisplay
in the context- display_ptr:
The
GstVa.VaDisplay
to set
- Return type:
(
bool
, display_ptr:GstVa.VaDisplay
)
Called by elements in their #GstElementClass::set_context vmethod. It gets a valid
GstVa.VaDisplay
if context has it.New in version 1.22.
- GstVa.va_memory_peek_display(mem)¶
- Parameters:
mem (
Gst.Memory
) – aGst.Memory
- Returns:
the display which this mem belongs to. The reference of the display is unchanged.
- Return type:
New in version 1.22.