[vlc-devel] [PATCH 03/20] display: don't pass a const vout_display_cfg_t* anymore in VOUT_DISPLAY_CHANGE_xxx
Steve Lhomme
robux4 at ycbcr.xyz
Tue Aug 25 09:29:51 CEST 2020
---
include/vlc_vout_display.h | 12 ++++++------
modules/hw/vdpau/display.c | 1 -
modules/video_output/wayland/shm.c | 1 -
modules/video_output/win32/common.c | 6 +++---
modules/video_output/xcb/x11.c | 1 -
src/video_output/display.c | 17 +++++++----------
6 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 2a0b593a13e..485d5634c2a 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -157,7 +157,7 @@ enum vout_display_query {
* \ref VOUT_DISPLAY_CHANGE_SOURCE_CROP
* control query returns an error.
*/
- VOUT_DISPLAY_RESET_PICTURES, /* const vout_display_cfg_t *, video_format_t * */
+ VOUT_DISPLAY_RESET_PICTURES, /* video_format_t * */
#if defined(__OS2__)
/* Ask the module to acknowledge/refuse the fullscreen state change after
@@ -174,7 +174,7 @@ enum vout_display_query {
* \retval VLC_EGENERIC if a \ref VOUT_DISPLAY_RESET_PICTURES request
* is necessary
*/
- VOUT_DISPLAY_CHANGE_DISPLAY_SIZE, /* const vout_display_cfg_t *p_cfg */
+ VOUT_DISPLAY_CHANGE_DISPLAY_SIZE,
/**
* Notifies a change of the display fill display flag by the user.
@@ -183,7 +183,7 @@ enum vout_display_query {
* \retval VLC_EGENERIC if a \ref VOUT_DISPLAY_RESET_PICTURES request
* is necessary
*/
- VOUT_DISPLAY_CHANGE_DISPLAY_FILLED, /* const vout_display_cfg_t *p_cfg */
+ VOUT_DISPLAY_CHANGE_DISPLAY_FILLED,
/**
* Notifies a change of the user zoom factor.
@@ -192,7 +192,7 @@ enum vout_display_query {
* \retval VLC_EGENERIC if a \ref VOUT_DISPLAY_RESET_PICTURES request
* is necessary
*/
- VOUT_DISPLAY_CHANGE_ZOOM, /* const vout_display_cfg_t *p_cfg */
+ VOUT_DISPLAY_CHANGE_ZOOM,
/**
* Notifies a change of the sample aspect ratio.
@@ -201,7 +201,7 @@ enum vout_display_query {
* \retval VLC_EGENERIC if a \ref VOUT_DISPLAY_RESET_PICTURES request
* is necessary
*/
- VOUT_DISPLAY_CHANGE_SOURCE_ASPECT, /* const vout_display_cfg_t *p_cfg */
+ VOUT_DISPLAY_CHANGE_SOURCE_ASPECT,
/**
* Notifies a change of the source cropping.
@@ -213,7 +213,7 @@ enum vout_display_query {
* \retval VLC_EGENERIC if a \ref VOUT_DISPLAY_RESET_PICTURES request
* is necessary
*/
- VOUT_DISPLAY_CHANGE_SOURCE_CROP, /* const vout_display_cfg_t *p_cfg */
+ VOUT_DISPLAY_CHANGE_SOURCE_CROP,
/**
* Notifies a change of VR/360° viewpoint.
diff --git a/modules/hw/vdpau/display.c b/modules/hw/vdpau/display.c
index 60916964110..3f4ce81b276 100644
--- a/modules/hw/vdpau/display.c
+++ b/modules/hw/vdpau/display.c
@@ -231,7 +231,6 @@ static int Control(vout_display_t *vd, int query, va_list ap)
{
case VOUT_DISPLAY_RESET_PICTURES:
{
- va_arg(ap, const vout_display_cfg_t *);
video_format_t *fmt = va_arg(ap, video_format_t *);
const video_format_t *src= &vd->source;
vout_display_place_t place;
diff --git a/modules/video_output/wayland/shm.c b/modules/video_output/wayland/shm.c
index 483dc0117c7..ffd028c385e 100644
--- a/modules/video_output/wayland/shm.c
+++ b/modules/video_output/wayland/shm.c
@@ -160,7 +160,6 @@ static int Control(vout_display_t *vd, int query, va_list ap)
{
case VOUT_DISPLAY_RESET_PICTURES:
{
- va_arg(ap, const vout_display_cfg_t *);
video_format_t *fmt = va_arg(ap, video_format_t *);
vout_display_place_t place;
video_format_t src;
diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 1a72926b9d8..3b072e9074f 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -140,15 +140,15 @@ void CommonWindowClean(vout_display_sys_win32_t *sys)
int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_sys_win32_t *sys, int query)
{
switch (query) {
- case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED: /* const vout_display_cfg_t *p_cfg */
- case VOUT_DISPLAY_CHANGE_ZOOM: /* const vout_display_cfg_t *p_cfg */
+ case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
+ case VOUT_DISPLAY_CHANGE_ZOOM:
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
case VOUT_DISPLAY_CHANGE_SOURCE_CROP: {
area->vdcfg = *vd->cfg;
CommonPlacePicture(vd, area, sys);
return VLC_SUCCESS;
}
- case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: /* const vout_display_cfg_t *p_cfg */
+ case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
{ /* Update dimensions */
area->vdcfg = *vd->cfg;
#if !VLC_WINSTORE_APP
diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index 0aebfd81591..c0f2e18b039 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -180,7 +180,6 @@ static int Control(vout_display_t *vd, int query, va_list ap)
case VOUT_DISPLAY_RESET_PICTURES:
{
- va_arg(ap, const vout_display_cfg_t *);
*va_arg(ap, video_format_t *) = sys->fmt;
return VLC_SUCCESS;
}
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 0112425ac14..ebc3a94b615 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -486,8 +486,7 @@ static void vout_display_Reset(vout_display_t *vd)
osys->pool = NULL;
}
- if (vout_display_Control(vd, VOUT_DISPLAY_RESET_PICTURES, &osys->cfg,
- &vd->fmt)
+ if (vout_display_Control(vd, VOUT_DISPLAY_RESET_PICTURES, &vd->fmt)
|| VoutDisplayCreateRender(vd))
msg_Err(vd, "Failed to adjust render format");
}
@@ -548,8 +547,7 @@ static int vout_UpdateSourceCrop(vout_display_t *vd)
video_format_Print(VLC_OBJECT(vd), "SOURCE ", &osys->source);
video_format_Print(VLC_OBJECT(vd), "CROPPED", &vd->source);
- int ret = vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_CROP,
- &osys->cfg);
+ int ret = vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_CROP);
osys->crop.left = left - osys->source.i_x_offset;
osys->crop.top = top - osys->source.i_y_offset;
/* FIXME for right/bottom we should keep the 'type' border vs window */
@@ -576,8 +574,7 @@ static int vout_SetSourceAspect(vout_display_t *vd,
vd->source.i_sar_den = osys->source.i_sar_den;
}
- if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT,
- &osys->cfg))
+ if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT))
ret = -1;
/* If a crop ratio is requested, recompute the parameters */
@@ -637,7 +634,7 @@ void vout_display_SetSize(vout_display_t *vd, unsigned width, unsigned height)
osys->cfg.display.width = width;
osys->cfg.display.height = height;
- if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_DISPLAY_SIZE, &osys->cfg)
+ if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_DISPLAY_SIZE)
|| vout_display_CheckReset(vd))
vout_display_Reset(vd);
}
@@ -650,8 +647,8 @@ void vout_SetDisplayFilled(vout_display_t *vd, bool is_filled)
return; /* nothing to do */
osys->cfg.is_display_filled = is_filled;
- if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED,
- &osys->cfg) || vout_display_CheckReset(vd))
+ if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED)
+ || vout_display_CheckReset(vd))
vout_display_Reset(vd);
}
@@ -665,7 +662,7 @@ void vout_SetDisplayZoom(vout_display_t *vd, unsigned num, unsigned den)
osys->cfg.zoom.num = num;
osys->cfg.zoom.den = den;
- if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_ZOOM, &osys->cfg) ||
+ if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_ZOOM) ||
vout_display_CheckReset(vd))
vout_display_Reset(vd);
}
--
2.26.2
More information about the vlc-devel
mailing list