[vlc-commits] Remove VOUT_WINDOW_TYPE_NATIVE (close #7666)

Rémi Denis-Courmont git at videolan.org
Sun Oct 28 19:51:12 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 28 20:50:13 2012 +0200| [3ce7f98b24bbe196fed4b4cd572e92f9317cbca5] | committer: Rémi Denis-Courmont

Remove VOUT_WINDOW_TYPE_NATIVE (close #7666)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3ce7f98b24bbe196fed4b4cd572e92f9317cbca5
---

 include/vlc_vout_window.h |    6 ------
 modules/video_output/gl.c |   20 +++++++++++++++++++-
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index ad57a77..e794468 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -47,12 +47,6 @@ enum {
     VOUT_WINDOW_TYPE_NSOBJECT,
 };
 
-#if defined (WIN32) || defined (__OS2__)
-# define VOUT_WINDOW_TYPE_NATIVE VOUT_WINDOW_TYPE_HWND
-#elif defined (__unix__)
-# define VOUT_WINDOW_TYPE_NATIVE VOUT_WINDOW_TYPE_XID
-#endif
-
 /**
  * Control query for vout_window_t
  */
diff --git a/modules/video_output/gl.c b/modules/video_output/gl.c
index a396bae..eea4b70 100644
--- a/modules/video_output/gl.c
+++ b/modules/video_output/gl.c
@@ -101,7 +101,25 @@ static vout_window_t *MakeWindow (vout_display_t *vd)
     vout_window_cfg_t wnd_cfg;
 
     memset (&wnd_cfg, 0, sizeof (wnd_cfg));
-    wnd_cfg.type = VOUT_WINDOW_TYPE_NATIVE;
+
+    /* Please keep this in sync with egl.c */
+    /* <EGL/eglplatform.h> defines the list and order of platforms */
+#if defined(_WIN32) || defined(__VC32__) \
+ && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+    wnd_cfg.type = VOUT_WINDOW_TYPE_HWND;
+#elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */
+# warning Symbian not supported.
+#elif defined(WL_EGL_PLATFORM)
+# error Wayland not supported.
+#elif defined(__GBM__)
+# error Glamor not supported.
+#elif defined(ANDROID)
+# error Android not supported.
+#elif defined(__unix__) /* X11 */
+    wnd_cfg.type = VOUT_WINDOW_TYPE_XID;
+#else
+# error Platform not recognized.
+#endif
     wnd_cfg.x = var_InheritInteger (vd, "video-x");
     wnd_cfg.y = var_InheritInteger (vd, "video-y");
     wnd_cfg.width  = vd->cfg->display.width;



More information about the vlc-commits mailing list