summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2015-06-01 14:05:06 +0200
committerEdward Hervey <bilboed@bilboed.com>2015-06-01 14:05:06 +0200
commit5fe88f7ed781f1f9acddb78f6ce57dfafe8d335a (patch)
treecfe49a03a9e887c3d0ec9e977c74288278c32f5c /tests
parent86c500a47af1e8e8ceb3cd557b274654efbb51b4 (diff)
downloadgstreamer-plugins-bad-5fe88f7ed781f1f9acddb78f6ce57dfafe8d335a.tar.gz
examples: Fix gl usage without wayland support
Not all platforms have wayland support. Handle that gracefully at compile time
Diffstat (limited to 'tests')
-rw-r--r--tests/examples/gl/gtk/gstgtk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/examples/gl/gtk/gstgtk.c b/tests/examples/gl/gtk/gstgtk.c
index 3f89c5bd0..493d6b393 100644
--- a/tests/examples/gl/gtk/gstgtk.c
+++ b/tests/examples/gl/gtk/gstgtk.c
@@ -46,12 +46,13 @@ gst_gtk_handle_need_context (GstBus * bus, GstMessage * msg, gpointer data)
case GST_MESSAGE_NEED_CONTEXT:
{
const gchar *context_type;
- GstContext *context = NULL;
gst_message_parse_context_type (msg, &context_type);
g_print ("got need context %s\n", context_type);
if (g_strcmp0 (context_type, "GstWaylandDisplayHandleContextType") == 0) {
+#if GST_GL_HAVE_WINDOW_WAYLAND && defined(GDK_WINDOWING_WAYLAND)
+ GstContext *context = NULL;
GdkDisplay *gdk_display = gdk_display_get_default ();
if (GDK_IS_WAYLAND_DISPLAY (gdk_display)) {
struct wl_display *wayland_display =
@@ -71,6 +72,10 @@ gst_gtk_handle_need_context (GstBus * bus, GstMessage * msg, gpointer data)
ret = TRUE;
}
}
+#else
+ GST_ERROR
+ ("Asked for wayland display context, but compiled without wayland support");
+#endif
}
}
default: