Merging gst-plugins-bad
[platform/upstream/gstreamer.git] / gst-libs / gst / vulkan / ios / gstvkwindow_ios.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_WINDOW_IOS_H__
22 #define __GST_VULKAN_WINDOW_IOS_H__
23
24 #include <gst/vulkan/vulkan.h>
25 #include <vulkan/vulkan_ios.h>
26
27 G_BEGIN_DECLS
28
29 #define GST_TYPE_VULKAN_WINDOW_IOS         (gst_vulkan_window_ios_get_type())
30 #define GST_VULKAN_WINDOW_IOS(o)           (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_WINDOW_IOS, GstVulkanWindowIos))
31 #define GST_VULKAN_WINDOW_IOS_CLASS(k)     (G_TYPE_CHECK_CLASS((k), GST_TYPE_VULKAN_WINDOW_IOS, GstVulkanWindowIosClass))
32 #define GST_IS_VULKAN_WINDOW_IOS(o)        (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_WINDOW_IOS))
33 #define GST_IS_VULKAN_WINDOW_IOS_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_WINDOW_IOS))
34 #define GST_VULKAN_WINDOW_IOS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_WINDOW_IOS, GstVulkanWindowIosClass))
35
36 typedef struct _GstVulkanWindowIos        GstVulkanWindowIos;
37 typedef struct _GstVulkanWindowIosPrivate GstVulkanWindowIosPrivate;
38 typedef struct _GstVulkanWindowIosClass   GstVulkanWindowIosClass;
39
40 /**
41  * GstVulkanWindowIos:
42  *
43  * Opaque #GstVulkanWindowIos object
44  */
45 struct _GstVulkanWindowIos
46 {
47   /*< private >*/
48   GstVulkanWindow parent;
49
50   gpointer view;
51
52   gint          visible :1;
53
54   PFN_vkCreateIOSSurfaceMVK CreateIOSSurface;
55
56   /*< private >*/
57   gpointer _reserved[GST_PADDING];
58 };
59
60 /**
61  * GstVulkanWindowIosClass:
62  *
63  * Opaque #GstVulkanWindowIosClass object
64  */
65 struct _GstVulkanWindowIosClass {
66   /*< private >*/
67   GstVulkanWindowClass parent_class;
68
69   /*< private >*/
70   gpointer _reserved[GST_PADDING_LARGE];
71 };
72
73 GType gst_vulkan_window_ios_get_type     (void);
74
75 GstVulkanWindowIos * gst_vulkan_window_ios_new (GstVulkanDisplay * display);
76
77 gboolean gst_vulkan_window_ios_create_window (GstVulkanWindowIos * window_ios);
78
79 G_END_DECLS
80
81 #endif /* __GST_VULKAN_WINDOW_IOS_H__ */