• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_ANDROID_H__
22 #define __GST_VULKAN_WINDOW_ANDROID_H__
23 
24 #include <gst/vulkan/vulkan.h>
25 #include <vulkan/vulkan_android.h>
26 
27 G_BEGIN_DECLS
28 
29 #define GST_TYPE_VULKAN_WINDOW_ANDROID         (gst_vulkan_window_android_get_type())
30 #define GST_VULKAN_WINDOW_ANDROID(o)           (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_WINDOW_ANDROID, GstVulkanWindowAndroid))
31 #define GST_VULKAN_WINDOW_ANDROID_CLASS(k)     (G_TYPE_CHECK_CLASS((k), GST_TYPE_VULKAN_WINDOW_ANDROID, GstVulkanWindowAndroidClass))
32 #define GST_IS_VULKAN_WINDOW_ANDROID(o)        (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_WINDOW_ANDROID))
33 #define GST_IS_VULKAN_WINDOW_ANDROID_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_WINDOW_ANDROID))
34 #define GST_VULKAN_WINDOW_ANDROID_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_WINDOW_ANDROID, GstVulkanWindowAndroidClass))
35 
36 typedef struct _GstVulkanWindowAndroid        GstVulkanWindowAndroid;
37 typedef struct _GstVulkanWindowAndroidPrivate GstVulkanWindowAndroidPrivate;
38 typedef struct _GstVulkanWindowAndroidClass   GstVulkanWindowAndroidClass;
39 
40 /**
41  * GstVulkanWindowAndroid:
42  *
43  * Opaque #GstVulkanWindowAndroid object
44  */
45 struct _GstVulkanWindowAndroid
46 {
47   /*< private >*/
48   GstVulkanWindow parent;
49 
50   gint          visible :1;
51 
52   PFN_vkCreateAndroidSurfaceKHR CreateAndroidSurface;
53 
54   /*< private >*/
55   gpointer _reserved[GST_PADDING];
56 };
57 
58 /**
59  * GstVulkanWindowAndroidClass:
60  *
61  * Opaque #GstVulkanWindowAndroidClass object
62  */
63 struct _GstVulkanWindowAndroidClass {
64   /*< private >*/
65   GstVulkanWindowClass parent_class;
66 
67   /*< private >*/
68   gpointer _reserved[GST_PADDING_LARGE];
69 };
70 
71 GType gst_vulkan_window_android_get_type     (void);
72 
73 GstVulkanWindowAndroid * gst_vulkan_window_android_new (GstVulkanDisplay * display);
74 
75 gboolean gst_vulkan_window_android_create_window (GstVulkanWindowAndroid * window_android);
76 
77 G_END_DECLS
78 
79 #endif /* __GST_VULKAN_WINDOW_ANDROID_H__ */
80