Commit ed79d19a authored by Steve Lhomme's avatar Steve Lhomme

vout:win32: no need to pass a full vout_display_t to CommonControl()

We don't need to know anything about the display module in Common code. Only
the Init needs to keep track of the source video format.
parent 1abcf92b
......@@ -234,7 +234,7 @@ static void CommonChangeThumbnailClip(vlc_object_t *obj, vout_display_sys_win32_
}
#endif /* !VLC_WINSTORE_APP */
int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_sys_win32_t *sys, int query, va_list args)
int CommonControl(vlc_object_t *obj, display_win32_area_t *area, vout_display_sys_win32_t *sys, int query, va_list args)
{
switch (query) {
case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED: /* const vout_display_cfg_t *p_cfg */
......@@ -242,7 +242,7 @@ int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_s
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
case VOUT_DISPLAY_CHANGE_SOURCE_CROP: {
area->vdcfg = *va_arg(args, const vout_display_cfg_t *);
UpdateRects(VLC_OBJECT(vd), area, sys);
UpdateRects(obj, area, sys);
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: /* const vout_display_cfg_t *p_cfg */
......@@ -256,7 +256,7 @@ int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_s
area->vdcfg.display.height, SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE);
}
#endif /* !VLC_WINSTORE_APP */
UpdateRects(VLC_OBJECT(vd), area, sys);
UpdateRects(obj, area, sys);
return VLC_SUCCESS;
}
......
......@@ -76,7 +76,7 @@ int CommonInit(vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t
bool projection_gestures);
void CommonClean(vlc_object_t *, vout_display_sys_win32_t *);
#endif /* !VLC_WINSTORE_APP */
int CommonControl(vout_display_t *, display_win32_area_t *, vout_display_sys_win32_t *, int , va_list );
int CommonControl(vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *, int , va_list );
void UpdateRects (vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *);
......
......@@ -733,7 +733,7 @@ static void SetQuadVSProjection(vout_display_t *vd, d3d_quad_t *quad, const vlc_
static int Control(vout_display_t *vd, int query, va_list args)
{
vout_display_sys_t *sys = vd->sys;
int res = CommonControl( vd, &sys->area, &sys->sys, query, args );
int res = CommonControl( VLC_OBJECT(vd), &sys->area, &sys->sys, query, args );
if (query == VOUT_DISPLAY_CHANGE_VIEWPOINT)
{
......
......@@ -1544,7 +1544,7 @@ static int Control(vout_display_t *vd, int query, va_list args)
return VLC_SUCCESS;
}
default:
return CommonControl(vd, &sys->area, &sys->sys, query, args);
return CommonControl(VLC_OBJECT(vd), &sys->area, &sys->sys, query, args);
}
}
......
......@@ -83,7 +83,7 @@ static int Control(vout_display_t *vd, int query, va_list args)
return vout_display_opengl_SetViewpoint(sys->vgl,
&va_arg (args, const vout_display_cfg_t* )->viewpoint);
return CommonControl(vd, &sys->area, &sys->sys, query, args);
return CommonControl(VLC_OBJECT(vd), &sys->area, &sys->sys, query, args);
}
static const struct vout_window_operations embedVideoWindow_Ops =
......
......@@ -101,7 +101,7 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
static int Control(vout_display_t *vd, int query, va_list args)
{
vout_display_sys_t *sys = vd->sys;
return CommonControl(vd, &sys->area, &sys->sys, query, args);
return CommonControl(VLC_OBJECT(vd), &sys->area, &sys->sys, query, args);
}
/* */
......
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