[vlc-commits] window: remove constant cfg.type member

Rémi Denis-Courmont git at videolan.org
Sun May 20 19:51:53 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 17 20:07:47 2018 +0300| [6204b259ade0e93012bbb73882955e5068083e2a] | committer: Rémi Denis-Courmont

window: remove constant cfg.type member

It's always INVALID now...

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

 include/vlc_vout_window.h                    |  3 ---
 modules/gui/macosx/VLCVoutWindowController.m |  4 ----
 modules/gui/minimal_macosx/intf.m            |  4 ----
 modules/gui/qt/qt.cpp                        |  4 ----
 modules/gui/skins2/src/skin_main.cpp         | 10 ----------
 modules/video_output/android/window.c        |  4 ----
 modules/video_output/drawable.c              |  4 ----
 modules/video_output/wayland/shell.c         |  4 ----
 modules/video_output/wayland/xdg-shell.c     |  4 ----
 modules/video_output/xcb/window.c            |  8 --------
 src/video_output/display.c                   |  1 -
 src/video_output/video_output.c              |  1 -
 12 files changed, 51 deletions(-)

diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index 723447ce49..d42e9868ba 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -96,9 +96,6 @@ typedef struct vout_window_mouse_event_t
 } vout_window_mouse_event_t;
 
 typedef struct vout_window_cfg_t {
-    /* Window handle type */
-    unsigned type;
-
     /* If true, a standalone window is requested */
     bool is_standalone;
     bool is_fullscreen;
diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m
index c72a5c19d3..82164e53d5 100644
--- a/modules/gui/macosx/VLCVoutWindowController.m
+++ b/modules/gui/macosx/VLCVoutWindowController.m
@@ -46,10 +46,6 @@ static int WindowControl(vout_window_t *, int i_query, va_list);
 int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
 {
     @autoreleasepool {
-        if (cfg->type != VOUT_WINDOW_TYPE_INVALID
-            && cfg->type != VOUT_WINDOW_TYPE_NSOBJECT)
-            return VLC_EGENERIC;
-
         msg_Dbg(p_wnd, "Opening video window");
 
         if (!atomic_load(&b_intf_starting)) {
diff --git a/modules/gui/minimal_macosx/intf.m b/modules/gui/minimal_macosx/intf.m
index a778e3bc56..3ac6345a19 100644
--- a/modules/gui/minimal_macosx/intf.m
+++ b/modules/gui/minimal_macosx/intf.m
@@ -104,10 +104,6 @@ static int WindowControl(vout_window_t *, int i_query, va_list);
 
 int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
 {
-    if (cfg->type != VOUT_WINDOW_TYPE_INVALID
-     && cfg->type != VOUT_WINDOW_TYPE_NSOBJECT)
-        return VLC_EGENERIC;
-
     @autoreleasepool {
         NSRect proposedVideoViewPosition = NSMakeRect(cfg->x, cfg->y, cfg->width, cfg->height);
 
diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
index 659e89a04c..e5f0e0a627 100644
--- a/modules/gui/qt/qt.cpp
+++ b/modules/gui/qt/qt.cpp
@@ -696,10 +696,6 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
         return VLC_EGENERIC;
     }
 
-    if( cfg->type != VOUT_WINDOW_TYPE_INVALID
-     && cfg->type != p_intf->p_sys->voutWindowType )
-        return VLC_EGENERIC;
-
     switch( p_intf->p_sys->voutWindowType )
     {
         case VOUT_WINDOW_TYPE_XID:
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index 80c1183174..b528ad4fd7 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -347,16 +347,6 @@ static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
     if( var_InheritBool( pWnd, "video-wallpaper" ) )
         return VLC_EGENERIC;
 
-    if( cfg->type != VOUT_WINDOW_TYPE_INVALID )
-    {
-#ifdef X11_SKINS
-        if( cfg->type != VOUT_WINDOW_TYPE_XID )
-#else
-        if( cfg->type != VOUT_WINDOW_TYPE_HWND )
-#endif
-            return VLC_EGENERIC;
-    }
-
     vout_window_sys_t* sys;
 
     vlc_mutex_lock( &skin_load.mutex );
diff --git a/modules/video_output/android/window.c b/modules/video_output/android/window.c
index 9cd1c9cc44..3101ccef2f 100644
--- a/modules/video_output/android/window.c
+++ b/modules/video_output/android/window.c
@@ -87,10 +87,6 @@ static void OnNewMouseCoords(vout_window_t *wnd,
  */
 static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
 {
-    if (cfg->type != VOUT_WINDOW_TYPE_INVALID
-     && cfg->type != VOUT_WINDOW_TYPE_ANDROID_NATIVE)
-        return VLC_EGENERIC;
-
     vout_window_sys_t *p_sys = malloc(sizeof (*p_sys));
     if (p_sys == NULL)
         return VLC_ENOMEM;
diff --git a/modules/video_output/drawable.c b/modules/video_output/drawable.c
index 9703f97510..4db635cee9 100644
--- a/modules/video_output/drawable.c
+++ b/modules/video_output/drawable.c
@@ -67,10 +67,6 @@ static uintptr_t *used = NULL;
  */
 static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
 {
-    if (cfg->type != VOUT_WINDOW_TYPE_INVALID
-     && cfg->type != VOUT_WINDOW_TYPE_HWND)
-        return VLC_EGENERIC;
-
     uintptr_t val = var_InheritInteger (wnd, "drawable-hwnd");
     if (val == 0)
         return VLC_EGENERIC;
diff --git a/modules/video_output/wayland/shell.c b/modules/video_output/wayland/shell.c
index 46832e41a6..5f006a81aa 100644
--- a/modules/video_output/wayland/shell.c
+++ b/modules/video_output/wayland/shell.c
@@ -228,10 +228,6 @@ static const struct wl_registry_listener registry_cbs =
  */
 static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
 {
-    if (cfg->type != VOUT_WINDOW_TYPE_INVALID
-     && cfg->type != VOUT_WINDOW_TYPE_WAYLAND)
-        return VLC_EGENERIC;
-
     vout_window_sys_t *sys = malloc(sizeof (*sys));
     if (unlikely(sys == NULL))
         return VLC_ENOMEM;
diff --git a/modules/video_output/wayland/xdg-shell.c b/modules/video_output/wayland/xdg-shell.c
index add0719c5a..a0d64e7981 100644
--- a/modules/video_output/wayland/xdg-shell.c
+++ b/modules/video_output/wayland/xdg-shell.c
@@ -282,10 +282,6 @@ static const struct wl_registry_listener registry_cbs =
  */
 static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
 {
-    if (cfg->type != VOUT_WINDOW_TYPE_INVALID
-     && cfg->type != VOUT_WINDOW_TYPE_WAYLAND)
-        return VLC_EGENERIC;
-
     vout_window_sys_t *sys = malloc(sizeof (*sys));
     if (unlikely(sys == NULL))
         return VLC_ENOMEM;
diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index fe201d85c8..bf202c4ae5 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -379,10 +379,6 @@ static void CacheAtoms (vout_window_sys_t *p_sys)
  */
 static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
 {
-    if (cfg->type != VOUT_WINDOW_TYPE_INVALID
-     && cfg->type != VOUT_WINDOW_TYPE_XID)
-        return VLC_EGENERIC;
-
     xcb_generic_error_t *err;
     xcb_void_cookie_t ck;
 
@@ -648,10 +644,6 @@ static void ReleaseDrawable (vlc_object_t *obj, xcb_window_t window)
  */
 static int EmOpen (vout_window_t *wnd, const vout_window_cfg_t *cfg)
 {
-    if (cfg->type != VOUT_WINDOW_TYPE_INVALID
-     && cfg->type != VOUT_WINDOW_TYPE_XID)
-        return VLC_EGENERIC;
-
     xcb_window_t window = var_InheritInteger (wnd, "drawable-xid");
     if (window == 0)
         return VLC_EGENERIC;
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 58cc9bf52b..e6e7db52a9 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1403,7 +1403,6 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout,
         const video_splitter_output_t *output = &splitter->p_output[i];
         vout_display_state_t ostate;
         vout_window_cfg_t cfg = {
-            .type = VOUT_WINDOW_TYPE_INVALID,
             .width = state->cfg.display.width,
             .height = state->cfg.display.height,
             .is_standalone = true,
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index bfb8847643..58b276492b 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -167,7 +167,6 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
         vout_window_cfg_t wcfg = {
             .is_standalone = !var_InheritBool(vout, "embedded-video"),
             .is_fullscreen = var_GetBool(vout, "fullscreen"),
-            .type = VOUT_WINDOW_TYPE_INVALID,
             // TODO: take pixel A/R, crop and zoom into account
 #ifdef __APPLE__
             .x = var_InheritInteger(vout, "video-x"),



More information about the vlc-commits mailing list