Commit 5de6dd9f authored by Matthew Waters's avatar Matthew Waters 🐨

new vulkan based video sink

Currently xcb is the only winsys that is implemented and there's no redraws et
al
parent 60005b4a
......@@ -1464,6 +1464,55 @@ AC_SUBST(JPEG_LIBS)
AC_SUBST(HAVE_JPEG)
AM_CONDITIONAL(HAVE_JPEG, test "x$HAVE_JPEG" = "xyes")
dnl Vulkan
VULKAN_CONFIG_DEFINES=""
PKG_CHECK_MODULES(XCB, xcb >= 1.10, HAVE_XCB=yes, HAVE_XCB=no)
AM_CONDITIONAL(USE_XCB, test "x$HAVE_XCB" = "xyes")
if test "x$HAVE_XCB" = "xyes"; then
VULKAN_CONFIG_DEFINES="$VULKAN_CONFIG_DEFINES
#define GST_VULKAN_HAVE_WINDOW_XCB 1"
fi
AC_CONFIG_COMMANDS([ext/vulkan/vkconfig.h], [
outfile=vkconfig.h-tmp
cat > $outfile <<\_______EOF
/* vkconfig.h
*
* This is a generated file. Please modify `configure.ac'
*/
#ifndef __GST_VULKAN_CONFIG_H__
#define __GST_VULKAN_CONFIG_H__
#include <gst/gst.h>
G_BEGIN_DECLS
_______EOF
cat >>$outfile <<_______EOF
$vulkan_config_defines
_______EOF
cat >>$outfile <<_______EOF
G_END_DECLS
#endif /* __GST_VULKAN_CONFIG_H__ */
_______EOF
if cmp -s $outfile ext/vulkan/vkconfig.h; then
AC_MSG_NOTICE([ext/vulkan/vkconfig.h is unchanged])
rm -f $outfile
else
mv $outfile ext/vulkan/vkconfig.h
fi
],[
vulkan_config_defines='$VULKAN_CONFIG_DEFINES'
])
dnl *** sys plug-ins ***
......@@ -2851,6 +2900,22 @@ AG_GST_CHECK_FEATURE(QT, [Qt elements], qt, [
])
])
dnl *** Vulkan ***
translit(dnm, m, l) AM_CONDITIONAL(USE_VULKAN, true)
AG_GST_CHECK_FEATURE(VULKAN, [Vulkan elements], vulkan, [
HAVE_VULKAN=no
AC_CHECK_HEADER(vulkan/vulkan.h, [
AC_CHECK_LIB(vulkan, vkCreateDevice, [
VULKAN_LIBS="-lvulkan"
AC_SUBST(VULKAN_LIBS)
dnl TODO check platform support (x11, win32, wayland, android, etc)
if test "x$HAVE_XCB" = "xyes"; then
HAVE_VULKAN=yes
fi
], [])
], [])
])
dnl *** libvisual ***
translit(dnm, m, l) AM_CONDITIONAL(USE_LIBVISUAL, true)
AG_GST_CHECK_FEATURE(LIBVISUAL, [libvisual visualization library], libvisual, [
......@@ -3636,6 +3701,8 @@ ext/teletextdec/Makefile
ext/gme/Makefile
ext/spc/Makefile
ext/timidity/Makefile
ext/vulkan/Makefile
ext/vulkan/xcb/Makefile
ext/webp/Makefile
ext/x265/Makefile
ext/xvid/Makefile
......
......@@ -406,6 +406,12 @@ else
DTLS_DIR=
endif
if USE_VULKAN
VULKAN_DIR=vulkan
else
VULKAN_DIR=
endif
SUBDIRS=\
$(VOAACENC_DIR) \
$(ASSRENDER_DIR) \
......@@ -474,7 +480,8 @@ SUBDIRS=\
$(HLS_DIR) \
$(WEBP_DIR) \
$(X265_DIR) \
$(DTLS_DIR)
$(DTLS_DIR) \
$(VULKAN_DIR)
DIST_SUBDIRS = \
assrender \
......@@ -541,6 +548,7 @@ DIST_SUBDIRS = \
rtmp \
webp \
x265 \
dtls
dtls \
vulkan
include $(top_srcdir)/common/parallel-subdirs.mak
plugin_LTLIBRARIES = libgstvulkan.la
SUBDIRS =
DIST_SUBDIRS = xcb
DISTCLEANFILES = vkconfig.h
libgstvulkan_la_SOURCES = \
gstvulkan.c \
vkdevice.c \
vkdisplay.c \
vkerror.c \
vkimagememory.c \
vkinstance.c \
vkmemory.c \
vkqueue.c \
vksink.c \
vkswapper.c \
vkutils.c \
vkwindow.c
noinst_HEADERS = \
vk.h \
vk_fwd.h \
vkdevice.h \
vkdisplay.h \
vkerror.h \
vkimagememory.h \
vkinstance.h \
vkmemory.h \
vkqueue.h \
vksink.h \
vkswapper.h \
vkutils.h \
vkwindow.h
libgstvulkan_la_CFLAGS = \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
$(GST_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) \
$(VULKAN_CFLAGS)
libgstvulkan_la_LIBADD = \
$(GST_BASE_LIBS) \
$(GST_PLUGINS_BASE_LIBS) \
-lgstvideo-$(GST_API_VERSION) \
$(VULKAN_LIBS)
if USE_XCB
SUBDIRS += xcb
libgstvulkan_la_LIBADD += xcb/libgstvulkan-xcb.la
endif
libgstvulkan_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstvulkan_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
/*
* GStreamer
* Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
/**
* SECTION:plugin-vulkan
*
* Cross-platform Vulkan plugin.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "vksink.h"
#if GST_VULKAN_HAVE_WINDOW_X11
#include <X11/Xlib.h>
#endif
#define GST_CAT_DEFAULT gst_gl_gstgl_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
/* Register filters that make up the gstgl plugin */
static gboolean
plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gst_gl_gstgl_debug, "gstvulkan", 0, "gstvulkan");
#if GST_VULKAN_HAVE_WINDOW_X11
if (g_getenv ("GST_VULKAN_XINITTHREADS"))
XInitThreads ();
#endif
if (!gst_element_register (plugin, "vulkansink",
GST_RANK_NONE, GST_TYPE_VULKAN_SINK)) {
return FALSE;
}
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
vulkan,
"Vulkan plugin",
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
/*
* GStreamer
* Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef _VK_H_
#define _VK_H_
#include <gst/gst.h>
#define VK_PROTOTYPES
#include <vulkan/vulkan.h>
#include <vulkan/vk_debug_report_lunarg.h>
#include <vulkan/vk_ext_khr_swapchain.h>
#include <vulkan/vk_ext_khr_device_swapchain.h>
#include "vkconfig.h"
#include "vk_fwd.h"
#include "vkerror.h"
#include "vkinstance.h"
#include "vkdevice.h"
#include "vkqueue.h"
#include "vkdisplay.h"
#include "vkwindow.h"
#include "vkswapper.h"
#include "vkmemory.h"
#include "vkimagememory.h"
#endif /* _VK_H_ */
/*
* GStreamer
* Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef _VK_FWD_H_
#define _VK_FWD_H_
#include <gst/gst.h>
G_BEGIN_DECLS
typedef struct _GstVulkanInstance GstVulkanInstance;
typedef struct _GstVulkanInstanceClass GstVulkanInstanceClass;
typedef struct _GstVulkanDevice GstVulkanDevice;
typedef struct _GstVulkanDeviceClass GstVulkanDeviceClass;
typedef struct _GstVulkanQueue GstVulkanQueue;
typedef struct _GstVulkanQueueClass GstVulkanQueueClass;
typedef struct _GstVulkanDisplay GstVulkanDisplay;
typedef struct _GstVulkanDisplayClass GstVulkanDisplayClass;
typedef struct _GstVulkanDisplayPrivate GstVulkanDisplayPrivate;
typedef struct _GstVulkanWindow GstVulkanWindow;
typedef struct _GstVulkanWindowClass GstVulkanWindowClass;
typedef struct _GstVulkanWindowPrivate GstVulkanWindowPrivate;
typedef struct _GstVulkanSwapper GstVulkanSwapper;
typedef struct _GstVulkanSwapperClass GstVulkanSwapperClass;
typedef struct _GstVulkanMemory GstVulkanMemory;
typedef struct _GstVulkanMemoryAllocator GstVulkanMemoryAllocator;
typedef struct _GstVulkanMemoryAllocatorClass GstVulkanMemoryAllocatorClass;
typedef struct _GstVulkanImageMemory GstVulkanImageMemory;
typedef struct _GstVulkanImageMemoryAllocator GstVulkanImageMemoryAllocator;
typedef struct _GstVulkanImageMemoryAllocatorClass GstVulkanImageMemoryAllocatorClass;
G_END_DECLS
#endif /* _VK_FWD_H_ */
This diff is collapsed.
/*
* GStreamer
* Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef _VK_DEVICE_H_
#define _VK_DEVICE_H_
#include <gst/gst.h>
#include "vk.h"
G_BEGIN_DECLS
#define GST_TYPE_VULKAN_DEVICE (gst_vulkan_device_get_type())
#define GST_VULKAN_DEVICE(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_DEVICE, GstVulkanDevice))
#define GST_VULKAN_DEVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GST_TYPE_VULKAN_DEVICE, GstVulkanDeviceClass))
#define GST_IS_VULKAN_DEVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_DEVICE))
#define GST_IS_VULKAN_DEVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_DEVICE))
#define GST_VULKAN_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_DEVICE, GstVulkanDeviceClass))
GType gst_vulkan_device_get_type (void);
struct _GstVulkanDevice
{
GstObject parent;
GstVulkanInstance *instance;
guint device_index;
VkDevice device; /* hides a pointer */
VkPhysicalDeviceProperties gpu_props;
VkPhysicalDeviceFeatures gpu_features;
VkPhysicalDeviceMemoryProperties memory_properties;
VkQueueFamilyProperties *queue_family_props;
guint32 n_queue_families;
guint32 queue_family_id;
guint32 n_queues;
VkCmdPool cmd_pool;
};
struct _GstVulkanDeviceClass
{
GstObjectClass parent_class;
};
GstVulkanDevice * gst_vulkan_device_new (GstVulkanInstance * instance);
GstVulkanInstance * gst_vulkan_device_get_instance (GstVulkanDevice * device);
gboolean gst_vulkan_device_open (GstVulkanDevice * device,
GError ** error);
void gst_vulkan_device_close (GstVulkanDevice * device);
gpointer gst_vulkan_device_get_proc_address (GstVulkanDevice * device,
const gchar * name);
GstVulkanQueue * gst_vulkan_device_get_queue (GstVulkanDevice * device,
guint32 queue_family,
guint32 queue_i,
GError ** error);
VkPhysicalDevice gst_vulkan_device_get_physical_device (GstVulkanDevice * device);
gboolean gst_vulkan_device_create_cmd_buffer (GstVulkanDevice * device,
VkCmdBuffer * cmd,
GError ** error);
G_END_DECLS
#endif /* _VK_DEVICE_H_ */
/*
* GStreamer
* Copyright (C) 2007 David A. Schleef <ds@schleef.org>
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
* Copyright (C) 2008 Filippo Argiolas <filippo.argiolas@gmail.com>
* Copyright (C) 2013 Matthew Waters <ystreet00@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "vkdisplay.h"
#if GST_VULKAN_HAVE_WINDOW_X11
#include "x11/vkdisplay_x11.h"
#endif
#if GST_VULKAN_HAVE_WINDOW_XCB
#include "xcb/vkdisplay_xcb.h"
#endif
#define GST_CAT_DEFAULT gst_vulkan_display_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static void
_init_debug (void)
{
static volatile gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkandisplay", 0,
"Vulkan display");
g_once_init_leave (&_init, 1);
}
}
G_DEFINE_TYPE_WITH_CODE (GstVulkanDisplay, gst_vulkan_display, GST_TYPE_OBJECT,
_init_debug ());
#define GST_VULKAN_DISPLAY_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_VULKAN_DISPLAY, GstVulkanDisplayPrivate))
enum
{
SIGNAL_0,
CREATE_CONTEXT,
LAST_SIGNAL
};
/* static guint gst_vulkan_display_signals[LAST_SIGNAL] = { 0 }; */
static void gst_vulkan_display_finalize (GObject * object);
static gpointer gst_vulkan_display_default_get_handle (GstVulkanDisplay *
display);
static gpointer gst_vulkan_display_default_get_platform_handle (GstVulkanDisplay
* display);
static GstVulkanWindow
* gst_vulkan_display_default_create_window (GstVulkanDisplay * display);
struct _GstVulkanDisplayPrivate
{
gint dummy;
};
static void
gst_vulkan_display_class_init (GstVulkanDisplayClass * klass)
{
g_type_class_add_private (klass, sizeof (GstVulkanDisplayPrivate));
klass->get_handle = gst_vulkan_display_default_get_handle;
klass->get_platform_handle = gst_vulkan_display_default_get_platform_handle;
klass->create_window = gst_vulkan_display_default_create_window;
G_OBJECT_CLASS (klass)->finalize = gst_vulkan_display_finalize;
}
static void
gst_vulkan_display_init (GstVulkanDisplay * display)
{
display->priv = GST_VULKAN_DISPLAY_GET_PRIVATE (display);
display->type = GST_VULKAN_DISPLAY_TYPE_ANY;
}
static void
gst_vulkan_display_finalize (GObject * object)
{
G_OBJECT_CLASS (gst_vulkan_display_parent_class)->finalize (object);
}
/**
* gst_vulkan_display_new:
*
* Returns: (transfer full): a new #GstVulkanDisplay
*
* Since: 1.10
*/
GstVulkanDisplay *
gst_vulkan_display_new (void)
{
GstVulkanDisplay *display = NULL;
const gchar *user_choice, *platform_choice;
_init_debug ();
user_choice = g_getenv ("GST_GL_WINDOW");
platform_choice = g_getenv ("GST_GL_PLATFORM");
GST_INFO ("creating a display, user choice:%s (platform: %s)",
GST_STR_NULL (user_choice), GST_STR_NULL (platform_choice));
#if GST_VULKAN_HAVE_WINDOW_XCB
if (!display && (!user_choice || g_strstr_len (user_choice, 3, "xcb")))
display = GST_VULKAN_DISPLAY (gst_vulkan_display_xcb_new (NULL));
#endif
#if GST_VULKAN_HAVE_WINDOW_X11
if (!display && (!user_choice || g_strstr_len (user_choice, 3, "x11")))
display = GST_VULKAN_DISPLAY (gst_vulkan_display_x11_new (NULL));
#endif
if (!display) {
/* subclass returned a NULL window */
GST_WARNING ("Could not create display. user specified %s "
"(platform: %s), creating dummy",
GST_STR_NULL (user_choice), GST_STR_NULL (platform_choice));
return g_object_new (GST_TYPE_VULKAN_DISPLAY, NULL);
}
return display;
}
/**
* gst_vulkan_display_get_handle:
* @display: a #GstVulkanDisplay
*
* Returns: the winsys specific handle of @display
*
* Since: 1.10
*/
gpointer
gst_vulkan_display_get_handle (GstVulkanDisplay * display)
{
GstVulkanDisplayClass *klass;
g_return_val_if_fail (GST_IS_VULKAN_DISPLAY (display), NULL);
klass = GST_VULKAN_DISPLAY_GET_CLASS (display);
g_return_val_if_fail (klass->get_handle != NULL, NULL);
return klass->get_handle (display);
}
static gpointer
gst_vulkan_display_default_get_handle (GstVulkanDisplay * display)
{
return 0;
}
/**
* gst_vulkan_display_get_platform_handle:
* @display: a #GstVulkanDisplay
*
* Returns: the winsys specific handle of @display for use with the
* VK_EXT_KHR_swapchain extension.
*
* Since: 1.10
*/
gpointer
gst_vulkan_display_get_platform_handle (GstVulkanDisplay * display)
{
GstVulkanDisplayClass *klass;
g_return_val_if_fail (GST_IS_VULKAN_DISPLAY (display), NULL);
klass = GST_VULKAN_DISPLAY_GET_CLASS (display);
g_return_val_if_fail (klass->get_handle != NULL, NULL);
return klass->get_platform_handle (display);
}
static gpointer
gst_vulkan_display_default_get_platform_handle (GstVulkanDisplay * display)
{
return (gpointer) gst_vulkan_display_get_handle (display);
}
/**
* gst_vulkan_display_get_handle_type:
* @display: a #GstVulkanDisplay
*
* Returns: the #GstVulkanDisplayType of @display
*
* Since: 1.10
*/
GstVulkanDisplayType
gst_vulkan_display_get_handle_type (GstVulkanDisplay * display)
{
g_return_val_if_fail (GST_IS_VULKAN_DISPLAY (display),
GST_VULKAN_DISPLAY_TYPE_NONE);
return display->type;
}
/**
* gst_vulkan_display_create_window:
* @display: a #GstVulkanDisplay
*
* Returns: a new #GstVulkanWindow for @display or %NULL.
*/
GstVulkanWindow *
gst_vulkan_display_create_window (GstVulkanDisplay * display)
{
GstVulkanDisplayClass *klass;
GstVulkanWindow *window;
g_return_val_if_fail (GST_IS_VULKAN_DISPLAY (display), NULL);
klass = GST_VULKAN_DISPLAY_GET_CLASS (display);
g_return_val_if_fail (klass->create_window != NULL, NULL);
window = klass->create_window (display);
if (window) {
GST_OBJECT_LOCK (display);
display->windows = g_list_prepend (display->windows, window);
GST_OBJECT_UNLOCK (display);
}
return window;
}
static GstVulkanWindow *
gst_vulkan_display_default_create_window (GstVulkanDisplay * display)
{
return gst_vulkan_window_new (display);
}
/*
* GStreamer
* Copyright (C) 2007 David A. Schleef <ds@schleef.org>
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
* Copyright (C) 2008 Filippo Argiolas <filippo.argiolas@gmail.com>
* Copyright (C) 2013 Matthew Waters <ystreet00@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_VULKAN_DISPLAY_H__
#define __GST_VULKAN_DISPLAY_H__
#include <gst/gst.h>
#include <vk.h>
G_BEGIN_DECLS
#define GST_TYPE_VULKAN_DISPLAY (gst_vulkan_display_get_type())
#define GST_VULKAN_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VULKAN_DISPLAY,GstVulkanDisplay))
#define GST_VULKAN_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_VULKAN_DISPLAY,GstVulkanDisplayClass))
#define GST_IS_VULKAN_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VULKAN_DISPLAY))
#define GST_IS_VULKAN_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VULKAN_DISPLAY))
#define GST_VULKAN_DISPLAY_CAST(obj) ((GstVulkanDisplay*)(obj))
#define GST_VULKAN_DISPLAY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_DISPLAY, GstVulkanDisplayClass))
GType gst_vulkan_display_get_type (void);
typedef enum
{
GST_VULKAN_DISPLAY_TYPE_NONE = 0,
GST_VULKAN_DISPLAY_TYPE_X11 = (1 << 0),
GST_VULKAN_DISPLAY_TYPE_XCB = (1 << 1),
GST_VULKAN_DISPLAY_TYPE_WAYLAND = (1 << 2),
GST_VULKAN_DISPLAY_TYPE_MIR = (1 << 3),
GST_VULKAN_DISPLAY_TYPE_WIN32 = (1 << 4),
GST_VULKAN_DISPLAY_TYPE_ANY = G_MAXUINT32
} GstVulkanDisplayType;
/**
* GstVulkanDisplay:
*
* The contents of a #GstVulkanDisplay are private and should only be accessed
* through the provided API
*/
struct _GstVulkanDisplay
{
/* <private> */
GstObject object;
GstVulkanDisplayType type;
/* <protected> */
GList *windows; /* OBJECT lock */
GstVulkanDisplayPrivate *priv;
};
struct _GstVulkanDisplayClass
{
GstObjectClass object_class;