[vlc-commits] window: merge all capabilities as one
Rémi Denis-Courmont
git at videolan.org
Thu Oct 16 19:25:55 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 9 19:38:41 2014 +0300| [e42e888a68b41c2c0b0dd9e29a097e7a3e2c5a05] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e42e888a68b41c2c0b0dd9e29a097e7a3e2c5a05
---
modules/gui/macosx/macosx.m | 2 +-
modules/gui/minimal_macosx/macosx.c | 2 +-
modules/gui/qt4/qt4.cpp | 12 +----------
modules/gui/skins2/src/skin_main.cpp | 6 +-----
modules/video_output/android/nativewindow.c | 2 +-
modules/video_output/drawable.c | 2 +-
modules/video_output/wayland/shell_surface.c | 2 +-
modules/video_output/xcb/window.c | 4 ++--
src/video_output/window.c | 29 ++------------------------
9 files changed, 11 insertions(+), 50 deletions(-)
diff --git a/modules/gui/macosx/macosx.m b/modules/gui/macosx/macosx.m
index 73f308f..b786760 100644
--- a/modules/gui/macosx/macosx.m
+++ b/modules/gui/macosx/macosx.m
@@ -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)
diff --git a/modules/gui/minimal_macosx/macosx.c b/modules/gui/minimal_macosx/macosx.c
index 5b8df73..8b779d1 100644
--- a/modules/gui/minimal_macosx/macosx.c
+++ b/modules/gui/minimal_macosx/macosx.c
@@ -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 ()
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 5f6b7a1..385b249 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -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 ()
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index ed67153..1739b31 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -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 ()
diff --git a/modules/video_output/android/nativewindow.c b/modules/video_output/android/nativewindow.c
index 7f1f965..5345c2d 100644
--- a/modules/video_output/android/nativewindow.c
+++ b/modules/video_output/android/nativewindow.c
@@ -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()
diff --git a/modules/video_output/drawable.c b/modules/video_output/drawable.c
index 3fe3e5d..7b9ccbc 100644
--- a/modules/video_output/drawable.c
+++ b/modules/video_output/drawable.c
@@ -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")
diff --git a/modules/video_output/wayland/shell_surface.c b/modules/video_output/wayland/shell_surface.c
index 473897f..0a5b42c 100644
--- a/modules/video_output/wayland/shell_surface.c
+++ b/modules/video_output/wayland/shell_surface.c
@@ -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)
diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index 460054f..6257b9a 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -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")
diff --git a/src/video_output/window.c b/src/video_output/window.c
index 3ff0add..9c6902b 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -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);
More information about the vlc-commits
mailing list