mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
wayland: fail window open if the display is the correct type
Errors out cleanly if a wayland compositor is not running
This commit is contained in:
parent
6ccaafc0f3
commit
70184c52f0
1 changed files with 9 additions and 1 deletions
|
@ -382,9 +382,17 @@ gst_gl_window_wayland_egl_close (GstGLWindow * window)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_gl_window_wayland_egl_open (GstGLWindow * window, GError ** error)
|
gst_gl_window_wayland_egl_open (GstGLWindow * window, GError ** error)
|
||||||
{
|
{
|
||||||
GstGLDisplayWayland *display = GST_GL_DISPLAY_WAYLAND (window->display);
|
GstGLDisplayWayland *display;
|
||||||
GstGLWindowWaylandEGL *window_egl = GST_GL_WINDOW_WAYLAND_EGL (window);
|
GstGLWindowWaylandEGL *window_egl = GST_GL_WINDOW_WAYLAND_EGL (window);
|
||||||
|
|
||||||
|
if (!GST_IS_GL_DISPLAY_WAYLAND (window->display)) {
|
||||||
|
g_set_error (error, GST_GL_WINDOW_ERROR,
|
||||||
|
GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE,
|
||||||
|
"Failed to retrieve Wayland display (wrong type?)");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
display = GST_GL_DISPLAY_WAYLAND (window->display);
|
||||||
|
|
||||||
if (!display->display) {
|
if (!display->display) {
|
||||||
g_set_error (error, GST_GL_WINDOW_ERROR,
|
g_set_error (error, GST_GL_WINDOW_ERROR,
|
||||||
GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE,
|
GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE,
|
||||||
|
|
Loading…
Reference in a new issue