[vlc-commits] window: remove VOUT_WINDOW_TYPE_INVALID
Rémi Denis-Courmont
git at videolan.org
Mon May 21 20:16:21 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon May 21 20:28:38 2018 +0300| [2cb5965f04991d168012a121869d554339b34604] | committer: Rémi Denis-Courmont
window: remove VOUT_WINDOW_TYPE_INVALID
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2cb5965f04991d168012a121869d554339b34604
---
include/vlc_vout_window.h | 7 +------
modules/gui/qt/qt.cpp | 13 ++++++++++---
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index 7e9866699b..4f65cc1158 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -47,13 +47,12 @@ struct wl_surface;
* Window handle type
*/
enum vout_window_type {
- VOUT_WINDOW_TYPE_INVALID=0 /**< Invalid or unspecified window type */,
+ VOUT_WINDOW_TYPE_DUMMY /**< Dummy window (not an actual window) */,
VOUT_WINDOW_TYPE_XID /**< X11 window */,
VOUT_WINDOW_TYPE_HWND /**< Win32 or OS/2 window */,
VOUT_WINDOW_TYPE_NSOBJECT /**< MacOS X view */,
VOUT_WINDOW_TYPE_ANDROID_NATIVE /**< Android native window */,
VOUT_WINDOW_TYPE_WAYLAND /**< Wayland surface */,
- VOUT_WINDOW_TYPE_DUMMY /**< Dummy window (not an actual window) */
};
/**
@@ -157,10 +156,6 @@ struct vout_window_t {
* and the \ref display union are to be set.
*
* The possible values are defined in \ref vout_window_type.
- *
- * VOUT_WINDOW_TYPE_INVALID is a special placeholder type. It means that
- * any windowing system is acceptable. In that case, the plugin must set
- * its actual type during activation.
*/
unsigned type;
diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
index e5f0e0a627..affdea492b 100644
--- a/modules/gui/qt/qt.cpp
+++ b/modules/gui/qt/qt.cpp
@@ -570,7 +570,8 @@ static void *Thread( void *obj )
p_sys->p_mi = p_mi;
/* Check window type from the Qt platform back-end */
- p_sys->voutWindowType = VOUT_WINDOW_TYPE_INVALID;
+ bool known_type = true;
+
QString platform = app.platformName();
if( platform == qfu("xcb") )
p_sys->voutWindowType = VOUT_WINDOW_TYPE_XID;
@@ -581,13 +582,19 @@ static void *Thread( void *obj )
else if( platform == qfu("cocoa" ) )
p_sys->voutWindowType = VOUT_WINDOW_TYPE_NSOBJECT;
else
+ {
msg_Err( p_intf, "unknown Qt platform: %s", qtu(platform) );
+ known_type = false;
+ }
var_Create( THEPL, "qt4-iface", VLC_VAR_ADDRESS );
- var_SetAddress( THEPL, "qt4-iface", p_intf );
var_Create( THEPL, "window", VLC_VAR_STRING );
- if( p_sys->voutWindowType != VOUT_WINDOW_TYPE_INVALID )
+
+ if( known_type )
+ {
+ var_SetAddress( THEPL, "qt4-iface", p_intf );
var_SetString( THEPL, "window", "qt,any" );
+ }
}
/* Explain how to show a dialog :D */
More information about the vlc-commits
mailing list