From 614cd87732258cfaab2f1f75aaa0982a7d1591c4 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Mon, 4 Jan 2021 00:40:24 +0100 Subject: [PATCH] vulkan: Add missing `array length` and `(out)` annotation to parameters Add `array length` annotation for `layouts` such that `n_layouts` is properly marked as its length, and add `(out)` where a function returns in that parameter. Part-of: --- .../gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorcache.c | 3 ++- .../gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorpool.c | 3 +++ .../gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorset.c | 3 +++ subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkinstance.c | 6 +++--- subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkwindow.c | 8 ++++++++ 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorcache.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorcache.c index 6778dc1..cc815a5 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorcache.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorcache.c @@ -68,7 +68,8 @@ gst_vulkan_descriptor_cache_finalize (GObject * object) * gst_vulkan_descriptor_cache_new: * @pool: a #GstVulkanDescriptorPool * @n_layouts: number of @layouts - * @layouts: list of #GstVulkanHandle containing descriptor set layouts + * @layouts: (array length=n_layouts): list of #GstVulkanHandle containing + * descriptor set layouts * * Returns: (transfer full): a new #GstVulkanDescriptorCache * diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorpool.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorpool.c index 528e32e..99be8ed 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorpool.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorpool.c @@ -196,6 +196,9 @@ descriptor_set_alloc (GstVulkanDescriptorPool * pool, guint n_layouts, /** * gst_vulkan_descriptor_pool_create: * @pool: a #GstVulkanDescriptorPool + * @n_layouts: number of @layouts + * @layouts: (array length=n_layouts): list of #GstVulkanHandle containing + * descriptor set layouts * @error: a #GError * * Returns: a new #GstVulkanDescriptorSet diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorset.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorset.c index 1718382..549702e 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorset.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkdescriptorset.c @@ -117,6 +117,9 @@ gst_vulkan_descriptor_set_init (GstVulkanDescriptorSet * set, /** * gst_vulkan_descriptor_set_new_wrapped: * @set: a VkDescriptorSet + * @n_layouts: number of @layouts + * @layouts: (array length=n_layouts): list of #GstVulkanHandle containing + * descriptor set layouts * * Returns: (transfer full): a new #GstVulkanDescriptorSet * diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkinstance.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkinstance.c index 58631fc..cf6a65a 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkinstance.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkinstance.c @@ -1301,9 +1301,9 @@ gst_vulkan_instance_check_version (GstVulkanInstance * instance, /** * gst_vulkan_instance_get_version: * @instance: a #GstVulkanInstance - * @major: major version - * @minor: minor version - * @patch: patch version + * @major: (out): major version + * @minor: (out): minor version + * @patch: (out): patch version * * Retrieve the vulkan instance configured version. Only returns the supported * API version by the instance without taking into account the requested API diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkwindow.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkwindow.c index ed5a784..da2834a 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkwindow.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkwindow.c @@ -484,6 +484,14 @@ gst_vulkan_window_set_window_handle (GstVulkanWindow * window, guintptr handle) } } +/** + * gst_vulkan_window_get_surface_dimensions: + * @window: a #GstVulkanWindow + * @width: (out): Current width of @window + * @height: (out): Current height of @window + * + * Since: 1.18 + */ void gst_vulkan_window_get_surface_dimensions (GstVulkanWindow * window, guint * width, guint * height) -- 2.7.4