Discussion:
[vlc-commits] window: remove configuration parameter
Rémi Denis-Courmont
2018-12-08 16:09:45 UTC
Permalink
vlc | branch: master | Rémi Denis-Courmont <***@remlab.net> | Sat Dec 8 16:17:42 2018 +0200| [fd38297c687f1dd2d57f5bbe64bacb51322b40f3] | committer: Rémi Denis-Courmont

window: remove configuration parameter

...from activation callback.
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fd38297c687f1dd2d57f5bbe64bacb51322b40f3
---

modules/gui/macosx/VLCVideoOutputProvider.m | 2 +-
modules/gui/macosx/macosx.m | 2 +-
modules/gui/minimal_macosx/intf.m | 2 +-
modules/gui/minimal_macosx/macosx.c | 2 +-
modules/gui/qt/qt.cpp | 4 ++--
modules/gui/skins2/src/skin_main.cpp | 4 ++--
modules/video_output/android/window.c | 4 ++--
modules/video_output/drawable.c | 4 ++--
modules/video_output/wayland/xdg-shell.c | 2 +-
modules/video_output/wdummy.c | 3 +--
modules/video_output/xcb/window.c | 4 ++--
src/video_output/window.c | 7 +++----
12 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/modules/gui/macosx/VLCVideoOutputProvider.m b/modules/gui/macosx/VLCVideoOutputProvider.m
index 02d0fc2203..e4b73b3fd4 100644
--- a/modules/gui/macosx/VLCVideoOutputProvider.m
+++ b/modules/gui/macosx/VLCVideoOutputProvider.m
@@ -152,7 +152,7 @@ static const struct vout_window_operations ops = {
WindowSetFullscreen,
};

