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.VulkanOperation
methods.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.Buffer
wait_stage (
int
) – pipeline stage to wait (Vulkan.PipelineStageFlags
or VkPipelineStageFlags2)signal_stage (
int
) – pipeline stage to signal (Vulkan.PipelineStageFlags
or VkPipelineStageFlags2)
- 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, dst_stage, new_access, new_layout, new_queue)¶
- Parameters:
frame (
Gst.Buffer
) – a Vulkan ImageGst.Buffer
dst_stage (
int
) – destination pipeline stage (Vulkan.PipelineStageFlags
or VkPipelineStageFlags2)new_access (
int
) – the new access flags (VkAccessFlags2 orVulkan.AccessFlags
)new_layout (
Vulkan.ImageLayout
) – the newVulkan.ImageLayout
new_queue (
GstVulkan.VulkanQueue
orNone
) – destinationGstVulkan.VulkanQueue
for 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(id)¶
-
Begins a query operation in the current command buffer.
- 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.QueryType
to enablen_queries (
int
) – number of queries to enablepnext (
object
orNone
) – 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 in the current command buffer.
- 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 (
object
orNone
) – a pointer to VkDependencyInfo- Returns:
True
if 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.Buffer
to update after submitdst_stage (
int
) – destination pipeline stage (Vulkan.PipelineStageFlags
or VkPipelineStageFlags2)new_access (
int
) – the new access flags (VkAccessFlags2 orVulkan.AccessFlags
)new_layout (
Vulkan.ImageLayout
) – the newVulkan.ImageLayout
new_queue (
GstVulkan.VulkanQueue
orNone
) – destinationGstVulkan.VulkanQueue
for 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