wayland: Use wl_display_create_queue_with_name

Wayland 1.23 and above allow us to attach names to an event queue, which
are printed out when debugging. Do this to make the logs easier to read.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6900>
This commit is contained in:
Daniel Stone 2024-05-22 12:28:39 +01:00 committed by GStreamer Marge Bot
parent e813ea8367
commit 2f2279abf4
2 changed files with 9 additions and 0 deletions

View file

@ -427,7 +427,12 @@ gst_wl_display_new_existing (struct wl_display *display,
priv->display_wrapper = wl_proxy_create_wrapper (display);
priv->own_display = take_ownership;
#ifdef HAVE_WL_EVENT_QUEUE_NAME
priv->queue = wl_display_create_queue_with_name (priv->display,
"GStreamer display queue");
#else
priv->queue = wl_display_create_queue (priv->display);
#endif
wl_proxy_set_queue ((struct wl_proxy *) priv->display_wrapper, priv->queue);
priv->registry = wl_display_get_registry (priv->display_wrapper);
wl_registry_add_listener (priv->registry, &registry_listener, self);

View file

@ -86,6 +86,10 @@ if use_wayland
'-D_GNU_SOURCE'
]
if wl_client_dep.version().version_compare('>= 1.22.91')
extra_c_args += [ '-DHAVE_WL_EVENT_QUEUE_NAME' ]
endif
gstwayland = library('gstwayland-' + api_version,
wl_sources + protocols_files,
c_args : gst_plugins_bad_args + extra_c_args,