VA allocators
There are two types of VA allocators:
gst_va_allocator_new
GstAllocator *
gst_va_allocator_new (GstVaDisplay * display,
GArray * surface_formats)
Instanciate a new pooled GstAllocator backed by VASurfaceID.
Parameters:
surface_formats
(
[element-typeguint][transfer: full])
–
a GArray
of valid GstVideoFormat for surfaces in current VA context.
Since : 1.22
GstVa.VaAllocator.prototype.new
function GstVa.VaAllocator.prototype.new(display: GstVa.VaDisplay, surface_formats: [ Number ]): {
}
Instanciate a new pooled Gst.Allocator backed by VASurfaceID.
Since : 1.22
GstVa.VaAllocator.new
def GstVa.VaAllocator.new (display, surface_formats):
Instanciate a new pooled Gst.Allocator backed by VASurfaceID.
Since : 1.22
gst_va_allocator_flush
gst_va_allocator_flush (GstAllocator * allocator)
Removes all the memories in allocator's pool.
Since : 1.22
GstVa.VaAllocator.prototype.flush
function GstVa.VaAllocator.prototype.flush(allocator: Gst.Allocator): {
}
Removes all the memories in allocator's pool.
Since : 1.22
GstVa.VaAllocator.flush
def GstVa.VaAllocator.flush (allocator):
Removes all the memories in allocator's pool.
Since : 1.22
gboolean
gst_va_allocator_get_format (GstAllocator * allocator,
GstVideoInfo * info,
guint * usage_hint,
gboolean * use_derived)
Gets current internal configuration of allocator.
Parameters:
usage_hint
(
[out][optional])
–
VA usage hint
use_derived
(
[out][optional])
–
whether derived images are used for buffer
mapping.
Returns
–
TRUE if allocator is already configured; FALSE
otherwise.
Since : 1.22
GstVa.VaAllocator.prototype.get_format
function GstVa.VaAllocator.prototype.get_format(allocator: Gst.Allocator): {
}
Gets current internal configuration of allocator.
Returns a tuple made of:
true if allocator is already configured; false
otherwise.
true if allocator is already configured; false
otherwise.
true if allocator is already configured; false
otherwise.
true if allocator is already configured; false
otherwise.
Since : 1.22
GstVa.VaAllocator.get_format
def GstVa.VaAllocator.get_format (allocator):
Gets current internal configuration of allocator.
Returns a tuple made of:
True if allocator is already configured; False
otherwise.
True if allocator is already configured; False
otherwise.
True if allocator is already configured; False
otherwise.
True if allocator is already configured; False
otherwise.
Since : 1.22
gst_va_allocator_prepare_buffer
gboolean
gst_va_allocator_prepare_buffer (GstAllocator * allocator,
GstBuffer * buffer)
This method will populate buffer with pooled VASurfaceID
memories. It doesn't allocate new VASurfacesID.
Returns
–
TRUE if buffer was populated correctly; FALSE
otherwise.
Since : 1.22
GstVa.VaAllocator.prototype.prepare_buffer
function GstVa.VaAllocator.prototype.prepare_buffer(allocator: Gst.Allocator, buffer: Gst.Buffer): {
}
This method will populate buffer with pooled VASurfaceID
memories. It doesn't allocate new VASurfacesID.
true if buffer was populated correctly; false
otherwise.
Since : 1.22
GstVa.VaAllocator.prepare_buffer
def GstVa.VaAllocator.prepare_buffer (allocator, buffer):
This method will populate buffer with pooled VASurfaceID
memories. It doesn't allocate new VASurfacesID.
True if buffer was populated correctly; False
otherwise.
Since : 1.22
gboolean
gst_va_allocator_set_format (GstAllocator * allocator,
GstVideoInfo * info,
guint usage_hint,
GstVaFeature feat_use_derived)
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.
Parameters:
usage_hint
–
VA usage hint
Returns
–
TRUE if the configuration is valid or updated; FALSE if
configuration is not valid or not updated.
Since : 1.22
GstVa.VaAllocator.prototype.set_format
function GstVa.VaAllocator.prototype.set_format(allocator: Gst.Allocator, info: GstVideo.VideoInfo, usage_hint: Number, feat_use_derived: GstVa.VaFeature): {
}
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.
Returns a tuple made of:
true if the configuration is valid or updated; false if
configuration is not valid or not updated.
true if the configuration is valid or updated; false if
configuration is not valid or not updated.
Since : 1.22
GstVa.VaAllocator.set_format
def GstVa.VaAllocator.set_format (allocator, info, usage_hint, feat_use_derived):
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.
Returns a tuple made of:
True if the configuration is valid or updated; False if
configuration is not valid or not updated.
True if the configuration is valid or updated; False if
configuration is not valid or not updated.
Since : 1.22
gst_va_allocator_setup_buffer
gboolean
gst_va_allocator_setup_buffer (GstAllocator * allocator,
GstBuffer * buffer)
Populates an empty buffer with a VASuface backed GstMemory.
Returns
–
TRUE if buffer is populated; FALSE otherwise.
Since : 1.22
GstVa.VaAllocator.prototype.setup_buffer
function GstVa.VaAllocator.prototype.setup_buffer(allocator: Gst.Allocator, buffer: Gst.Buffer): {
}
Populates an empty buffer with a VASuface backed Gst.Memory.
true if buffer is populated; false otherwise.
Since : 1.22
GstVa.VaAllocator.setup_buffer
def GstVa.VaAllocator.setup_buffer (allocator, buffer):
Populates an empty buffer with a VASuface backed Gst.Memory.
True if buffer is populated; False otherwise.
Since : 1.22
gst_va_dmabuf_allocator_new
GstAllocator *
gst_va_dmabuf_allocator_new (GstVaDisplay * display)
Instanciate a new pooled allocator backed with both DMABuf and
VASurfaceID.
Since : 1.22
GstVa.VaDmabufAllocator.prototype.new
function GstVa.VaDmabufAllocator.prototype.new(display: GstVa.VaDisplay): {
}
Instanciate a new pooled allocator backed with both DMABuf and
VASurfaceID.
Since : 1.22
GstVa.VaDmabufAllocator.new
def GstVa.VaDmabufAllocator.new (display):
Instanciate a new pooled allocator backed with both DMABuf and
VASurfaceID.
Since : 1.22
gst_va_dmabuf_allocator_flush
gst_va_dmabuf_allocator_flush (GstAllocator * allocator)
Removes all the memories in allocator's pool.
Since : 1.22
GstVa.VaDmabufAllocator.prototype.flush
function GstVa.VaDmabufAllocator.prototype.flush(allocator: Gst.Allocator): {
}
Removes all the memories in allocator's pool.
Since : 1.22
GstVa.VaDmabufAllocator.flush
def GstVa.VaDmabufAllocator.flush (allocator):
Removes all the memories in allocator's pool.
Since : 1.22
gboolean
gst_va_dmabuf_allocator_get_format (GstAllocator * allocator,
GstVideoInfoDmaDrm * info,
guint * usage_hint)
Gets current internal configuration of allocator.
Parameters:
usage_hint
(
[out][optional])
–
VA usage hint
Returns
–
TRUE if allocator is already configured; FALSE
otherwise.
Since : 1.22
GstVa.VaDmabufAllocator.prototype.get_format
function GstVa.VaDmabufAllocator.prototype.get_format(allocator: Gst.Allocator): {
}
Gets current internal configuration of allocator.
Returns a tuple made of:
true if allocator is already configured; false
otherwise.
true if allocator is already configured; false
otherwise.
true if allocator is already configured; false
otherwise.
Since : 1.22
GstVa.VaDmabufAllocator.get_format
def GstVa.VaDmabufAllocator.get_format (allocator):
Gets current internal configuration of allocator.
Returns a tuple made of:
True if allocator is already configured; False
otherwise.
True if allocator is already configured; False
otherwise.
True if allocator is already configured; False
otherwise.
Since : 1.22
gst_va_dmabuf_allocator_prepare_buffer
gboolean
gst_va_dmabuf_allocator_prepare_buffer (GstAllocator * allocator,
GstBuffer * buffer)
This method will populate buffer with pooled VASurfaceID/DMABuf
memories. It doesn't allocate new VASurfacesID.
Returns
–
TRUE if buffer was populated correctly; FALSE
otherwise.
Since : 1.22
GstVa.VaDmabufAllocator.prototype.prepare_buffer
function GstVa.VaDmabufAllocator.prototype.prepare_buffer(allocator: Gst.Allocator, buffer: Gst.Buffer): {
}
This method will populate buffer with pooled VASurfaceID/DMABuf
memories. It doesn't allocate new VASurfacesID.
true if buffer was populated correctly; false
otherwise.
Since : 1.22
GstVa.VaDmabufAllocator.prepare_buffer
def GstVa.VaDmabufAllocator.prepare_buffer (allocator, buffer):
This method will populate buffer with pooled VASurfaceID/DMABuf
memories. It doesn't allocate new VASurfacesID.
True if buffer was populated correctly; False
otherwise.
Since : 1.22
gboolean
gst_va_dmabuf_allocator_set_format (GstAllocator * allocator,
GstVideoInfoDmaDrm * info,
guint usage_hint)
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.
Parameters:
usage_hint
–
VA usage hint
Returns
–
TRUE if the configuration is valid or updated; FALSE if
configuration is not valid or not updated.
Since : 1.22
GstVa.VaDmabufAllocator.prototype.set_format
function GstVa.VaDmabufAllocator.prototype.set_format(allocator: Gst.Allocator, usage_hint: Number): {
}
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.
Returns a tuple made of:
true if the configuration is valid or updated; false if
configuration is not valid or not updated.
true if the configuration is valid or updated; false if
configuration is not valid or not updated.
Since : 1.22
GstVa.VaDmabufAllocator.set_format
def GstVa.VaDmabufAllocator.set_format (allocator, usage_hint):
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.
Returns a tuple made of:
True if the configuration is valid or updated; False if
configuration is not valid or not updated.
True if the configuration is valid or updated; False if
configuration is not valid or not updated.
Since : 1.22
gst_va_dmabuf_allocator_setup_buffer
gboolean
gst_va_dmabuf_allocator_setup_buffer (GstAllocator * allocator,
GstBuffer * buffer)
This function creates a new VASurfaceID and exposes its DMABufs,
later it populates the buffer with those DMABufs.
Return: TRUE if buffer is populated correctly; FALSE otherwise.
Returns
–
No description available
Since : 1.22
GstVa.VaDmabufAllocator.prototype.setup_buffer
function GstVa.VaDmabufAllocator.prototype.setup_buffer(allocator: Gst.Allocator, buffer: Gst.Buffer): {
}
This function creates a new VASurfaceID and exposes its DMABufs,
later it populates the buffer with those DMABufs.
Return: true if buffer is populated correctly; false otherwise.
Since : 1.22
GstVa.VaDmabufAllocator.setup_buffer
def GstVa.VaDmabufAllocator.setup_buffer (allocator, buffer):
This function creates a new VASurfaceID and exposes its DMABufs,
later it populates the buffer with those DMABufs.
Return: True if buffer is populated correctly; False otherwise.
Since : 1.22
gst_va_buffer_create_aux_surface
gboolean
gst_va_buffer_create_aux_surface (GstBuffer * buffer)
Creates a new VASurfaceID with buffer's allocator and attached it
to it.
This method is used only by plugin's internal VA decoder.
Returns
–
TRUE if the new VASurfaceID is attached to buffer
correctly; FALSE, otherwise.
Since : 1.22
GstVa.prototype.va_buffer_create_aux_surface
function GstVa.prototype.va_buffer_create_aux_surface(buffer: Gst.Buffer): {
}
Creates a new VASurfaceID with buffer's allocator and attached it
to it.
This method is used only by plugin's internal VA decoder.
true if the new VASurfaceID is attached to buffer
correctly; false, otherwise.
Since : 1.22
GstVa.va_buffer_create_aux_surface
def GstVa.va_buffer_create_aux_surface (buffer):
Creates a new VASurfaceID with buffer's allocator and attached it
to it.
This method is used only by plugin's internal VA decoder.
True if the new VASurfaceID is attached to buffer
correctly; False, otherwise.
Since : 1.22
guint64
gst_va_dmabuf_get_modifier_for_format (GstVaDisplay * display,
GstVideoFormat format,
guint usage_hint)
Get the underlying modifier for specified format and usage_hint.
Parameters:
usage_hint
–
VA usage hint
Returns
–
the underlying modifier.
Since : 1.24
GstVa.prototype.va_dmabuf_get_modifier_for_format
function GstVa.prototype.va_dmabuf_get_modifier_for_format(display: GstVa.VaDisplay, format: GstVideo.VideoFormat, usage_hint: Number): {
}
Get the underlying modifier for specified format and usage_hint.
Since : 1.24
GstVa.va_dmabuf_get_modifier_for_format
def GstVa.va_dmabuf_get_modifier_for_format (display, format, usage_hint):
Get the underlying modifier for specified format and usage_hint.
Since : 1.24
gst_va_dmabuf_memories_setup
gboolean
gst_va_dmabuf_memories_setup (GstVaDisplay * display,
GstVideoInfoDmaDrm * drm_info,
GstMemory ** mem,
uintptr_t* fds,
gsize * offset,
guint usage_hint)
It imports the array of mem, representing a single frame, into a
VASurfaceID and it's attached into every mem.
Parameters:
mem
(
[arrayfixed-size=4][element-typeGstMemory])
–
Memories. One
per plane.
fds
(
[arrayfixed-size=4][element-typeuintptr_t])
–
array of
DMABuf file descriptors.
offset
(
[arrayfixed-size=4][element-typegsize])
–
array of memory
offsets.
usage_hint
–
VA usage hint.
Returns
–
TRUE if frame is imported correctly into a VASurfaceID;
FALSE otherwise.
Since : 1.22
GstVa.prototype.va_dmabuf_memories_setup
function GstVa.prototype.va_dmabuf_memories_setup(display: GstVa.VaDisplay, drm_info: GstVideo.VideoInfoDmaDrm, mem: [ Gst.Memory ], fds: [ Number ], offset: [ Number ], usage_hint: Number): {
}
It imports the array of mem, representing a single frame, into a
VASurfaceID and it's attached into every mem.
Parameters:
array of
DMABuf file descriptors.
true if frame is imported correctly into a VASurfaceID;
false otherwise.
Since : 1.22
GstVa.va_dmabuf_memories_setup
def GstVa.va_dmabuf_memories_setup (display, drm_info, mem, fds, offset, usage_hint):
It imports the array of mem, representing a single frame, into a
VASurfaceID and it's attached into every mem.
Parameters:
array of
DMABuf file descriptors.
True if frame is imported correctly into a VASurfaceID;
False otherwise.
Since : 1.22
GST_MAP_VA
#define GST_MAP_VA (GST_MAP_FLAG_LAST << 1)
Flag indicating that we should map the VASurfaceID instead of to
system memory, so users can use libva primitives to operate with
that surface.
Since : 1.22
GstVa.MAP_VA
Flag indicating that we should map the VASurfaceID instead of to
system memory, so users can use libva primitives to operate with
that surface.
Since : 1.22
GstVa.MAP_VA
Flag indicating that we should map the VASurfaceID instead of to
system memory, so users can use libva primitives to operate with
that surface.
Since : 1.22