1 /* 2 * GStreamer 3 * Copyright (C) 2019 Matthew Waters <ystreet00@gmail.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_COCOA_H__ 22 #define __GST_VULKAN_WINDOW_COCOA_H__ 23 24 #include <gst/vulkan/vulkan.h> 25 #include <vulkan/vulkan_macos.h> 26 27 G_BEGIN_DECLS 28 29 #define GST_TYPE_VULKAN_WINDOW_COCOA (gst_vulkan_window_cocoa_get_type()) 30 #define GST_VULKAN_WINDOW_COCOA(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_WINDOW_COCOA, GstVulkanWindowCocoa)) 31 #define GST_VULKAN_WINDOW_COCOA_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_VULKAN_WINDOW_COCOA, GstVulkanWindowCocoaClass)) 32 #define GST_IS_VULKAN_WINDOW_COCOA(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_WINDOW_COCOA)) 33 #define GST_IS_VULKAN_WINDOW_COCOA_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_WINDOW_COCOA)) 34 #define GST_VULKAN_WINDOW_COCOA_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_WINDOW_COCOA, GstVulkanWindowCocoaClass)) 35 36 typedef struct _GstVulkanWindowCocoa GstVulkanWindowCocoa; 37 typedef struct _GstVulkanWindowCocoaPrivate GstVulkanWindowCocoaPrivate; 38 typedef struct _GstVulkanWindowCocoaClass GstVulkanWindowCocoaClass; 39 40 /** 41 * GstVulkanWindowCocoa: 42 * 43 * Opaque #GstVulkanWindowCocoa object 44 */ 45 struct _GstVulkanWindowCocoa 46 { 47 /*< private >*/ 48 GstVulkanWindow parent; 49 50 gpointer view; 51 52 gint visible :1; 53 54 PFN_vkCreateMacOSSurfaceMVK CreateMacOSSurface; 55 56 /*< private >*/ 57 gpointer _reserved[GST_PADDING]; 58 }; 59 60 /** 61 * GstVulkanWindowCocoaClass: 62 * 63 * Opaque #GstVulkanWindowCocoaClass object 64 */ 65 struct _GstVulkanWindowCocoaClass { 66 /*< private >*/ 67 GstVulkanWindowClass parent_class; 68 69 /*< private >*/ 70 gpointer _reserved[GST_PADDING_LARGE]; 71 }; 72 73 GType gst_vulkan_window_cocoa_get_type (void); 74 75 GstVulkanWindowCocoa * gst_vulkan_window_cocoa_new (GstVulkanDisplay * display); 76 77 gboolean gst_vulkan_window_cocoa_create_window (GstVulkanWindowCocoa * window_cocoa); 78 79 G_END_DECLS 80 81 #endif /* __GST_VULKAN_WINDOW_COCOA_H__ */ 82