GstVulkanOperation
A GstVulkanOperation abstract a queue operation for images adding automatically semaphores and barriers. It uses Synchronization2 extension if available. Also it enables a VkQueryPool if it's possible and it's requested.
GstVulkanEncodeQueryResult
Encoder query result. Expected to be used in gst_vulkan_operation_get_query
Since : 1.26
GstVulkan.VulkanEncodeQueryResult
Encoder query result. Expected to be used in GstVulkan.VulkanOperation.prototype.get_query
Since : 1.26
GstVulkan.VulkanEncodeQueryResult
Encoder query result. Expected to be used in GstVulkan.VulkanOperation.get_query
Since : 1.26
GstVulkanOperation
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstVulkanOperation
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 GstVulkanOperation methods.
Members
cmd_buf
(GstVulkanCommandBuffer *)
–
the current GstVulkanCommandBuffer
Since : 1.24
Class structure
GstVulkan.VulkanOperation
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──GstVulkan.VulkanOperation
When using the operation cmd_buf, you should lock it using gst_vulkan_command_buffer_lock (not introspectable), but you have to unlock it, with gst_vulkan_command_buffer_unlock (not introspectable), when calling any of GstVulkan.VulkanOperation methods.
Members
parent
(Gst.Object)
–
the parent Gst.Object
cmd_buf
(GstVulkan.VulkanCommandBuffer)
–
the current GstVulkan.VulkanCommandBuffer
Since : 1.24
GstVulkan.VulkanOperation
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──GstVulkan.VulkanOperation
When using the operation cmd_buf, you should lock it using gst_vulkan_command_buffer_lock (not introspectable), but you have to unlock it, with gst_vulkan_command_buffer_unlock (not introspectable), when calling any of GstVulkan.VulkanOperation methods.
Members
parent
(Gst.Object)
–
the parent Gst.Object
cmd_buf
(GstVulkan.VulkanCommandBuffer)
–
the current GstVulkan.VulkanCommandBuffer
Since : 1.24
Constructors
gst_vulkan_operation_new
GstVulkanOperation * gst_vulkan_operation_new (GstVulkanCommandPool * cmd_pool)
Parameters:
cmd_pool
–
a newly allocated GstVulkanOperation
GstVulkan.VulkanOperation.prototype.new
function GstVulkan.VulkanOperation.prototype.new(cmd_pool: GstVulkan.VulkanCommandPool): {
// javascript wrapper for 'gst_vulkan_operation_new'
}
Parameters:
a newly allocated GstVulkan.VulkanOperation
GstVulkan.VulkanOperation.new
def GstVulkan.VulkanOperation.new (cmd_pool):
#python wrapper for 'gst_vulkan_operation_new'
Parameters:
a newly allocated GstVulkan.VulkanOperation
Methods
gst_vulkan_operation_add_dependency_frame
gboolean gst_vulkan_operation_add_dependency_frame (GstVulkanOperation * self, GstBuffer * frame, guint64 wait_stage, guint64 signal_stage)
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.
Parameters:
self
–
frame
–
a Vulkan Image GstBuffer
wait_stage
–
pipeline stage to wait (VkPipelineStageFlags or VkPipelineStageFlags2)
signal_stage
–
pipeline stage to signal (VkPipelineStageFlags or VkPipelineStageFlags2)
whether the frame was added as dependency.
GstVulkan.VulkanOperation.prototype.add_dependency_frame
function GstVulkan.VulkanOperation.prototype.add_dependency_frame(frame: Gst.Buffer, wait_stage: Number, signal_stage: Number): {
// javascript wrapper for 'gst_vulkan_operation_add_dependency_frame'
}
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.
Parameters:
a Vulkan Image Gst.Buffer
pipeline stage to wait (VkPipelineStageFlags or VkPipelineStageFlags2)
pipeline stage to signal (VkPipelineStageFlags or VkPipelineStageFlags2)
whether the frame was added as dependency.
GstVulkan.VulkanOperation.add_dependency_frame
def GstVulkan.VulkanOperation.add_dependency_frame (self, frame, wait_stage, signal_stage):
#python wrapper for 'gst_vulkan_operation_add_dependency_frame'
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.
Parameters:
a Vulkan Image Gst.Buffer
pipeline stage to wait (VkPipelineStageFlags or VkPipelineStageFlags2)
pipeline stage to signal (VkPipelineStageFlags or VkPipelineStageFlags2)
whether the frame was added as dependency.
gst_vulkan_operation_add_extra_image_barriers
gst_vulkan_operation_add_extra_image_barriers (GstVulkanOperation * self, GArray * extra_barriers)
See also: gst_vulkan_operation_use_sync2, gst_vulkan_operation_new_extra_image_barriers and gst_vulkan_operation_update_frame
Any non-repeated image barrier in extra_barriers is appended to the internal barrier list.
Remember to call gst_vulkan_operation_update_frame on those frames with images in extra_barriers.
Parameters:
self
–
extra_barriers
–
a GArray of extra image memory barriers to handle, either VkImageMemoryBarrier or VkImageMemoryBarrier2KHR, depending whether synchronization2 extension is used.
gst_vulkan_operation_add_frame_barrier
gboolean gst_vulkan_operation_add_frame_barrier (GstVulkanOperation * self, GstBuffer * frame, guint64 src_stage, guint64 dst_stage, guint64 new_access, VkImageLayout new_layout, GstVulkanQueue * new_queue)
See also: gst_vulkan_operation_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 gst_vulkan_operation_update_frame.
Parameters:
self
–
frame
–
a Vulkan Image GstBuffer
src_stage
–
source pipeline stage (VkPipelineStageFlags or VkPipelineStageFlags2)
dst_stage
–
destination pipeline stage (VkPipelineStageFlags or VkPipelineStageFlags2)
new_access
–
the new access flags (VkAccessFlags2 or VkAccessFlags)
new_layout
–
the new VkImageLayout
new_queue
(
[nullable])
–
destination GstVulkanQueue for a transfer of frame ownership
whether the frame barriers were appended
GstVulkan.VulkanOperation.prototype.add_frame_barrier
function GstVulkan.VulkanOperation.prototype.add_frame_barrier(frame: Gst.Buffer, src_stage: Number, dst_stage: Number, new_access: Number, new_layout: Vulkan.ImageLayout, new_queue: GstVulkan.VulkanQueue): {
// javascript wrapper for 'gst_vulkan_operation_add_frame_barrier'
}
See also: GstVulkan.VulkanOperation.prototype.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.prototype.update_frame.
Parameters:
a Vulkan Image Gst.Buffer
source pipeline stage (VkPipelineStageFlags or VkPipelineStageFlags2)
destination pipeline stage (VkPipelineStageFlags or VkPipelineStageFlags2)
the new access flags (VkAccessFlags2 or VkAccessFlags)
new_layout
(Vulkan.ImageLayout)
–
the new VkImageLayout
destination GstVulkan.VulkanQueue for a transfer of frame ownership
whether the frame barriers were appended
GstVulkan.VulkanOperation.add_frame_barrier
def GstVulkan.VulkanOperation.add_frame_barrier (self, frame, src_stage, dst_stage, new_access, new_layout, new_queue):
#python wrapper for 'gst_vulkan_operation_add_frame_barrier'
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.
Parameters:
a Vulkan Image Gst.Buffer
source pipeline stage (VkPipelineStageFlags or VkPipelineStageFlags2)
destination pipeline stage (VkPipelineStageFlags or VkPipelineStageFlags2)
the new access flags (VkAccessFlags2 or VkAccessFlags)
new_layout
(Vulkan.ImageLayout)
–
the new VkImageLayout
destination GstVulkan.VulkanQueue for a transfer of frame ownership
whether the frame barriers were appended
gst_vulkan_operation_begin
gboolean gst_vulkan_operation_begin (GstVulkanOperation * self, GError ** error)
See also: gst_vulkan_operation_end and gst_vulkan_operation_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 gst_vulkan_operation_end. gst_vulkan_operation_reset is called internally if something failed.
whether the operation started. It might fill error.
GstVulkan.VulkanOperation.prototype.begin
function GstVulkan.VulkanOperation.prototype.begin(): {
// javascript wrapper for 'gst_vulkan_operation_begin'
}
See also: GstVulkan.VulkanOperation.prototype.end and GstVulkan.VulkanOperation.prototype.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.prototype.end. GstVulkan.VulkanOperation.prototype.reset is called internally if something failed.
Parameters:
whether the operation started. It might fill error.
GstVulkan.VulkanOperation.begin
@raises(GLib.GError)
def GstVulkan.VulkanOperation.begin (self):
#python wrapper for 'gst_vulkan_operation_begin'
See also: GstVulkan.VulkanOperation.end and GstVulkan.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.
Parameters:
whether the operation started. It might fill error.
gst_vulkan_operation_begin_query
gboolean gst_vulkan_operation_begin_query (GstVulkanOperation * self, guint32 id)
Begins a query operation with id in the current command buffer.
whether the begin command was set
GstVulkan.VulkanOperation.prototype.begin_query
function GstVulkan.VulkanOperation.prototype.begin_query(id: Number): {
// javascript wrapper for 'gst_vulkan_operation_begin_query'
}
Begins a query operation with id in the current command buffer.
whether the begin command was set
GstVulkan.VulkanOperation.begin_query
def GstVulkan.VulkanOperation.begin_query (self, id):
#python wrapper for 'gst_vulkan_operation_begin_query'
Begins a query operation with id in the current command buffer.
whether the begin command was set
gst_vulkan_operation_discard_dependencies
gst_vulkan_operation_discard_dependencies (GstVulkanOperation * self)
Discards barriers, and all the semaphore arrays populated by gst_vulkan_operation_add_dependency_frame.
Parameters:
self
–
GstVulkan.VulkanOperation.prototype.discard_dependencies
function GstVulkan.VulkanOperation.prototype.discard_dependencies(): {
// javascript wrapper for 'gst_vulkan_operation_discard_dependencies'
}
Discards barriers, and all the semaphore arrays populated by GstVulkan.VulkanOperation.prototype.add_dependency_frame.
Parameters:
GstVulkan.VulkanOperation.discard_dependencies
def GstVulkan.VulkanOperation.discard_dependencies (self):
#python wrapper for 'gst_vulkan_operation_discard_dependencies'
Discards barriers, and all the semaphore arrays populated by GstVulkan.VulkanOperation.add_dependency_frame.
Parameters:
gst_vulkan_operation_enable_query
gboolean gst_vulkan_operation_enable_query (GstVulkanOperation * self, VkQueryType query_type, guint n_queries, gpointer pnext, GError ** error)
Tries to enable the query pool for the current operation.
Parameters:
self
–
query_type
(
[typeguint32])
–
the VkQueryType to enable
n_queries
–
number of queries to enable
pnext
–
the structure pointer to use as pNext
error
–
a GError
whether the query pool was enabled. It might populate error in case of error.
Since : 1.24
GstVulkan.VulkanOperation.prototype.enable_query
function GstVulkan.VulkanOperation.prototype.enable_query(query_type: Number, n_queries: Number, pnext: Object): {
// javascript wrapper for 'gst_vulkan_operation_enable_query'
}
Tries to enable the query pool for the current operation.
Parameters:
the VkQueryType to enable
number of queries to enable
the structure pointer to use as pNext
whether the query pool was enabled. It might populate error in case of error.
Since : 1.24
GstVulkan.VulkanOperation.enable_query
@raises(GLib.GError)
def GstVulkan.VulkanOperation.enable_query (self, query_type, n_queries, pnext):
#python wrapper for 'gst_vulkan_operation_enable_query'
Tries to enable the query pool for the current operation.
Parameters:
the VkQueryType to enable
number of queries to enable
the structure pointer to use as pNext
whether the query pool was enabled. It might populate error in case of error.
Since : 1.24
gst_vulkan_operation_end
gboolean gst_vulkan_operation_end (GstVulkanOperation * self, GError ** error)
See also: gst_vulkan_operation_begin and gst_vulkan_operation_reset
It calls vkEndCommandBuffer, and later either vkQueueSubmit or vkQueueSubmit2KHR filling up the semaphores from images declared as dependencies.
You have called gst_vulkan_operation_begin before. gst_vulkan_operation_reset is called internally if something fails
whether the operation failed. It might fill error.
GstVulkan.VulkanOperation.prototype.end
function GstVulkan.VulkanOperation.prototype.end(): {
// javascript wrapper for 'gst_vulkan_operation_end'
}
See also: GstVulkan.VulkanOperation.prototype.begin and GstVulkan.VulkanOperation.prototype.reset
It calls vkEndCommandBuffer, and later either vkQueueSubmit or vkQueueSubmit2KHR filling up the semaphores from images declared as dependencies.
You have called GstVulkan.VulkanOperation.prototype.begin before. GstVulkan.VulkanOperation.prototype.reset is called internally if something fails
Parameters:
whether the operation failed. It might fill error.
GstVulkan.VulkanOperation.end
@raises(GLib.GError)
def GstVulkan.VulkanOperation.end (self):
#python wrapper for 'gst_vulkan_operation_end'
See also: GstVulkan.VulkanOperation.begin and GstVulkan.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
Parameters:
whether the operation failed. It might fill error.
gst_vulkan_operation_end_query
gboolean gst_vulkan_operation_end_query (GstVulkanOperation * self, guint32 id)
Ends a query operation with id in the current command buffer. A query with id has had started with gst_vulkan_operation_begin_query
whether the end command was set
GstVulkan.VulkanOperation.prototype.end_query
function GstVulkan.VulkanOperation.prototype.end_query(id: Number): {
// javascript wrapper for 'gst_vulkan_operation_end_query'
}
Ends a query operation with id in the current command buffer. A query with id has had started with GstVulkan.VulkanOperation.prototype.begin_query
whether the end command was set
GstVulkan.VulkanOperation.end_query
def GstVulkan.VulkanOperation.end_query (self, id):
#python wrapper for 'gst_vulkan_operation_end_query'
Ends a query operation with id in the current command buffer. A query with id has had started with GstVulkan.VulkanOperation.begin_query
whether the end command was set
gst_vulkan_operation_get_query
gboolean gst_vulkan_operation_get_query (GstVulkanOperation * self, gpointer * data, GError ** error)
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.
whether a status was fetched. If not, it might populate error
GstVulkan.VulkanOperation.prototype.get_query
function GstVulkan.VulkanOperation.prototype.get_query(): {
// javascript wrapper for 'gst_vulkan_operation_get_query'
}
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.
Parameters:
Returns a tuple made of:
whether a status was fetched. If not, it might populate error
whether a status was fetched. If not, it might populate error
GstVulkan.VulkanOperation.get_query
@raises(GLib.GError)
def GstVulkan.VulkanOperation.get_query (self):
#python wrapper for 'gst_vulkan_operation_get_query'
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.
Parameters:
Returns a tuple made of:
whether a status was fetched. If not, it might populate error
whether a status was fetched. If not, it might populate error
gst_vulkan_operation_new_extra_image_barriers
GArray * gst_vulkan_operation_new_extra_image_barriers (GstVulkanOperation * self)
See also: gst_vulkan_operation_use_sync2, gst_vulkan_operation_add_extra_image_barriers and gst_vulkan_operation_update_frame
If it's required to add custom image memory barriers this function will allocate a new array to append in it the extra image memory barriers to handle.
Remember to call gst_vulkan_operation_update_frame after adding the barrier related with that frame.
Parameters:
self
–
A new allocated array of barriers, either VkImageMemoryBarrier or VkImageMemoryBarrier2KHR, depending whether synchronization2 extension is used.
gst_vulkan_operation_pipeline_barrier2
gboolean gst_vulkan_operation_pipeline_barrier2 (GstVulkanOperation * self, gpointer dependency_info)
It's a wrapper to vkCmdPipelineBarrier2{KHR} if it's available.
GstVulkan.VulkanOperation.prototype.pipeline_barrier2
function GstVulkan.VulkanOperation.prototype.pipeline_barrier2(dependency_info: Object): {
// javascript wrapper for 'gst_vulkan_operation_pipeline_barrier2'
}
It's a wrapper to vkCmdPipelineBarrier2{KHR} if it's available.
Parameters:
a pointer to VkDependencyInfo
GstVulkan.VulkanOperation.pipeline_barrier2
def GstVulkan.VulkanOperation.pipeline_barrier2 (self, dependency_info):
#python wrapper for 'gst_vulkan_operation_pipeline_barrier2'
It's a wrapper to vkCmdPipelineBarrier2{KHR} if it's available.
Parameters:
a pointer to VkDependencyInfo
gst_vulkan_operation_reset
gst_vulkan_operation_reset (GstVulkanOperation * self)
Resets the operation to a clean state.
Parameters:
self
–
GstVulkan.VulkanOperation.prototype.reset
function GstVulkan.VulkanOperation.prototype.reset(): {
// javascript wrapper for 'gst_vulkan_operation_reset'
}
Resets the operation to a clean state.
Parameters:
GstVulkan.VulkanOperation.reset
def GstVulkan.VulkanOperation.reset (self):
#python wrapper for 'gst_vulkan_operation_reset'
Resets the operation to a clean state.
Parameters:
gst_vulkan_operation_retrieve_image_barriers
GArray * gst_vulkan_operation_retrieve_image_barriers (GstVulkanOperation * self)
Retrieves a copy of the current defined barriers internally, which will be used by vkCmdPipelineBarrier or vkCmdPipelineBarrier2KHR by the API user.
The element type of the array might be, depending on if synchronization2 extension is used, either VkImageMemoryBarrier or VkImageMemoryBarrier2KHR.
Parameters:
self
–
Current barriers array. Call g_array_unref after the operation is using.
gst_vulkan_operation_update_frame
gst_vulkan_operation_update_frame (GstVulkanOperation * self, GstBuffer * frame, guint64 dst_stage, guint64 new_access, VkImageLayout new_layout, GstVulkanQueue * new_queue)
Add or update the internal list of the future state of frame. This state will be set after gst_vulkan_operation_end.
This method is useful when new barriers are added to the array without using gst_vulkan_operation_add_frame_barrier.
Parameters:
self
–
frame
–
a GstBuffer to update after submit
dst_stage
–
destination pipeline stage (VkPipelineStageFlags or VkPipelineStageFlags2)
new_access
–
the new access flags (VkAccessFlags2 or VkAccessFlags)
new_layout
–
the new VkImageLayout
new_queue
(
[nullable])
–
destination GstVulkanQueue for a transfer of frame ownership
GstVulkan.VulkanOperation.prototype.update_frame
function GstVulkan.VulkanOperation.prototype.update_frame(frame: Gst.Buffer, dst_stage: Number, new_access: Number, new_layout: Vulkan.ImageLayout, new_queue: GstVulkan.VulkanQueue): {
// javascript wrapper for 'gst_vulkan_operation_update_frame'
}
Add or update the internal list of the future state of frame. This state will be set after GstVulkan.VulkanOperation.prototype.end.
This method is useful when new barriers are added to the array without using GstVulkan.VulkanOperation.prototype.add_frame_barrier.
Parameters:
a Gst.Buffer to update after submit
destination pipeline stage (VkPipelineStageFlags or VkPipelineStageFlags2)
the new access flags (VkAccessFlags2 or VkAccessFlags)
new_layout
(Vulkan.ImageLayout)
–
the new VkImageLayout
destination GstVulkan.VulkanQueue for a transfer of frame ownership
GstVulkan.VulkanOperation.update_frame
def GstVulkan.VulkanOperation.update_frame (self, frame, dst_stage, new_access, new_layout, new_queue):
#python wrapper for 'gst_vulkan_operation_update_frame'
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.
Parameters:
a Gst.Buffer to update after submit
destination pipeline stage (VkPipelineStageFlags or VkPipelineStageFlags2)
the new access flags (VkAccessFlags2 or VkAccessFlags)
new_layout
(Vulkan.ImageLayout)
–
the new VkImageLayout
destination GstVulkan.VulkanQueue for a transfer of frame ownership
gst_vulkan_operation_use_sync2
gboolean gst_vulkan_operation_use_sync2 (GstVulkanOperation * self)
Parameters:
self
–
whether the operations are using synchronization2 extension.
GstVulkan.VulkanOperation.prototype.use_sync2
function GstVulkan.VulkanOperation.prototype.use_sync2(): {
// javascript wrapper for 'gst_vulkan_operation_use_sync2'
}
Parameters:
whether the operations are using synchronization2 extension.
GstVulkan.VulkanOperation.use_sync2
def GstVulkan.VulkanOperation.use_sync2 (self):
#python wrapper for 'gst_vulkan_operation_use_sync2'
Parameters:
whether the operations are using synchronization2 extension.
gst_vulkan_operation_wait
gboolean gst_vulkan_operation_wait (GstVulkanOperation * self)
Waits for the operation's fence to signal.
Parameters:
self
–
whether the operation succeed.
GstVulkan.VulkanOperation.prototype.wait
function GstVulkan.VulkanOperation.prototype.wait(): {
// javascript wrapper for 'gst_vulkan_operation_wait'
}
Waits for the operation's fence to signal.
Parameters:
whether the operation succeed.
GstVulkan.VulkanOperation.wait
def GstVulkan.VulkanOperation.wait (self):
#python wrapper for 'gst_vulkan_operation_wait'
Waits for the operation's fence to signal.
Parameters:
whether the operation succeed.
Properties
command_pool
“self.props.command_pool” GstVulkan.VulkanCommandPool
Flags : Read / Write / Construct Only
The results of the search are