[rygel/wip/meson: 3/28] examples: Fix full-screen renderer for wayland
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/meson: 3/28] examples: Fix full-screen renderer for wayland
- Date: Sun, 21 May 2017 17:59:03 +0000 (UTC)
commit 5b054d6f3df257cd2673aafddaec0b2d3cdd8f8e
Author: Jens Georg <mail jensge org>
Date: Mon Apr 17 12:38:45 2017 +0200
examples: Fix full-screen renderer for wayland
Signed-off-by: Jens Georg <mail jensge org>
examples/fullscreen-renderer.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/examples/fullscreen-renderer.c b/examples/fullscreen-renderer.c
index 2d43081..7707ddb 100644
--- a/examples/fullscreen-renderer.c
+++ b/examples/fullscreen-renderer.c
@@ -38,6 +38,7 @@
#include <gst/video/videooverlay.h>
#include <gdk/gdkx.h>
+#include <gdk/gdkwayland.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
@@ -64,7 +65,14 @@ static void on_realize (GtkWidget *widget, gpointer user_data)
if (!gdk_window_ensure_native (window))
g_error ("Could not create native window for overlay");
- window_handle = GDK_WINDOW_XID (window);
+ if (GDK_IS_WAYLAND_WINDOW (window)) {
+ window_handle = gdk_wayland_window_get_wl_surface (window);
+ } else if (GDK_IS_X11_WINDOW (window)) {
+ window_handle = GDK_WINDOW_XID (window);
+ } else {
+ g_error ("Unsupported windowing system");
+ }
+
gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (data->playbin),
window_handle);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]