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