vulkan/videofilter: add getters for queue/device/instance

Allows bindings to not pke at structs for this information.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6987>
This commit is contained in:
Matthew Waters 2024-06-02 23:36:28 +10:00
parent a7a70ca7b6
commit 013026b06a
3 changed files with 109 additions and 0 deletions

View file

@ -5824,6 +5824,48 @@ signalled and freed.</doc>
</record>
<class name="VulkanVideoFilter" c:symbol-prefix="vulkan_video_filter" c:type="GstVulkanVideoFilter" version="1.18" parent="GstBase.BaseTransform" glib:type-name="GstVulkanVideoFilter" glib:get-type="gst_vulkan_video_filter_get_type" glib:type-struct="VulkanVideoFilterClass">
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideofilter.h"/>
<method name="get_device" c:identifier="gst_vulkan_video_filter_get_device" version="1.26">
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideofilter.h"/>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideofilter.c">The currently configured
#GstVulkanDevice</doc>
<type name="VulkanDevice" c:type="GstVulkanDevice*"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideofilter.c">a #GstVulkanVideoFilter</doc>
<type name="VulkanVideoFilter" c:type="GstVulkanVideoFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_instance" c:identifier="gst_vulkan_video_filter_get_instance" version="1.26">
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideofilter.h"/>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideofilter.c">The currently configured
#GstVulkanInstance</doc>
<type name="VulkanInstance" c:type="GstVulkanInstance*"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideofilter.c">a #GstVulkanVideoFilter</doc>
<type name="VulkanVideoFilter" c:type="GstVulkanVideoFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_queue" c:identifier="gst_vulkan_video_filter_get_queue" version="1.26">
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideofilter.h"/>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideofilter.c">The currently configured
#GstVulkanQueue</doc>
<type name="VulkanQueue" c:type="GstVulkanQueue*"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideofilter.c">a #GstVulkanVideoFilter</doc>
<type name="VulkanVideoFilter" c:type="GstVulkanVideoFilter*"/>
</instance-parameter>
</parameters>
</method>
<field name="parent">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkvideofilter.h">the parent #GstBaseTransform</doc>
<type name="GstBase.BaseTransform" c:type="GstBaseTransform"/>

View file

@ -310,3 +310,63 @@ gst_vulkan_video_filter_stop (GstBaseTransform * bt)
return TRUE;
}
/**
* gst_vulkan_video_filter_get_instance:
* @filter: a #GstVulkanVideoFilter
*
* Returns: (transfer full) (nullable): The currently configured
* #GstVulkanInstance
*
* Since: 1.26
*/
GstVulkanInstance *
gst_vulkan_video_filter_get_instance (GstVulkanVideoFilter * filter)
{
g_return_val_if_fail (GST_IS_VULKAN_VIDEO_FILTER (filter), NULL);
if (filter->instance)
return gst_object_ref (filter->instance);
else
return NULL;
}
/**
* gst_vulkan_video_filter_get_device:
* @filter: a #GstVulkanVideoFilter
*
* Returns: (transfer full) (nullable): The currently configured
* #GstVulkanDevice
*
* Since: 1.26
*/
GstVulkanDevice *
gst_vulkan_video_filter_get_device (GstVulkanVideoFilter * filter)
{
g_return_val_if_fail (GST_IS_VULKAN_VIDEO_FILTER (filter), NULL);
if (filter->device)
return gst_object_ref (filter->device);
else
return NULL;
}
/**
* gst_vulkan_video_filter_get_queue:
* @filter: a #GstVulkanVideoFilter
*
* Returns: (transfer full) (nullable): The currently configured
* #GstVulkanQueue
*
* Since: 1.26
*/
GstVulkanQueue *
gst_vulkan_video_filter_get_queue (GstVulkanVideoFilter * filter)
{
g_return_val_if_fail (GST_IS_VULKAN_VIDEO_FILTER (filter), NULL);
if (filter->queue)
return gst_object_ref (filter->queue);
else
return NULL;
}

View file

@ -85,6 +85,13 @@ struct _GstVulkanVideoFilterClass
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVulkanVideoFilter, gst_object_unref);
GST_VULKAN_API
GstVulkanInstance * gst_vulkan_video_filter_get_instance (GstVulkanVideoFilter * filter);
GST_VULKAN_API
GstVulkanDevice * gst_vulkan_video_filter_get_device (GstVulkanVideoFilter * filter);
GST_VULKAN_API
GstVulkanQueue * gst_vulkan_video_filter_get_queue (GstVulkanVideoFilter * filter);
G_END_DECLS
#endif