if (G_LIKELY (gst_wayland_sink_find_display (sink))) {
/* we cannot use our own display with an external window handle */
if (G_UNLIKELY (sink->display->own_display)) {
- GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_READ_WRITE,
+#ifdef GST_WLSINK_ENHANCEMENT
+ GST_ELEMENT_WARNING (sink, RESOURCE, OPEN_READ_WRITE,
("Application did not provide a wayland display handle"),
+ ("Now waylandsink use internal display handle "
+ "which is created ourselves. Consider providing a "
+ "display handle from your application with GstContext"));
+#else
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_READ_WRITE,
("waylandsink cannot use an externally-supplied surface without "
"an externally-supplied display handle. Consider providing a "
"display handle from your application with GstContext"));
+#endif
} else {
sink->window = gst_wl_window_new_in_surface (sink->display, surface);
}