]> git.sesse.net Git - vlc/commitdiff
window: merge all capabilities as one
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 9 Oct 2014 16:38:41 +0000 (19:38 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 16 Oct 2014 17:23:37 +0000 (20:23 +0300)
This is so that a window of "any" type can be requested rather than
only a window of a specific type.

modules/gui/macosx/macosx.m
modules/gui/minimal_macosx/macosx.c
modules/gui/qt4/qt4.cpp
modules/gui/skins2/src/skin_main.cpp
modules/video_output/android/nativewindow.c
modules/video_output/drawable.c
modules/video_output/wayland/shell_surface.c
modules/video_output/xcb/window.c
src/video_output/window.c

index 73f308fc7e9153dc9da85426c4c7c754335f643f..b78676025161d24df157885930d57568faab2359 100644 (file)
@@ -184,7 +184,7 @@ vlc_module_begin()
 
     add_submodule()
         set_description("Mac OS X Video Output Provider")
-        set_capability("vout window nsobject", 100)
+        set_capability("vout window", 100)
         set_callbacks(WindowOpen, WindowClose)
 
         set_section(N_("Video output"), 0)
index 5b8df7390b26ce32a1960bf06c1234e1c3ca35f3..8b779d10c69a88aac9a1ca7f4543953185b7afaa 100644 (file)
@@ -63,7 +63,7 @@ vlc_module_begin ()
     add_submodule ()
     /* Will be loaded even without interface module. see voutgl.m */
         set_description( "Minimal Mac OS X Video Output Provider" )
-        set_capability( "vout window nsobject", 100 )
+        set_capability( "vout window", 100 )
         set_callbacks( WindowOpen, WindowClose )
 vlc_module_end ()
 
index 5f6b7a1d774dc4b03c6c7bb9760440c18f1e1547..385b249f5a7fef296fd1b50d0ab6952a3132a887 100644 (file)
@@ -309,19 +309,9 @@ vlc_module_begin ()
 
         set_callbacks( OpenDialogs, Close )
 
-#if (defined (Q_OS_WIN) && !defined (_WIN32_X11_)) || defined (Q_OS_OS2)
     add_submodule ()
-        set_capability( "vout window hwnd", 0 )
+        set_capability( "vout window", 0 )
         set_callbacks( WindowOpen, WindowClose )
-#elif defined (Q_OS_DARWIN)
-    add_submodule ()
-        set_capability( "vout window nsobject", 0 )
-        set_callbacks( WindowOpen, WindowClose )
-#elif defined (QT5_HAS_X11) || defined (Q_WS_X11)
-    add_submodule ()
-        set_capability( "vout window xid", 0 )
-        set_callbacks( WindowOpen, WindowClose )
-#endif
 
 vlc_module_end ()
 
index ed67153c41d9acf32f7fc106be75e7c9ec548c76..1739b31d38c91d6d229854c557e5d4bb2207d366 100644 (file)
@@ -528,11 +528,7 @@ vlc_module_begin ()
     add_shortcut( "skins" )
 
     add_submodule ()
-#if defined( _WIN32 ) || defined( __OS2__ )
-        set_capability( "vout window hwnd", 51 )
-#else
-        set_capability( "vout window xid", 51 )
-#endif
+        set_capability( "vout window", 51 )
         set_callbacks( WindowOpen, WindowClose )
 
 vlc_module_end ()
index 7f1f9658168ae13dc10fa94569138c8730d5ec3c..5345c2d8f52668af012c8be39dfb159275b1464a 100644 (file)
@@ -56,7 +56,7 @@ vlc_module_begin()
     set_description(N_("Android native window"))
     set_category(CAT_VIDEO)
     set_subcategory(SUBCAT_VIDEO_VOUT)
-    set_capability("vout window anative", 10)
+    set_capability("vout window", 10)
     set_callbacks(Open, Close)
 vlc_module_end()
 
index 3fe3e5d248a6049bac2010e9d5d407e283c52b16..7b9ccbc5d5e30a5e830cdfed61d3299320bd9cf4 100644 (file)
@@ -47,7 +47,7 @@ vlc_module_begin ()
     set_description (N_("Embedded window video"))
     set_category (CAT_VIDEO)
     set_subcategory (SUBCAT_VIDEO_VOUT)
-    set_capability ("vout window hwnd", 0)
+    set_capability ("vout window", 0)
     set_callbacks (Open, Close)
     add_shortcut ("embed-hwnd")
 
index 473897f20b30e819a4f66e76c5720227a74eb5b7..0a5b42cbd797f26cee5f305b22976beb8c646786 100644 (file)
@@ -311,7 +311,7 @@ vlc_module_begin ()
     set_description (N_("Wayland shell surface"))
     set_category (CAT_VIDEO)
     set_subcategory (SUBCAT_VIDEO_VOUT)
-    set_capability ("vout surface wl", 10)
+    set_capability ("vout window", 10)
     set_callbacks (Open, Close)
 
     add_string ("wl-display", NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, true)
index 460054f24a6fc1d5572c09fd85a0798eddf60414..6257b9a2adddd0d8d1e6e0649d9ba8fcdd7fc1f3 100644 (file)
@@ -63,7 +63,7 @@ vlc_module_begin ()
     set_description (N_("X11 video window (XCB)"))
     set_category (CAT_VIDEO)
     set_subcategory (SUBCAT_VIDEO_VOUT)
-    set_capability ("vout window xid", 10)
+    set_capability ("vout window", 10)
     set_callbacks (Open, Close)
 
     /* Obsolete since 1.1.0: */
@@ -77,7 +77,7 @@ vlc_module_begin ()
     set_description (N_("Embedded window video"))
     set_category (CAT_VIDEO)
     set_subcategory (SUBCAT_VIDEO_VOUT)
-    set_capability ("vout window xid", 70)
+    set_capability ("vout window", 70)
     set_callbacks (EmOpen, EmClose)
     add_shortcut ("embed-xid")
 
index 3ff0addef9f64f542c8acd7b1890a73ffbbbe2b5..9c6902b8fd481e150ae760c842dd5a58f1b28b90 100644 (file)
@@ -61,34 +61,9 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
     memset(&window->handle, 0, sizeof(window->handle));
     window->control = NULL;
     window->sys = NULL;
-    window->type = cfg->type;
 
-    const char *type;
-    switch (cfg->type) {
-#if defined(_WIN32) || defined(__OS2__)
-    case VOUT_WINDOW_TYPE_HWND:
-        type = "vout window hwnd";
-        break;
-#endif
-#ifdef __APPLE__
-    case VOUT_WINDOW_TYPE_NSOBJECT:
-        type = "vout window nsobject";
-        break;
-#endif
-    case VOUT_WINDOW_TYPE_XID:
-        type = "vout window xid";
-        break;
-    case VOUT_WINDOW_TYPE_ANDROID_NATIVE:
-        type = "vout window anative";
-        break;
-    case VOUT_WINDOW_TYPE_WAYLAND:
-        type = "vout surface wl";
-        break;
-    default:
-        assert(0);
-    }
-
-    w->module = vlc_module_load(window, type, module, module && *module,
+    w->module = vlc_module_load(window, "vout window", module,
+                                module && *module,
                                 vout_window_start, window, cfg);
     if (!w->module) {
         vlc_object_release(window);