Merging gst-plugins-bad
[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 GST_VULKAN_API
70 GstVulkanDescriptorPool *   gst_vulkan_descriptor_pool_new_wrapped      (GstVulkanDevice * device,
71                                                                          VkDescriptorPool pool,
72                                                                          gsize max_sets);
73
74 GST_VULKAN_API
75 GstVulkanDevice *           gst_vulkan_descriptor_pool_get_device       (GstVulkanDescriptorPool * pool);
76
77 GST_VULKAN_API
78 GstVulkanDescriptorSet *    gst_vulkan_descriptor_pool_create           (GstVulkanDescriptorPool * pool,
79                                                                          guint n_layouts,
80                                                                          GstVulkanHandle **layouts,
81                                                                          GError ** error);
82 GST_VULKAN_API
83 gsize                       gst_vulkan_descriptor_pool_get_max_sets     (GstVulkanDescriptorPool * pool);
84
85 #endif /* __GST_VULKAN_DESCRIPTOR_POOL_H__ */