]> git.sesse.net Git - vlc/commitdiff
window: define Wayland surface type
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 27 Aug 2014 16:39:32 +0000 (19:39 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 28 Aug 2014 20:54:53 +0000 (23:54 +0300)
The convention used here matches with the Qt Wayland native platform,
and seems most generic. Note that Wayland does not allow "sharing"
surface handles between multiple display connections in general, and
multiple processes in particular.

include/vlc_vout_window.h
src/video_output/window.c

index ed7d42c89657225e42bcf8dab18a61710f41d635..a633b0d5c2ade85df95abd9455c47e69585ca6e1 100644 (file)
@@ -36,6 +36,8 @@
 typedef struct vout_window_t vout_window_t;
 typedef struct vout_window_sys_t vout_window_sys_t;
 
+struct wl_display;
+struct wl_surface;
 
 /**
  * Window handle type
@@ -46,6 +48,7 @@ enum {
     VOUT_WINDOW_TYPE_HWND,
     VOUT_WINDOW_TYPE_NSOBJECT,
     VOUT_WINDOW_TYPE_ANDROID_NATIVE,
+    VOUT_WINDOW_TYPE_WAYLAND,
 };
 
 /**
@@ -92,11 +95,13 @@ struct vout_window_t {
         uint32_t xid;            /* X11 windows ID */
         void     *nsobject;      /* Mac OSX view object */
         void     *anativewindow; /* Android native window. */
+        struct wl_surface *wl;   /* Wayland surface */
     } handle;
 
     /* display server (mandatory) */
     union {
         char     *x11; /* X11 display (NULL = use default) */
+        struct wl_display *wl;   /* Wayland struct wl_display pointer */
     } display;
 
     /* Control on the module (mandatory)
index bc45bc28ea0c934547236576e3e31cac01242bfc..8be549201be35a2d3ef9ca80595158b77c571726 100644 (file)
@@ -86,6 +86,11 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
         type = "vout window anative";
         window->handle.anativewindow = NULL;
         break;
+    case VOUT_WINDOW_TYPE_WAYLAND:
+        type = "vout surface wl";
+        window->handle.wl = NULL;
+        window->display.wl = NULL;
+        break;
     default:
         assert(0);
     }