rtsp-server:wfd: Fix build error for gcc upgrade
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-bad / gst-libs / gst / vulkan / gstvkdescriptorpool.h
1 /*
2  * GStreamer
3  * Copyright (C) 2019 Matthew Waters <matthew@centricular.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20
21 #ifndef __GST_VULKAN_DESCRIPTOR_POOL_H__
22 #define __GST_VULKAN_DESCRIPTOR_POOL_H__
23
24 #include <gst/vulkan/gstvkqueue.h>
25
26 GST_VULKAN_API
27 GType gst_vulkan_descriptor_pool_get_type       (void);
28 #define GST_TYPE_VULKAN_DESCRIPTOR_POOL         (gst_vulkan_descriptor_pool_get_type())
29 #define GST_VULKAN_DESCRIPTOR_POOL(o)           (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_DESCRIPTOR_POOL, GstVulkanDescriptorPool))
30 #define GST_VULKAN_DESCRIPTOR_POOL_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GST_TYPE_VULKAN_DESCRIPTOR_POOL, GstVulkanDescriptorPoolClass))
31 #define GST_IS_VULKAN_DESCRIPTOR_POOL(o)        (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_DESCRIPTOR_POOL))
32 #define GST_IS_VULKAN_DESCRIPTOR_POOL_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_DESCRIPTOR_POOL))
33 #define GST_VULKAN_DESCRIPTOR_POOL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_DESCRIPTOR_POOL, GstVulkanDescriptorPoolClass))
34
35 /**
36  * GstVulkanDescriptorPool:
37  * @parent: the parent #GstObject
38  * @device: the #GstVulkanDevice for descriptor sets
39  * @pool: the vulksn descriptor pool handle
40  *
41  * Since: 1.18
42  */
43 struct _GstVulkanDescriptorPool
44 {
45   GstObject parent;
46
47   GstVulkanDevice *device;
48
49   VkDescriptorPool pool; /* hides a pointer */
50
51   /* <private> */
52   gpointer _reserved        [GST_PADDING];
53 };
54
55 /**
56  * GstVulkanDescriptorPoolClass:
57  * @parent_class: the parent #GstObjectClass
58  *
59  * Since: 1.18
60  */
61 struct _GstVulkanDescriptorPoolClass
62 {
63   GstObjectClass parent_class;
64
65   /* <private> */
66   gpointer _reserved        [GST_PADDING];
67 };
68
69 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVulkanDescriptorPool, gst_object_unref);
70
71 GST_VULKAN_API
72 GstVulkanDescriptorPool *   gst_vulkan_descriptor_pool_new_wrapped      (GstVulkanDevice * device,
73                                                                          VkDescriptorPool pool,
74                                                                          gsize max_sets);
75
76 GST_VULKAN_API
77 GstVulkanDevice *           gst_vulkan_descriptor_pool_get_device       (GstVulkanDescriptorPool * pool);
78
79 GST_VULKAN_API
80 GstVulkanDescriptorSet *    gst_vulkan_descriptor_pool_create           (GstVulkanDescriptorPool * pool,
81                                                                          guint n_layouts,
82                                                                          GstVulkanHandle **layouts,
83                                                                          GError ** error);
84 GST_VULKAN_API
85 gsize                       gst_vulkan_descriptor_pool_get_max_sets     (GstVulkanDescriptorPool * pool);
86
87 #endif /* __GST_VULKAN_DESCRIPTOR_POOL_H__ */