Commit e42e888a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

window: merge all capabilities as one

This is so that a window of "any" type can be requested rather than
only a window of a specific type.
parent 681329fa
......@@ -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)
......
......@@ -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 ()
......@@ -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 ()
......
......@@ -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 ()
......@@ -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()
......
......@@ -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")
......
......@@ -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)
......
......@@ -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")
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment