Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GstVa.buffer_pool_config_set_va_alignment(config, align)¶
- Parameters:
config (
Gst.Structure) – theGst.Structurewith 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.Structurewith the pool’s configuration.usage_hint (
int) – the VA usage hint for new VASurfaceID.use_derived (
GstVa.VaFeature) – aGstVa.VaFeaturefor 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.Contextmay contain the displayrender_device_path (
str) – thestrstring of render device path
- Returns:
whether we find a valid display in the context
- display_ptr:
the
GstVa.VaDisplaywe 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.Contextdisplay (
GstVa.VaDisplay) – theGstVa.VaDisplaywe 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:
Trueif 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.Elementcontext_type (
str) – thestrstring 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.VaDisplayformat (
GstVideo.VideoFormat) – aGstVideo.VideoFormatusage_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.VaDisplaydrm_info (
GstVideo.VideoInfoDmaDrm) – aGstVideo.VideoInfoDmaDrmmem ([
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:
Trueif frame is imported correctly into a VASurfaceID;Falseotherwise.- 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.Elementdisplay (
GstVa.VaDisplay) – theGstVa.VaDisplayto propagate
Propagate display by posting it as
Gst.Contextin the pipeline’s bus.New in version 1.22.
- GstVa.va_ensure_element_data(element, render_device_path)¶
- Parameters:
element (
objectorNone) – aGst.Elementrender_device_path (
str) – thestrstring of render device path
- Returns:
whether a
GstVa.VaDisplayexists in display_ptr- display_ptr:
The
GstVa.VaDisplayto 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.Elementdisplay (
GstVa.VaDisplay) – aGstVa.VaDisplayto 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.VaDisplayif 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.Elementcontext (
Gst.Context) – aGst.Contextmay contain the displayrender_device_path (
str) – thestrstring of render device path
- Returns:
whether the display_ptr could be successfully set to a valid
GstVa.VaDisplayin the context- display_ptr:
The
GstVa.VaDisplayto set
- Return type:
(
bool, display_ptr:GstVa.VaDisplay)
Called by elements in their #GstElementClass::set_context vmethod. It gets a valid
GstVa.VaDisplayif 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.