Debian Codegraph @

gst-libs/gst/vulkan/gstvkinstance.h

raw symbols SCIP
1 /*
2 * GStreamer
3 * Copyright (C) 2015 Matthew Waters <[email protected]>
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_INSTANCE_H__
22 #define __GST_VULKAN_INSTANCE_H__
23
24 #include <gst/vulkan/vulkan.h>
25
26 G_BEGIN_DECLS
27
28 #define GST_TYPE_VULKAN_INSTANCE (gst_vulkan_instance_get_type())
29 #define GST_VULKAN_INSTANCE(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_INSTANCE, GstVulkanInstance))
30 #define GST_VULKAN_INSTANCE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GST_TYPE_VULKAN_INSTANCE, GstVulkanInstanceClass))
31 #define GST_IS_VULKAN_INSTANCE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_INSTANCE))
32 #define GST_IS_VULKAN_INSTANCE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_INSTANCE))
33 #define GST_VULKAN_INSTANCE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_INSTANCE, GstVulkanInstanceClass))
34 GST_VULKAN_API
35 GType gst_vulkan_instance_get_type (void);
36
37 /**
38 * GST_VULKAN_INSTANCE_CONTEXT_TYPE_STR:
39 *
40 * Since: 1.18
41 */
42 #define GST_VULKAN_INSTANCE_CONTEXT_TYPE_STR "gst.vulkan.instance"
43
44 /**
45 * GstVulkanInstance:
46 * @parent: parent #GstObject
47 * @instance: the Vulkan instance handle
48 * @physical_devices: list of vulkan physical device handles
49 * @n_physical_device: number of entries in @physical_devices
50 *
51 * Since: 1.18
52 */
53 struct _GstVulkanInstance
54 {
55 GstObject parent;
56
57 VkInstance instance; /* hides a pointer */
58 VkPhysicalDevice *physical_devices; /* hides a pointer */
59 guint32 n_physical_devices;
60
61 /* <private> */
62 gpointer _reserved [GST_PADDING];
63 };
64
65 /**
66 * GstVulkanInstanceClass:
67 * @parent_class: parent #GstObjectClass
68 *
69 * Since: 1.18
70 */
71 struct _GstVulkanInstanceClass
72 {
73 GstObjectClass parent_class;
74
75 /* <private> */
76 gpointer _reserved [GST_PADDING];
77 };
78
79 G_DEFINE_AUTOPTR_CLEANUP_FUNC (GstVulkanInstance, gst_object_unref)
80
81 GST_VULKAN_API
82 GstVulkanInstance * gst_vulkan_instance_new (void) G_GNUC_WARN_UNUSED_RESULT;
83 GST_VULKAN_API
84 gboolean gst_vulkan_instance_fill_info (GstVulkanInstance * instance,
85 GError ** error);
86 GST_VULKAN_API
87 gboolean gst_vulkan_instance_open (GstVulkanInstance * instance,
88 GError ** error);
89
90 GST_VULKAN_API
91 gpointer gst_vulkan_instance_get_proc_address (GstVulkanInstance * instance,
92 const gchar * name);
93
94 GST_VULKAN_API
95 GstVulkanDevice * gst_vulkan_instance_create_device (GstVulkanInstance * instance,
96 GError ** error) G_GNUC_WARN_UNUSED_RESULT;
97 GST_VULKAN_API
98 GstVulkanDevice * gst_vulkan_instance_create_device_with_index(GstVulkanInstance * instance,
99 guint device_index,
100 GError ** error) G_GNUC_WARN_UNUSED_RESULT;
101
102 GST_VULKAN_API
103 void gst_context_set_vulkan_instance (GstContext * context,
104 GstVulkanInstance * instance);
105 GST_VULKAN_API
106 gboolean gst_context_get_vulkan_instance (GstContext * context,
107 GstVulkanInstance ** instance);
108 GST_VULKAN_API
109 gboolean gst_vulkan_instance_handle_context_query (GstElement * element,
110 GstQuery * query,
111 GstVulkanInstance * instance);
112 GST_VULKAN_API
113 gboolean gst_vulkan_instance_run_context_query (GstElement * element,
114 GstVulkanInstance ** instance);
115 GST_VULKAN_API
116 gboolean gst_vulkan_instance_check_version (GstVulkanInstance * instance,
117 guint major,
118 guint minor,
119 guint patch);
120 GST_VULKAN_API
121 void gst_vulkan_instance_get_version (GstVulkanInstance * instance,
122 guint * major,
123 guint * minor,
124 guint * patch);
125
126 GST_VULKAN_API
127 gboolean gst_vulkan_instance_get_extension_info (GstVulkanInstance * instance,
128 const gchar * name,
129 guint32 * spec_version);
130 GST_VULKAN_API
131 gboolean gst_vulkan_instance_enable_extension (GstVulkanInstance * instance,
132 const gchar * name);
133 GST_VULKAN_API
134 gboolean gst_vulkan_instance_disable_extension (GstVulkanInstance * instance,
135 const gchar * name);
136 GST_VULKAN_API
137 gboolean gst_vulkan_instance_is_extension_enabled (GstVulkanInstance * instance,
138 const gchar * name);
139 GST_VULKAN_API
140 gboolean gst_vulkan_instance_get_layer_info (GstVulkanInstance * instance,
141 const gchar * name,
142 gchar ** description,
143 guint32 * spec_version,
144 guint32 * implementation_version);
145 GST_VULKAN_API
146 gboolean gst_vulkan_instance_enable_layer (GstVulkanInstance * instance,
147 const gchar * name);
148 GST_VULKAN_API
149 gboolean gst_vulkan_instance_is_layer_enabled (GstVulkanInstance * instance,
150 const gchar * name);
151 GST_VULKAN_API
152 void gst_vulkan_instance_get_api_version (GstVulkanInstance * instance,
153 guint * major,
154 guint * minor,
155 guint * patch);
156 GST_VULKAN_API
157 gboolean gst_vulkan_instance_check_api_version (GstVulkanInstance * instance,
158 guint major,
159 guint minor,
160 guint patch);
161
162 G_END_DECLS
163
164 #endif /* __GST_VULKAN_INSTANCE_H__ */