1 /* 2 * GStreamer 3 * Copyright (C) 2016 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_VK_DISPLAY_WAYLAND_H__ 22 #define __GST_VK_DISPLAY_WAYLAND_H__ 23 24 #include <gst/gst.h> 25 26 #include <wayland-client.h> 27 28 #include <vk.h> 29 30 G_BEGIN_DECLS 31 32 GType gst_vulkan_display_wayland_get_type (void); 33 34 #define GST_TYPE_VULKAN_DISPLAY_WAYLAND (gst_vulkan_display_wayland_get_type()) 35 #define GST_VULKAN_DISPLAY_WAYLAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VULKAN_DISPLAY_WAYLAND,GstVulkanDisplayWayland)) 36 #define GST_VULKAN_DISPLAY_WAYLAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_VULKAN_DISPLAY_WAYLAND,GstVulkanDisplayWaylandClass)) 37 #define GST_IS_VULKAN_DISPLAY_WAYLAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VULKAN_DISPLAY_WAYLAND)) 38 #define GST_IS_VULKAN_DISPLAY_WAYLAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VULKAN_DISPLAY_WAYLAND)) 39 #define GST_VULKAN_DISPLAY_WAYLAND_CAST(obj) ((GstVulkanDisplayWayland*)(obj)) 40 41 typedef struct _GstVulkanDisplayWayland GstVulkanDisplayWayland; 42 typedef struct _GstVulkanDisplayWaylandClass GstVulkanDisplayWaylandClass; 43 44 /** 45 * GstVulkanDisplayWayland: 46 * 47 * the contents of a #GstVulkanDisplayWayland are private and should only be accessed 48 * through the provided API 49 */ 50 struct _GstVulkanDisplayWayland 51 { 52 GstVulkanDisplay parent; 53 54 struct wl_display *display; 55 struct wl_registry *registry; 56 struct wl_compositor *compositor; 57 struct wl_subcompositor *subcompositor; 58 struct wl_shell *shell; 59 60 /* <private> */ 61 gboolean foreign_display; 62 }; 63 64 struct _GstVulkanDisplayWaylandClass 65 { 66 GstVulkanDisplayClass object_class; 67 }; 68 69 #define GST_VULKAN_DISPLAY_WAYLAND_DISPLAY(display_) (GST_VULKAN_DISPLAY_WAYLAND (display_)->display) 70 71 GstVulkanDisplayWayland *gst_vulkan_display_wayland_new (const gchar * name); 72 GstVulkanDisplayWayland *gst_vulkan_display_wayland_new_with_display (struct wl_display *display); 73 74 void gst_vulkan_display_wayland_roundtrip_async (GstVulkanDisplayWayland * display); 75 76 G_END_DECLS 77 78 #endif /* __GST_VULKAN_DISPLAY_WAYLAND_H__ */ 79