mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 06:16:36 +00:00
vulkan/wayland: initialise debug category before debug logging
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1341>
This commit is contained in:
parent
c213b6ea17
commit
595dd1c149
1 changed files with 24 additions and 10 deletions
|
@ -34,21 +34,33 @@
|
||||||
#define GST_CAT_DEFAULT gst_vulkan_window_wayland_debug
|
#define GST_CAT_DEFAULT gst_vulkan_window_wayland_debug
|
||||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
||||||
|
|
||||||
#define gst_vulkan_window_wayland_parent_class parent_class
|
static void
|
||||||
G_DEFINE_TYPE (GstVulkanWindowWayland, gst_vulkan_window_wayland,
|
_init_debug (void)
|
||||||
GST_TYPE_VULKAN_WINDOW)
|
{
|
||||||
|
static volatile gsize _init = 0;
|
||||||
|
|
||||||
static void gst_vulkan_window_wayland_close (GstVulkanWindow * window);
|
if (g_once_init_enter (&_init)) {
|
||||||
static gboolean gst_vulkan_window_wayland_open (GstVulkanWindow * window,
|
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkanwindowxcb", 0,
|
||||||
|
"Vulkan XCB Window");
|
||||||
|
g_once_init_leave (&_init, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define gst_vulkan_window_wayland_parent_class parent_class
|
||||||
|
G_DEFINE_TYPE_WITH_CODE (GstVulkanWindowWayland, gst_vulkan_window_wayland,
|
||||||
|
GST_TYPE_VULKAN_WINDOW, _init_debug ());
|
||||||
|
|
||||||
|
static void gst_vulkan_window_wayland_close (GstVulkanWindow * window);
|
||||||
|
static gboolean gst_vulkan_window_wayland_open (GstVulkanWindow * window,
|
||||||
GError ** error);
|
GError ** error);
|
||||||
static VkSurfaceKHR gst_vulkan_window_wayland_get_surface (GstVulkanWindow
|
static VkSurfaceKHR gst_vulkan_window_wayland_get_surface (GstVulkanWindow
|
||||||
* window, GError ** error);
|
* window, GError ** error);
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_vulkan_window_wayland_get_presentation_support (GstVulkanWindow *
|
gst_vulkan_window_wayland_get_presentation_support (GstVulkanWindow *
|
||||||
window, GstVulkanDevice * device, guint32 queue_family_idx);
|
window, GstVulkanDevice * device, guint32 queue_family_idx);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_ping (void *data, struct wl_shell_surface *shell_surface,
|
handle_ping (void *data, struct wl_shell_surface *shell_surface,
|
||||||
uint32_t serial)
|
uint32_t serial)
|
||||||
{
|
{
|
||||||
GstVulkanWindowWayland *window_wl = data;
|
GstVulkanWindowWayland *window_wl = data;
|
||||||
|
@ -175,6 +187,8 @@ gst_vulkan_window_wayland_new (GstVulkanDisplay * display)
|
||||||
/* we require a wayland display to create wayland surfaces */
|
/* we require a wayland display to create wayland surfaces */
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
_init_debug ();
|
||||||
|
|
||||||
GST_DEBUG ("creating Wayland window");
|
GST_DEBUG ("creating Wayland window");
|
||||||
|
|
||||||
window = g_object_new (GST_TYPE_VULKAN_WINDOW_WAYLAND, NULL);
|
window = g_object_new (GST_TYPE_VULKAN_WINDOW_WAYLAND, NULL);
|
||||||
|
|
Loading…
Reference in a new issue