Functions

buffer_pool_config_set_va_alignment (config, align)

buffer_pool_config_set_va_allocation_params (config, usage_hint, use_derived)

context_get_va_display (context, type_name, render_device_path)

context_set_va_display (context, display)

va_buffer_create_aux_surface (buffer)

va_buffer_peek_display (buffer)

va_context_query (element, context_type)

va_dmabuf_get_modifier_for_format (display, format, usage_hint)

va_dmabuf_memories_setup (display, drm_info, mem, fds, offset, usage_hint)

va_element_propagate_display_context (element, display)

va_ensure_element_data (element, render_device_path)

va_handle_context_query (element, query, display)

va_handle_set_context (element, context, render_device_path)

va_memory_peek_display (mem)

Details

GstVa.buffer_pool_config_set_va_alignment(config, align)
Parameters:

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:

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) – a Gst.Context may contain the display

  • type_name (str) – a str string of the element type

  • render_device_path (str) – the str 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:

Set the display in the context

New in version 1.22.

GstVa.va_buffer_create_aux_surface(buffer)
Parameters:

buffer (Gst.Buffer) – a Gst.Buffer

Returns:

True if the new VASurfaceID is attached to buffer correctly; False, otherwise.

Return type:

bool

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) – a Gst.Buffer

Returns:

the display which this buffer belongs to. The reference of the display is unchanged.

Return type:

GstVa.VaDisplay

New in version 1.22.

GstVa.va_context_query(element, context_type)
Parameters:

Query the specified context type name.

New in version 1.22.

GstVa.va_dmabuf_get_modifier_for_format(display, format, usage_hint)
Parameters:
Returns:

the underlying modifier.

Return type:

int

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:
Returns:

True if frame is imported correctly into a VASurfaceID; False otherwise.

Return type:

bool

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:

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:
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:
Returns:

whether we can handle the context query successfully

Return type:

bool

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:
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) – a Gst.Memory

Returns:

the display which this mem belongs to. The reference of the display is unchanged.

Return type:

GstVa.VaDisplay

New in version 1.22.