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

vout: remove no longer used display size event parameter

parent bcc9572b
......@@ -191,7 +191,7 @@ enum {
VOUT_DISPLAY_EVENT_FULLSCREEN,
VOUT_DISPLAY_EVENT_WINDOW_STATE,
VOUT_DISPLAY_EVENT_DISPLAY_SIZE, /* The display size need to change : int i_width, int i_height, bool is_fullscreen */
VOUT_DISPLAY_EVENT_DISPLAY_SIZE, /* The display size need to change : int i_width, int i_height */
/* */
VOUT_DISPLAY_EVENT_CLOSE,
......@@ -340,9 +340,9 @@ static inline void vout_display_SendEvent(vout_display_t *vd, int query, ...)
va_end(args);
}
static inline void vout_display_SendEventDisplaySize(vout_display_t *vd, int width, int height, bool is_fullscreen)
static inline void vout_display_SendEventDisplaySize(vout_display_t *vd, int width, int height)
{
vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_DISPLAY_SIZE, width, height, is_fullscreen);
vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_DISPLAY_SIZE, width, height);
}
static inline void vout_display_SendEventPicturesInvalid(vout_display_t *vd)
{
......
......@@ -301,8 +301,7 @@ static int Open(vlc_object_t *object)
vc_tv_register_callback(tvservice_cb, vd);
if (query_resolution(vd, &sys->display_width, &sys->display_height) >= 0) {
vout_display_SendEventDisplaySize(vd, sys->display_width, sys->display_height,
vd->cfg->is_fullscreen);
vout_display_SendEventDisplaySize(vd, sys->display_width, sys->display_height);
} else {
sys->display_width = vd->cfg->display.width;
sys->display_height = vd->cfg->display.height;
......@@ -607,7 +606,7 @@ static int vd_control(vout_display_t *vd, int query, va_list args)
case VOUT_DISPLAY_CHANGE_FULLSCREEN:
tmp_cfg = va_arg(args, const vout_display_cfg_t *);
vout_display_SendEventDisplaySize(vd, sys->display_width,
sys->display_height, tmp_cfg->is_fullscreen);
sys->display_height);
ret = VLC_SUCCESS;
break;
......@@ -658,7 +657,7 @@ static void vd_manage(vout_display_t *vd)
if (query_resolution(vd, &width, &height) >= 0) {
sys->display_width = width;
sys->display_height = height;
vout_display_SendEventDisplaySize(vd, width, height, vd->cfg->is_fullscreen);
vout_display_SendEventDisplaySize(vd, width, height);
}
sys->need_configure_display = false;
......
......@@ -687,7 +687,7 @@ static int Open(vlc_object_t *obj)
if (is_fullscreen && vout_window_SetFullScreen(sys->embed, true))
is_fullscreen = false;
vout_display_SendEventFullscreen(vd, is_fullscreen);
vout_display_SendEventDisplaySize(vd, width, height, is_fullscreen);
vout_display_SendEventDisplaySize(vd, width, height);
return VLC_SUCCESS;
......
......@@ -139,7 +139,7 @@ static int Open(vlc_object_t *object)
sys->state = *vd->cfg;
sys->state.is_fullscreen = false;
vout_display_SendEventFullscreen(vd, false);
vout_display_SendEventDisplaySize(vd, fmt.i_width, fmt.i_height, false);
vout_display_SendEventDisplaySize(vd, fmt.i_width, fmt.i_height);
return VLC_SUCCESS;
......@@ -297,7 +297,7 @@ static void Manage(vout_display_t *vd)
aa_resize(sys->aa_context);
vout_display_SendEventDisplaySize(vd,
aa_imgwidth(sys->aa_context),
aa_imgheight(sys->aa_context), false);
aa_imgheight(sys->aa_context));
break;
/* TODO keys support to complete */
......
......@@ -361,7 +361,7 @@ static void Refresh(vout_display_t *vd)
if (width != vd->cfg->display.width ||
height != vd->cfg->display.height)
vout_display_SendEventDisplaySize(vd, width, height, false);
vout_display_SendEventDisplaySize(vd, width, height);
}
/**
......@@ -504,7 +504,7 @@ static void Manage(vout_display_t *vd)
}
case CACA_EVENT_RESIZE:
vout_display_SendEventDisplaySize(vd, caca_get_event_resize_width(&ev),
caca_get_event_resize_height(&ev), false);
caca_get_event_resize_height(&ev));
break;
case CACA_EVENT_MOUSE_MOTION: {
vout_display_place_t place;
......
......@@ -203,7 +203,7 @@ static int Open (vlc_object_t *p_this)
else
outputSize = [sys->container visibleRect].size;
vout_display_SendEventFullscreen(vd, false);
vout_display_SendEventDisplaySize(vd, (int)outputSize.width, (int)outputSize.height, false);
vout_display_SendEventDisplaySize(vd, (int)outputSize.width, (int)outputSize.height);
[pool release];
return VLC_SUCCESS;
......@@ -429,7 +429,7 @@ static void *OurGetProcAddress (vlc_gl_t *gl, const char *name)
CGSize boundsSize = self.bounds.size;
if (_vd)
vout_display_SendEventDisplaySize(_vd, boundsSize.width, boundsSize.height, _vd->cfg->is_fullscreen);
vout_display_SendEventDisplaySize(_vd, boundsSize.width, boundsSize.height);
}
- (BOOL)canDrawInCGLContext:(CGLContextObj)glContext pixelFormat:(CGLPixelFormatObj)pixelFormat forLayerTime:(CFTimeInterval)timeInterval displayTime:(const CVTimeStamp *)timeStamp
......
......@@ -157,7 +157,7 @@ static int Open(vlc_object_t *object)
/* */
vout_display_SendEventFullscreen(vd, true);
vout_display_SendEventDisplaySize(vd, fmt.i_width, fmt.i_height, true);
vout_display_SendEventDisplaySize(vd, fmt.i_width, fmt.i_height);
return VLC_SUCCESS;
error:
......
......@@ -315,7 +315,7 @@ static int Open(vlc_object_t *object)
/* */
vout_display_SendEventFullscreen(vd, true);
vout_display_SendEventDisplaySize(vd, fmt.i_visible_width, fmt.i_visible_height, true);
vout_display_SendEventDisplaySize(vd, fmt.i_visible_width, fmt.i_visible_height);
return VLC_SUCCESS;
}
......
......@@ -201,7 +201,7 @@ static int Open(vlc_object_t *this)
/* forward our dimensions to the vout core */
CGSize viewSize = sys->viewContainer.frame.size;
vout_display_SendEventFullscreen(vd, false);
vout_display_SendEventDisplaySize(vd, (int)viewSize.width, (int)viewSize.height, false);
vout_display_SendEventDisplaySize(vd, (int)viewSize.width, (int)viewSize.height);
/* */
[[NSNotificationCenter defaultCenter] addObserver:sys->glESView
......@@ -502,8 +502,7 @@ static void OpenglESSwap(vlc_gl_t *gl)
vout_display_PlacePicture(&place, &_voutDisplay->source, &cfg_tmp, false);
_voutDisplay->sys->place = place;
vout_display_SendEventDisplaySize(_voutDisplay, viewSize.width * scaleFactor,
viewSize.height * scaleFactor,
_voutDisplay->cfg->is_fullscreen);
viewSize.height * scaleFactor);
}
}
......
......@@ -239,7 +239,7 @@ static int Open (vlc_object_t *this)
vd->control = Control;
/* */
vout_display_SendEventDisplaySize (vd, vd->fmt.i_visible_width, vd->fmt.i_visible_height, false);
vout_display_SendEventDisplaySize (vd, vd->fmt.i_visible_width, vd->fmt.i_visible_height);
return VLC_SUCCESS;
......@@ -644,7 +644,7 @@ static void OpenglSwap (vlc_gl_t *gl)
vout_display_PlacePicture (&place, &vd->source, &cfg_tmp, false);
vd->sys->place = place;
vout_display_SendEventDisplaySize (vd, bounds.size.width, bounds.size.height, vd->cfg->is_fullscreen);
vout_display_SendEventDisplaySize (vd, bounds.size.width, bounds.size.height);
}
}
......
......@@ -328,8 +328,8 @@ void UpdateRects(vout_display_t *vd,
point.x, point.y,
rect.right, rect.bottom);
if (is_resized)
vout_display_SendEventDisplaySize(vd, rect.right, rect.bottom, cfg->is_fullscreen);
if (!is_forced && !has_moved && !is_resized )
vout_display_SendEventDisplaySize(vd, rect.right, rect.bottom);
if (!is_forced && !has_moved && !is_resized)
return;
/* Update the window position and size */
......
......@@ -342,7 +342,7 @@ static int Open(vlc_object_t *object)
vd->manage = Manage;
/* */
vout_display_SendEventDisplaySize(vd, display_width, display_height, vd->cfg->is_fullscreen);
vout_display_SendEventDisplaySize(vd, display_width, display_height);
return VLC_SUCCESS;
error:
......@@ -510,7 +510,7 @@ static int Control(vout_display_t *vd, int query, va_list args)
vout_display_PlacePicture(&sys->place, &vd->source, &cfg, !sys->overlay);
}
vout_display_SendEventDisplaySize(vd, cfg.display.width, cfg.display.height, cfg.is_fullscreen);
vout_display_SendEventDisplaySize(vd, cfg.display.width, cfg.display.height);
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_ZOOM:
......@@ -648,7 +648,7 @@ static void Manage(vout_display_t *vd)
}
case SDL_VIDEORESIZE:
vout_display_SendEventDisplaySize(vd, event.resize.w, event.resize.h, vd->cfg->is_fullscreen);
vout_display_SendEventDisplaySize(vd, event.resize.w, event.resize.h);
break;
default:
......
......@@ -228,7 +228,7 @@ static int Open(vlc_object_t *object)
/* */
vout_display_SendEventFullscreen(vd, false);
vout_display_SendEventDisplaySize(vd, fmt.i_width, fmt.i_height, false);
vout_display_SendEventDisplaySize(vd, fmt.i_width, fmt.i_height);
vout_display_DeleteWindow(vd, NULL);
return VLC_SUCCESS;
}
......
......@@ -308,8 +308,7 @@ static int Control(vout_display_t *vd, int query, va_list ap)
if (query == VOUT_DISPLAY_CHANGE_DISPLAY_SIZE && va_arg(ap, int))
{
vout_display_SendEventDisplaySize(vd, cfg->display.width,
cfg->display.height,
vd->cfg->is_fullscreen);
cfg->display.height);
return VLC_EGENERIC;
}
......@@ -492,7 +491,7 @@ static int Open(vlc_object_t *obj)
is_fullscreen = false;
vout_display_SendEventFullscreen(vd, is_fullscreen);
vout_display_SendEventDisplaySize(vd, vd->cfg->display.width,
vd->cfg->display.height, is_fullscreen);
vd->cfg->display.height);
return VLC_SUCCESS;
error:
......
......@@ -249,7 +249,7 @@ static void
HandleParentStructure (vout_display_t *vd,
const xcb_configure_notify_event_t *ev)
{
vout_display_SendEventDisplaySize (vd, ev->width, ev->height, vd->cfg->is_fullscreen);
vout_display_SendEventDisplaySize (vd, ev->width, ev->height);
}
/**
......
......@@ -134,7 +134,7 @@ static int Open (vlc_object_t *obj)
if (vout_window_SetFullScreen (surface, fs))
fs = false;
vout_display_SendEventFullscreen (vd, fs);
vout_display_SendEventDisplaySize (vd, width, height, fs);
vout_display_SendEventDisplaySize (vd, width, height);
return VLC_SUCCESS;
......
......@@ -315,7 +315,7 @@ found_format:;
if (is_fullscreen && vout_window_SetFullScreen (sys->embed, true))
is_fullscreen = false;
vout_display_SendEventFullscreen (vd, is_fullscreen);
vout_display_SendEventDisplaySize (vd, width, height, is_fullscreen);
vout_display_SendEventDisplaySize (vd, width, height);
return VLC_SUCCESS;
......
......@@ -594,7 +594,7 @@ static int Open (vlc_object_t *obj)
if (is_fullscreen && vout_window_SetFullScreen (p_sys->embed, true))
is_fullscreen = false;
vout_display_SendEventFullscreen (vd, is_fullscreen);
vout_display_SendEventDisplaySize (vd, width, height, is_fullscreen);
vout_display_SendEventDisplaySize (vd, width, height);
return VLC_SUCCESS;
......
......@@ -699,9 +699,7 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
case VOUT_DISPLAY_EVENT_DISPLAY_SIZE: {
const int width = (int)va_arg(args, int);
const int height = (int)va_arg(args, int);
const bool is_fullscreen = (bool)va_arg(args, int);
msg_Dbg(vd, "VoutDisplayEvent 'resize' %dx%d %s",
width, height, is_fullscreen ? "fullscreen" : "window");
msg_Dbg(vd, "VoutDisplayEvent 'resize' %dx%d", width, height);
/* */
vlc_mutex_lock(&osys->lock);
......
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