[vlc-commits] window: make vout_window_t.sys a void pointer
Rémi Denis-Courmont
git at videolan.org
Sun Dec 2 19:00:32 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Dec 1 18:15:44 2018 +0200| [81a5c102a2a02f63e665940976d42c72a3cfce0a] | committer: Rémi Denis-Courmont
window: make vout_window_t.sys a void pointer
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=81a5c102a2a02f63e665940976d42c72a3cfce0a
---
include/vlc_vout_window.h | 3 +--
modules/gui/qt/main_interface.cpp | 2 +-
modules/gui/skins2/src/skin_main.cpp | 22 ++++++++++++----------
modules/video_output/wayland/xdg-shell.c | 4 ++--
modules/video_output/xcb/window.c | 4 ++--
5 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index d02cc93c44..883bd9a94b 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -38,7 +38,6 @@
*/
typedef struct vout_window_t vout_window_t;
-typedef struct vout_window_sys_t vout_window_sys_t;
struct wl_display;
struct wl_surface;
@@ -237,7 +236,7 @@ struct vout_window_t {
*
* A module is free to use it as it wishes.
*/
- vout_window_sys_t *sys;
+ void *sys;
vout_window_owner_t owner;
};
diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index 0a0e3b70f2..351c8d2775 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -747,7 +747,7 @@ bool MainInterface::getVideo( struct vout_window_t *p_wnd,
{
p_wnd->ops = &ops;
p_wnd->info.has_double_click = true;
- p_wnd->sys = (vout_window_sys_t*)this;
+ p_wnd->sys = this;
}
return result;
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index 8a9d8053e1..21cad54099 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -322,17 +322,19 @@ static int WindowOpen( vout_window_t *, const vout_window_cfg_t * );
static void WindowClose( vout_window_t * );
static int WindowControl( vout_window_t *, int, va_list );
-struct vout_window_sys_t
+typedef struct
{
intf_thread_t* pIntf;
vout_window_cfg_t cfg;
-};
+} vout_window_skins_t;
static void WindowOpenLocal( intf_thread_t* pIntf, vlc_object_t *pObj )
{
vout_window_t* pWnd = (vout_window_t*)pObj;
- int width = (int)pWnd->sys->cfg.width;
- int height = (int)pWnd->sys->cfg.height;
+ vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
+ int width = sys->cfg.width;
+ int height = sys->cfg.height;
+
VoutManager::instance( pIntf )->acceptWnd( pWnd, width, height );
}
@@ -344,7 +346,7 @@ static void WindowCloseLocal( intf_thread_t* pIntf, vlc_object_t *pObj )
static void WindowUnsetFullscreen( vout_window_t *pWnd )
{
- vout_window_sys_t *sys = pWnd->sys;
+ vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
intf_thread_t *pIntf = sys->pIntf;
AsyncQueue *pQueue = AsyncQueue::instance( pIntf );
CmdSetFullscreen* pCmd = new CmdSetFullscreen( pIntf, pWnd, false );
@@ -354,7 +356,7 @@ static void WindowUnsetFullscreen( vout_window_t *pWnd )
static void WindowSetFullscreen( vout_window_t *pWnd, const char * )
{
- vout_window_sys_t *sys = pWnd->sys;
+ vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
intf_thread_t *pIntf = sys->pIntf;
AsyncQueue *pQueue = AsyncQueue::instance( pIntf );
// Post a set fullscreen command
@@ -376,7 +378,7 @@ static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
|| !var_InheritBool( pWnd, "embedded-video" ) )
return VLC_EGENERIC;
- vout_window_sys_t* sys;
+ vout_window_skins_t* sys;
vlc_mutex_lock( &skin_load.mutex );
intf_thread_t *pIntf = skin_load.intf;
@@ -388,7 +390,7 @@ static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
if( !var_InheritBool( pIntf, "skinned-video") )
return VLC_EGENERIC;
- sys = new (std::nothrow) vout_window_sys_t;
+ sys = new (std::nothrow) vout_window_skins_t;
if( !sys )
return VLC_ENOMEM;
@@ -418,7 +420,7 @@ static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
static void WindowClose( vout_window_t *pWnd )
{
- vout_window_sys_t* sys = pWnd->sys;
+ vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
intf_thread_t *pIntf = sys->pIntf;
// force execution in the skins2 thread context
@@ -431,7 +433,7 @@ static void WindowClose( vout_window_t *pWnd )
static int WindowControl( vout_window_t *pWnd, int query, va_list args )
{
- vout_window_sys_t* sys = pWnd->sys;
+ vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
intf_thread_t *pIntf = sys->pIntf;
AsyncQueue *pQueue = AsyncQueue::instance( pIntf );
diff --git a/modules/video_output/wayland/xdg-shell.c b/modules/video_output/wayland/xdg-shell.c
index 8bb524e0eb..9904cd4029 100644
--- a/modules/video_output/wayland/xdg-shell.c
+++ b/modules/video_output/wayland/xdg-shell.c
@@ -66,7 +66,7 @@
#include "input.h"
#include "output.h"
-struct vout_window_sys_t
+typedef struct
{
struct wl_registry *registry;
struct wl_compositor *compositor;
@@ -105,7 +105,7 @@ struct vout_window_sys_t
vlc_mutex_t lock;
vlc_thread_t thread;
-};
+} vout_window_sys_t;
static void cleanup_wl_display_read(void *data)
{
diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index 4fea35d5ee..5d981ab624 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -45,7 +45,7 @@ typedef xcb_atom_t Atom;
#include "events.h"
-struct vout_window_sys_t
+typedef struct
{
xcb_connection_t *conn;
vlc_thread_t thread;
@@ -67,7 +67,7 @@ struct vout_window_sys_t
#endif
bool embedded;
-};
+} vout_window_sys_t;
#ifdef HAVE_XKBCOMMON
static int InitKeyboard(vout_window_t *wnd)
More information about the vlc-commits
mailing list