-int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
+int WindowOpen(vout_window_t *p_wnd)
{
if (!atomic_load(&b_intf_starting)) {
msg_Err(p_wnd, "Cannot create vout as Mac OS X interface was not found");
diff --git a/modules/gui/macosx/macosx.m b/modules/gui/macosx/macosx.m
index 30410a1ca6..1a4a22786e 100644
--- a/modules/gui/macosx/macosx.m
+++ b/modules/gui/macosx/macosx.m
@@ -42,7 +42,7 @@
int OpenIntf (vlc_object_t *);
void CloseIntf (vlc_object_t *);

-int WindowOpen (vout_window_t *, const vout_window_cfg_t *);
+int WindowOpen (vout_window_t *);

/*****************************************************************************
* Module descriptor
diff --git a/modules/gui/minimal_macosx/intf.m b/modules/gui/minimal_macosx/intf.m
index a011f5a28b..a96a84393a 100644
--- a/modules/gui/minimal_macosx/intf.m
+++ b/modules/gui/minimal_macosx/intf.m
@@ -191,7 +191,7 @@ static const struct vout_window_operations ops = {
WindowSetFullscreen,
};

-int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
+int WindowOpen(vout_window_t *p_wnd)
{
p_wnd->type = VOUT_WINDOW_TYPE_NSOBJECT;
p_wnd->ops = &ops;
diff --git a/modules/gui/minimal_macosx/macosx.c b/modules/gui/minimal_macosx/macosx.c
index f549b2e3cd..1547280d9d 100644
--- a/modules/gui/minimal_macosx/macosx.c
+++ b/modules/gui/minimal_macosx/macosx.c
@@ -43,7 +43,7 @@
int OpenIntf ( vlc_object_t * );
void CloseIntf ( vlc_object_t * );

-int WindowOpen ( vout_window_t *, const vout_window_cfg_t * );
+int WindowOpen ( vout_window_t * );

/*****************************************************************************
* Module descriptor
diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
index 55fb0cf603..2448a5394a 100644
--- a/modules/gui/qt/qt.cpp
+++ b/modules/gui/qt/qt.cpp
@@ -90,7 +90,7 @@ static int OpenIntf ( vlc_object_t * );
static int OpenDialogs ( vlc_object_t * );
static int Open ( vlc_object_t *, bool );
static void Close ( vlc_object_t * );
-static int WindowOpen ( vout_window_t *, const vout_window_cfg_t * );
+static int WindowOpen ( vout_window_t * );
static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );

/*****************************************************************************
@@ -689,7 +689,7 @@ static void ShowDialog( intf_thread_t *p_intf, int i_dialog_event, int i_arg,
/**
* Video output window provider
*/
-static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t * )
+static int WindowOpen( vout_window_t *p_wnd )
{
if( !var_InheritBool( p_wnd, "embedded-video" ) )
return VLC_EGENERIC;
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index df36515046..badda8ffaa 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -318,7 +318,7 @@ end:
return NULL;
}

-static int WindowOpen( vout_window_t *, const vout_window_cfg_t * );
+static int WindowOpen( vout_window_t * );
static void WindowClose( vout_window_t * );

typedef struct
@@ -438,7 +438,7 @@ static const struct vout_window_operations window_ops = {
WindowSetFullscreen,
};

-static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t * )
+static int WindowOpen( vout_window_t *pWnd )
{
if( var_InheritBool( pWnd, "video-wallpaper" )
|| !var_InheritBool( pWnd, "embedded-video" ) )
diff --git a/modules/video_output/android/window.c b/modules/video_output/android/window.c
index 602c8204b5..e175315b3a 100644
--- a/modules/video_output/android/window.c
+++ b/modules/video_output/android/window.c
@@ -37,7 +37,7 @@

#include "utils.h"

-static int Open(vout_window_t *, const vout_window_cfg_t *);
+static int Open(vout_window_t *);
static void Close(vout_window_t *);

/*
@@ -83,7 +83,7 @@ static const struct vout_window_operations ops = {
/**
* Create an Android native window.
*/
-static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
+static int Open(vout_window_t *wnd)
{
AWindowHandler *p_awh = AWindowHandler_new(wnd,
&(awh_events_t) { OnNewWindowSize, OnNewMouseCoords });
diff --git a/modules/video_output/drawable.c b/modules/video_output/drawable.c
index b5ca715f50..26c99245fb 100644
--- a/modules/video_output/drawable.c
+++ b/modules/video_output/drawable.c
@@ -36,7 +36,7 @@
"Video will be embedded in this pre-existing window. " \
"If zero, a new window will be created.")

-static int Open (vout_window_t *, const vout_window_cfg_t *);
+static int Open(vout_window_t *);
static void Close(vout_window_t *);

/*
@@ -67,7 +67,7 @@ static const struct vout_window_operations ops = {
/**
* Find the drawable set by libvlc application.
*/
-static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
+static int Open(vout_window_t *wnd)
{
uintptr_t val = var_InheritInteger (wnd, "drawable-hwnd");
if (val == 0)
diff --git a/modules/video_output/wayland/xdg-shell.c b/modules/video_output/wayland/xdg-shell.c
index 5996562af1..0e440ef9c1 100644
--- a/modules/video_output/wayland/xdg-shell.c
+++ b/modules/video_output/wayland/xdg-shell.c
@@ -497,7 +497,7 @@ struct wl_surface *window_get_cursor(vout_window_t *wnd, int32_t *restrict hsx,
/**
* Creates a Wayland shell surface.
*/
-static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
+static int Open(vout_window_t *wnd)
{
vout_window_sys_t *sys = malloc(sizeof (*sys));
if (unlikely(sys == NULL))
diff --git a/modules/video_output/wdummy.c b/modules/video_output/wdummy.c
index 104d70b991..c69b28f840 100644
--- a/modules/video_output/wdummy.c
+++ b/modules/video_output/wdummy.c
@@ -34,11 +34,10 @@ static const struct vout_window_operations ops = {
.resize = vout_window_ReportSize,
};

-static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
+static int Open(vout_window_t *wnd)
{
wnd->type = VOUT_WINDOW_TYPE_DUMMY;
wnd->ops = &ops;
- vout_window_ReportSize(wnd, cfg->width, cfg->height);
return VLC_SUCCESS;
}

diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index afba7db838..b25d1ddb85 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -671,7 +671,7 @@ static int OpenCommon(vout_window_t *wnd, char *display,
/**
* Create an X11 window.
*/
-static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
+static int Open(vout_window_t *wnd)
{
xcb_generic_error_t *err;
xcb_void_cookie_t ck;
@@ -720,7 +720,7 @@ static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)

xcb_window_t window = xcb_generate_id (conn);
ck = xcb_create_window_checked (conn, scr->root_depth, window, scr->root,
- 0, 0, cfg->width, cfg->height, 0,
+ 0, 0, 1, 1, 0,
XCB_WINDOW_CLASS_INPUT_OUTPUT,
scr->root_visual, mask, values);
err = xcb_request_check (conn, ck);
diff --git a/src/video_output/window.c b/src/video_output/window.c
index 772968c545..d9ce200abc 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -47,11 +47,10 @@ typedef struct

static int vout_window_start(void *func, va_list ap)
{
- int (*activate)(vout_window_t *, const vout_window_cfg_t *) = func;
+ int (*activate)(vout_window_t *) = func;
vout_window_t *wnd = va_arg(ap, vout_window_t *);
- const vout_window_cfg_t *cfg = va_arg(ap, const vout_window_cfg_t *);

- return activate(wnd, cfg);
+ return activate(wnd);
}

vout_window_t *vout_window_New(vlc_object_t *obj, const char *module,
@@ -68,7 +67,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj, const char *module,
window->owner = *owner;

w->module = vlc_module_load(window, "vout window", module, false,
- vout_window_start, window, cfg);
+ vout_window_start, window);
if (!w->module) {
vlc_object_release(window);
return NULL;

Loading...