GstVulkan.VulkanOperation¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
Vulkan Command Pool |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
cmd_buf |
r |
the current |
|
parent |
r |
the parent |
Class Details¶
- class GstVulkan.VulkanOperation(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
When using the operation cmd_buf, you should lock it using gst_vulkan_command_buffer_lock(), but you have to unlock it, with gst_vulkan_command_buffer_unlock(), when calling any of
GstVulkan.VulkanOperationmethods.New in version 1.24.
- classmethod new(cmd_pool)¶
- Parameters:
cmd_pool (
GstVulkan.VulkanCommandPool) – aGstVulkan.VulkanCommandPool- Returns:
a newly allocated
GstVulkan.VulkanOperation- Return type:
- add_dependency_frame(frame, wait_stage, signal_stage)¶
- Parameters:
frame (
Gst.Buffer) – a Vulkan ImageGst.Bufferwait_stage (
int) – pipeline stage to wait (Vulkan.PipelineStageFlagsorVulkan.PipelineStageFlags2)signal_stage (
int) – pipeline stage to signal (Vulkan.PipelineStageFlagsorVulkan.PipelineStageFlags2)
- Returns:
whether the frame was added as dependency.
- Return type:
Add frame as an operation dependency by adding the timeline semaphores in each memory of frame into either the wait semaphore array. The signal array hold the same semaphores but increasing their current value.
- add_frame_barrier(frame, src_stage, dst_stage, new_access, new_layout, new_queue)¶
- Parameters:
frame (
Gst.Buffer) – a Vulkan ImageGst.Buffersrc_stage (
int) – source pipeline stage (Vulkan.PipelineStageFlagsorVulkan.PipelineStageFlags2)dst_stage (
int) – destination pipeline stage (Vulkan.PipelineStageFlagsorVulkan.PipelineStageFlags2)new_access (
int) – the new access flags (Vulkan.AccessFlags2orVulkan.AccessFlags)new_layout (
Vulkan.ImageLayout) – the newVulkan.ImageLayoutnew_queue (
GstVulkan.VulkanQueueorNone) – destinationGstVulkan.VulkanQueuefor a transfer of frame ownership
- Returns:
whether the frame barriers were appended
- Return type:
See also:
GstVulkan.VulkanOperation.update_frame()Adds an image memory barrier per memory in frame with its future state. And it updates the frame barrier state by calling internally
GstVulkan.VulkanOperation.update_frame().
- begin()¶
- Raises:
- Returns:
whether the operation started. It might fill error.
- Return type:
See also:
GstVulkan.VulkanOperation.end() andGstVulkan.VulkanOperation.reset()Attempts to set the operation ready to work. It instantiates the common command buffer in self and calls vkBeginCommandBuffer.
After calling this function you can register commands in the command buffer, and finally call
GstVulkan.VulkanOperation.end().GstVulkan.VulkanOperation.reset() is called internally if something failed.
- begin_query(base, id)¶
- Parameters:
base (
Vulkan.BaseInStructure) – aVulkan.BaseInStructurebaseid (
int) – query id
- Returns:
whether the begin command was set
- Return type:
Begins a query operation with id in the current command buffer. If video maintenance1 extension is available the query will be recorded as a video inline query. If
Noneis passed to base, the query will be recorded as a normal query anyway.New in version 1.26.
- discard_dependencies()¶
Discards barriers, and all the semaphore arrays populated by
GstVulkan.VulkanOperation.add_dependency_frame().
- enable_query(query_type, n_queries, pnext)¶
- Parameters:
query_type (
int) – theVulkan.QueryTypeto enablen_queries (
int) – number of queries to enablepnext (
objectorNone) – the structure pointer to use as pNext
- Raises:
- Returns:
whether the query pool was enabled. It might populate error in case of error.
- Return type:
Tries to enable the query pool for the current operation.
New in version 1.24.
- end()¶
- Raises:
- Returns:
whether the operation failed. It might fill error.
- Return type:
See also:
GstVulkan.VulkanOperation.begin() andGstVulkan.VulkanOperation.reset()It calls vkEndCommandBuffer, and later either vkQueueSubmit or vkQueueSubmit2KHR filling up the semaphores from images declared as dependencies.
You have called
GstVulkan.VulkanOperation.begin() before.GstVulkan.VulkanOperation.reset() is called internally if something fails
- end_query(id)¶
-
Ends a query operation with id in the current command buffer. A query with id has had started with
GstVulkan.VulkanOperation.begin_query()
- get_query()¶
- Raises:
- Returns:
whether a status was fetched. If not, it might populate error
- data:
result of all queries
- Return type:
Gets the latest operation results of all the queries in data. API users have to parse the binary array of data according of their needs (usually is a guint32 array of size of n_query).
Don’t free data.
- pipeline_barrier2(dependency_info)¶
- Parameters:
dependency_info (
objectorNone) – a pointer toVulkan.DependencyInfo- Returns:
Trueif vkCmdPipelineBarrier2{KHR} it’s available.False, otherwise.- Return type:
It’s a wrapper to vkCmdPipelineBarrier2{KHR} if it’s available.
- reset()¶
Resets the operation to a clean state.
- update_frame(frame, dst_stage, new_access, new_layout, new_queue)¶
- Parameters:
frame (
Gst.Buffer) – aGst.Bufferto update after submitdst_stage (
int) – destination pipeline stage (Vulkan.PipelineStageFlagsorVulkan.PipelineStageFlags2)new_access (
int) – the new access flags (Vulkan.AccessFlags2orVulkan.AccessFlags)new_layout (
Vulkan.ImageLayout) – the newVulkan.ImageLayoutnew_queue (
GstVulkan.VulkanQueueorNone) – destinationGstVulkan.VulkanQueuefor a transfer of frame ownership
Add or update the internal list of the future state of frame. This state will be set after
GstVulkan.VulkanOperation.end().This method is useful when new barriers are added to the array without using
GstVulkan.VulkanOperation.add_frame_barrier().
- use_sync2()¶
- Returns:
whether the operations are using synchronization2 extension.
- Return type:
Property Details¶
- GstVulkan.VulkanOperation.props.command_pool¶
- Name:
command-pool- Type:
- Default Value:
- Flags:
Vulkan Command Pool