[vlc-devel] [PATCH 3/3] display: remove the unused vararg from the control callback

Steve Lhomme robux4 at ycbcr.xyz
Fri Sep 11 16:06:20 CEST 2020


goes with previous 2 patches

On 2020-09-11 16:05, Steve Lhomme wrote:
> And pass the enum vout_display_query instead of an int.
> ---
>   include/vlc_vout_display.h              |  2 +-
>   modules/hw/mmal/vout.c                  |  3 +--
>   modules/hw/vdpau/display.c              |  2 +-
>   modules/video_output/android/display.c  | 10 +++++-----
>   modules/video_output/caca.c             |  4 +---
>   modules/video_output/caopengllayer.m    |  4 ++--
>   modules/video_output/decklink.cpp       |  4 ++--
>   modules/video_output/fb.c               |  6 +++---
>   modules/video_output/flaschen.c         |  6 ++----
>   modules/video_output/ios.m              |  4 ++--
>   modules/video_output/kms.c              |  4 ++--
>   modules/video_output/kva.c              |  6 +++---
>   modules/video_output/macosx.m           |  2 +-
>   modules/video_output/opengl/display.c   |  4 ++--
>   modules/video_output/splitter.c         |  4 ++--
>   modules/video_output/vdummy.c           |  6 +++---
>   modules/video_output/vmem.c             |  6 +++---
>   modules/video_output/vulkan/display.c   |  4 ++--
>   modules/video_output/wayland/shm.c      |  2 +-
>   modules/video_output/win32/common.c     |  2 +-
>   modules/video_output/win32/common.h     |  2 +-
>   modules/video_output/win32/direct3d11.c |  5 ++---
>   modules/video_output/win32/direct3d9.c  |  3 +--
>   modules/video_output/win32/glwin32.c    |  3 +--
>   modules/video_output/win32/wingdi.c     |  3 +--
>   modules/video_output/xcb/render.c       |  2 +-
>   modules/video_output/xcb/x11.c          |  2 +-
>   modules/video_output/yuv.c              |  6 +++---
>   src/video_output/display.c              | 10 ++--------
>   29 files changed, 53 insertions(+), 68 deletions(-)
> 
> diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
> index 5cd6f86f3ab..6598e396906 100644
> --- a/include/vlc_vout_display.h
> +++ b/include/vlc_vout_display.h
> @@ -296,7 +296,7 @@ struct vlc_display_operations
>        *
>        * See \ref vout_display_query for the list of request types.
>        */
> -    int        (*control)(vout_display_t *, int query, va_list);
> +    int        (*control)(vout_display_t *, enum vout_display_query);
>   
>       /**
>        * Reset the picture format handled by the module.
> diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
> index f65f69f53d5..72242975957 100644
> --- a/modules/hw/mmal/vout.c
> +++ b/modules/hw/mmal/vout.c
> @@ -703,11 +703,10 @@ static int vd_reset_pictures(vout_display_t *vd, video_format_t *fmt)
>       return VLC_SUCCESS;
>   }
>   
> -static int vd_control(vout_display_t *vd, int query, va_list args)
> +static int vd_control(vout_display_t *vd, enum vout_display_query query)
>   {
>       vout_display_sys_t * const sys = vd->sys;
>       int ret = VLC_EGENERIC;
> -    VLC_UNUSED(args);
>   
>       switch (query) {
>           case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
> diff --git a/modules/hw/vdpau/display.c b/modules/hw/vdpau/display.c
> index 1f32acfccb8..4c17a9afa0a 100644
> --- a/modules/hw/vdpau/display.c
> +++ b/modules/hw/vdpau/display.c
> @@ -249,7 +249,7 @@ static int ResetPictures(vout_display_t *vd, video_format_t *fmt)
>       return VLC_SUCCESS;
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list ap)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
>       vout_display_sys_t *sys = vd->sys;
>   
> diff --git a/modules/video_output/android/display.c b/modules/video_output/android/display.c
> index 5dfa6d42660..d8198435a45 100644
> --- a/modules/video_output/android/display.c
> +++ b/modules/video_output/android/display.c
> @@ -76,7 +76,7 @@ static const vlc_fourcc_t subpicture_chromas[] =
>   
>   static void             Prepare(vout_display_t *, picture_t *, subpicture_t *, vlc_tick_t);
>   static void             Display(vout_display_t *, picture_t *);
> -static int              Control(vout_display_t *, int, va_list);
> +static int              Control(vout_display_t *, enum vout_display_query);
>   
>   typedef struct
>   {
> @@ -896,7 +896,7 @@ static void CopySourceAspect(video_format_t *p_dest,
>       p_dest->i_sar_den = p_src->i_sar_den;
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list args)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
>       vout_display_sys_t *sys = vd->sys;
>   
> @@ -924,11 +924,11 @@ static int Control(vout_display_t *vd, int query, va_list args)
>           FixSubtitleFormat(sys);
>           return VLC_SUCCESS;
>       }
> -    default:
> -        msg_Warn(vd, "Unknown request in android-display: %d", query);
> -        return VLC_EGENERIC;
>       case VOUT_DISPLAY_CHANGE_ZOOM:
>       case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
>           return VLC_SUCCESS;
> +    default:
> +        msg_Warn(vd, "Unknown request in android-display: %d", query);
> +        return VLC_EGENERIC;
>       }
>   }
> diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
> index 060ea9c5c10..b80a4f81329 100644
> --- a/modules/video_output/caca.c
> +++ b/modules/video_output/caca.c
> @@ -171,12 +171,10 @@ static void PictureDisplay(vout_display_t *vd, picture_t *picture)
>   /**
>    * Control for vout display
>    */
> -static int Control(vout_display_t *vd, int query, va_list args)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
>       vout_display_sys_t *sys = vd->sys;
>   
> -    (void) args;
> -
>       switch (query) {
>       case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
>           if (sys->dither)
> diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
> index 21b38785d61..04151ba3c14 100644
> --- a/modules/video_output/caopengllayer.m
> +++ b/modules/video_output/caopengllayer.m
> @@ -66,7 +66,7 @@ vlc_module_end()
>   static void PictureRender   (vout_display_t *vd, picture_t *pic, subpicture_t *subpicture,
>                                vlc_tick_t date);
>   static void PictureDisplay  (vout_display_t *vd, picture_t *pic);
> -static int Control          (vout_display_t *vd, int query, va_list ap);
> +static int Control          (vout_display_t *vd, enum vout_display_query);
>   
>   static void *OurGetProcAddress (vlc_gl_t *gl, const char *name);
>   static int OpenglLock         (vlc_gl_t *gl);
> @@ -310,7 +310,7 @@ static void PictureDisplay (vout_display_t *vd, picture_t *pic)
>       }
>   }
>   
> -static int Control (vout_display_t *vd, int query, va_list ap)
> +static int Control (vout_display_t *vd, enum vout_display_query query)
>   {
>       vout_display_sys_t *sys = vd->sys;
>   
> diff --git a/modules/video_output/decklink.cpp b/modules/video_output/decklink.cpp
> index 6aef6044901..d303afa5251 100644
> --- a/modules/video_output/decklink.cpp
> +++ b/modules/video_output/decklink.cpp
> @@ -753,9 +753,9 @@ end:
>           pDLVideoFrame->Release();
>   }
>   
> -static int ControlVideo(vout_display_t *vd, int query, va_list args)
> +static int ControlVideo(vout_display_t *vd, enum vout_display_query query)
>   {
> -    (void) vd; (void) args;
> +    (void) vd;
>   
>       switch (query) {
>           case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
> diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c
> index 55e9523c81f..c72daddc504 100644
> --- a/modules/video_output/fb.c
> +++ b/modules/video_output/fb.c
> @@ -94,7 +94,7 @@ vlc_module_end ()
>    * Local prototypes
>    *****************************************************************************/
>   static void           Display(vout_display_t *, picture_t *);
> -static int            Control(vout_display_t *, int, va_list);
> +static int            Control(vout_display_t *, enum vout_display_query);
>   
>   /* */
>   static int  OpenDisplay  (vout_display_t *, bool force_resolution);
> @@ -345,9 +345,9 @@ static void Display(vout_display_t *vd, picture_t *picture)
>       picture_Copy(sys->picture, picture);
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list args)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
> -    (void) vd; (void) args;
> +    (void) vd;
>   
>       switch (query) {
>           case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
> diff --git a/modules/video_output/flaschen.c b/modules/video_output/flaschen.c
> index b2e38ff838b..5c4013aeca1 100644
> --- a/modules/video_output/flaschen.c
> +++ b/modules/video_output/flaschen.c
> @@ -79,7 +79,7 @@ struct vout_display_sys_t {
>       int             fd;
>   };
>   static void            Display(vout_display_t *, picture_t *);
> -static int             Control(vout_display_t *, int, va_list);
> +static int             Control(vout_display_t *, enum vout_display_query);
>   
>   static const struct vlc_display_operations ops = {
>       Close, NULL, Display, Control, NULL, NULL,
> @@ -210,10 +210,8 @@ static void Display(vout_display_t *vd, picture_t *picture)
>   /**
>    * Control for vout display
>    */
> -static int Control(vout_display_t *vd, int query, va_list args)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
> -    VLC_UNUSED(args);
> -
>       switch (query) {
>       case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
>       case VOUT_DISPLAY_CHANGE_ZOOM:
> diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
> index a7de419cc18..3cf5560c6dc 100644
> --- a/modules/video_output/ios.m
> +++ b/modules/video_output/ios.m
> @@ -58,7 +58,7 @@ static void Close(vout_display_t *vd);
>   
>   static void PictureRender(vout_display_t *, picture_t *, subpicture_t *, vlc_tick_t);
>   static void PictureDisplay(vout_display_t *, picture_t *);
> -static int Control(vout_display_t*, int, va_list);
> +static int Control(vout_display_t*, enum vout_display_query);
>   
>   static void *OurGetProcAddress(vlc_gl_t *, const char *);
>   
> @@ -262,7 +262,7 @@ static void Close(vout_display_t *vd)
>    * vout display callbacks
>    *****************************************************************************/
>   
> -static int Control(vout_display_t *vd, int query, va_list ap)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
>       vout_display_sys_t *sys = vd->sys;
>       struct gl_sys *glsys = sys->gl->sys;
> diff --git a/modules/video_output/kms.c b/modules/video_output/kms.c
> index 78b026b97c1..445c7a59c53 100644
> --- a/modules/video_output/kms.c
> +++ b/modules/video_output/kms.c
> @@ -598,9 +598,9 @@ err_out:
>   }
>   
>   
> -static int Control(vout_display_t *vd, int query, va_list args)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
> -    (void) vd; (void) args;
> +    (void) vd;
>   
>       switch (query) {
>           case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
> diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
> index db4ab669376..30662f4fef9 100644
> --- a/modules/video_output/kva.c
> +++ b/modules/video_output/kva.c
> @@ -110,7 +110,7 @@ struct vout_display_sys_t
>    * Local prototypes
>    *****************************************************************************/
>   static void            Display(vout_display_t *, picture_t *);
> -static int             Control(vout_display_t *, int, va_list);
> +static int             Control(vout_display_t *, enum vout_display_query);
>   
>   static int  OpenDisplay ( vout_display_t *, video_format_t * );
>   static void CloseDisplay( vout_display_t * );
> @@ -392,9 +392,8 @@ static void Display( vout_display_t *vd, picture_t *picture )
>   /*****************************************************************************
>    * Control: control facility for the vout
>    *****************************************************************************/
> -static int Control( vout_display_t *vd, int query, va_list args )
> +static int Control( vout_display_t *vd, enum vout_display_query query )
>   {
> -    VLC_UNUSED(args);
>       vout_display_sys_t *sys = vd->sys;
>   
>       switch (query)
> @@ -449,6 +448,7 @@ static int Control( vout_display_t *vd, int query, va_list args )
>           kvaSetup( &sys->kvas );
>           return VLC_SUCCESS;
>       }
> +    }
>   
>       msg_Err(vd, "Unsupported query(=%d) in vout display KVA", query);
>       return VLC_EGENERIC;
> diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
> index 24fb26250db..3af6518417a 100644
> --- a/modules/video_output/macosx.m
> +++ b/modules/video_output/macosx.m
> @@ -346,7 +346,7 @@ static void PictureDisplay (vout_display_t *vd, picture_t *pic)
>       sys->has_first_frame = true;
>   }
>   
> -static int Control (vout_display_t *vd, int query, va_list ap)
> +static int Control (vout_display_t *vd, enum vout_display_query query)
>   {
>       vout_display_sys_t *sys = vd->sys;
>   
> diff --git a/modules/video_output/opengl/display.c b/modules/video_output/opengl/display.c
> index a9891cc658b..cc16a9bb5c8 100644
> --- a/modules/video_output/opengl/display.c
> +++ b/modules/video_output/opengl/display.c
> @@ -85,7 +85,7 @@ struct vout_display_sys_t
>   /* Display callbacks */
>   static void PictureRender (vout_display_t *, picture_t *, subpicture_t *, vlc_tick_t);
>   static void PictureDisplay (vout_display_t *, picture_t *);
> -static int Control (vout_display_t *, int, va_list);
> +static int Control (vout_display_t *, enum vout_display_query);
>   
>   static int SetViewpoint(vout_display_t *vd, const vlc_viewpoint_t *vp)
>   {
> @@ -229,7 +229,7 @@ FlipVerticalAlign(vout_display_cfg_t *cfg)
>           cfg->align.vertical = VLC_VIDEO_ALIGN_TOP;
>   }
>   
> -static int Control (vout_display_t *vd, int query, va_list ap)
> +static int Control (vout_display_t *vd, enum vout_display_query query)
>   {
>       vout_display_sys_t *sys = vd->sys;
>   
> diff --git a/modules/video_output/splitter.c b/modules/video_output/splitter.c
> index 57f63ad7d39..7ad4101f632 100644
> --- a/modules/video_output/splitter.c
> +++ b/modules/video_output/splitter.c
> @@ -93,9 +93,9 @@ static void vlc_vidsplit_Display(vout_display_t *vd, picture_t *picture)
>       (void) picture;
>   }
>   
> -static int vlc_vidsplit_Control(vout_display_t *vd, int query, va_list args)
> +static int vlc_vidsplit_Control(vout_display_t *vd, enum vout_display_query query)
>   {
> -    (void) vd; (void) args;
> +    (void) vd;
>   
>       switch (query) {
>           case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
> diff --git a/modules/video_output/vdummy.c b/modules/video_output/vdummy.c
> index 182636dfdbd..5d1217a1d04 100644
> --- a/modules/video_output/vdummy.c
> +++ b/modules/video_output/vdummy.c
> @@ -64,7 +64,7 @@ vlc_module_end ()
>    * Local prototypes
>    *****************************************************************************/
>   static void            DisplayStat(vout_display_t *, picture_t *);
> -static int             Control(vout_display_t *, int, va_list);
> +static int             Control(vout_display_t *, enum vout_display_query);
>   
>   /*****************************************************************************
>    * OpenVideo: activates dummy vout display method
> @@ -125,9 +125,9 @@ static void DisplayStat(vout_display_t *vd, picture_t *picture)
>       }
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list args)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
> -    (void) vd; (void) args;
> +    (void) vd;
>   
>       switch (query) {
>           case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
> diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c
> index 125ba802378..d2693ed5f90 100644
> --- a/modules/video_output/vmem.c
> +++ b/modules/video_output/vmem.c
> @@ -103,7 +103,7 @@ typedef unsigned (*vlc_format_cb)(void **, char *, unsigned *, unsigned *,
>   
>   static void           Prepare(vout_display_t *, picture_t *, subpicture_t *, vlc_tick_t);
>   static void           Display(vout_display_t *, picture_t *);
> -static int            Control(vout_display_t *, int, va_list);
> +static int            Control(vout_display_t *, enum vout_display_query);
>   
>   static const struct vlc_display_operations ops = {
>       Close, Prepare, Display, Control, NULL, NULL,
> @@ -272,9 +272,9 @@ static void Display(vout_display_t *vd, picture_t *pic)
>           sys->display(sys->opaque, sys->pic_opaque);
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list args)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
> -    (void) vd; (void) args;
> +    (void) vd;
>   
>       switch (query) {
>           case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
> diff --git a/modules/video_output/vulkan/display.c b/modules/video_output/vulkan/display.c
> index de9155c2833..f5a34c56656 100644
> --- a/modules/video_output/vulkan/display.c
> +++ b/modules/video_output/vulkan/display.c
> @@ -73,7 +73,7 @@ struct vout_display_sys_t
>   // Display callbacks
>   static void PictureRender(vout_display_t *, picture_t *, subpicture_t *, mtime_t);
>   static void PictureDisplay(vout_display_t *, picture_t *);
> -static int Control(vout_display_t *, int, va_list);
> +static int Control(vout_display_t *, enum vout_display_query);
>   static void Close(vout_display_t *);
>   static void UpdateParams(vout_display_t *);
>   
> @@ -334,7 +334,7 @@ static void PictureDisplay(vout_display_t *vd, picture_t *pic)
>       pl_swapchain_swap_buffers(sys->vk->swapchain);
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list ap)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
>       vout_display_sys_t *sys = vd->sys;
>   
> diff --git a/modules/video_output/wayland/shm.c b/modules/video_output/wayland/shm.c
> index 75bd2cf9c83..d6123934d65 100644
> --- a/modules/video_output/wayland/shm.c
> +++ b/modules/video_output/wayland/shm.c
> @@ -175,7 +175,7 @@ static int ResetPictures(vout_display_t *vd, video_format_t *fmt)
>       return VLC_SUCCESS;
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list ap)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
>       vout_display_sys_t *sys = vd->sys;
>   
> diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
> index ea2cbf9d823..f585d740281 100644
> --- a/modules/video_output/win32/common.c
> +++ b/modules/video_output/win32/common.c
> @@ -126,7 +126,7 @@ void CommonWindowClean(vout_display_sys_win32_t *sys)
>   }
>   #endif /* !VLC_WINSTORE_APP */
>   
> -int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_sys_win32_t *sys, int query)
> +int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_sys_win32_t *sys, enum vout_display_query query)
>   {
>       switch (query) {
>       case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
> diff --git a/modules/video_output/win32/common.h b/modules/video_output/win32/common.h
> index 4df23573c2d..1d45134351d 100644
> --- a/modules/video_output/win32/common.h
> +++ b/modules/video_output/win32/common.h
> @@ -69,7 +69,7 @@ int  CommonWindowInit(vout_display_t *, display_win32_area_t *, vout_display_sys
>                         bool projection_gestures);
>   void CommonWindowClean(vout_display_sys_win32_t *);
>   #endif /* !VLC_WINSTORE_APP */
> -int  CommonControl(vout_display_t *, display_win32_area_t *, vout_display_sys_win32_t *, int );
> +int  CommonControl(vout_display_t *, display_win32_area_t *, vout_display_sys_win32_t *, enum vout_display_query );
>   
>   void CommonPlacePicture (vout_display_t *, display_win32_area_t *);
>   
> diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
> index d127f669e7c..267423f44e8 100644
> --- a/modules/video_output/win32/direct3d11.c
> +++ b/modules/video_output/win32/direct3d11.c
> @@ -141,7 +141,7 @@ static void Direct3D11DestroyResources(vout_display_t *);
>   static void Direct3D11DeleteRegions(int, picture_t **);
>   static int Direct3D11MapSubpicture(vout_display_t *, int *, picture_t ***, subpicture_t *);
>   
> -static int Control(vout_display_t *, int, va_list);
> +static int Control(vout_display_t *, enum vout_display_query);
>   
>   
>   static int UpdateDisplayFormat(vout_display_t *vd, const video_format_t *fmt)
> @@ -414,9 +414,8 @@ static void Close(vout_display_t *vd)
>       CommonWindowClean(&vd->sys->sys);
>   #endif
>   }
> -static int Control(vout_display_t *vd, int query, va_list args)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
> -    VLC_UNUSED(args);
>       vout_display_sys_t *sys = vd->sys;
>       int res = CommonControl( vd, &sys->area, &sys->sys, query );
>   
> diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
> index b38cf3c1053..4f36dacb5f6 100644
> --- a/modules/video_output/win32/direct3d9.c
> +++ b/modules/video_output/win32/direct3d9.c
> @@ -1689,9 +1689,8 @@ static void Direct3D9Close(vout_display_t *vd)
>       Direct3D9DestroyResources(vd);
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list args)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
> -    VLC_UNUSED(args);
>       vout_display_sys_t *sys = vd->sys;
>       return CommonControl(vd, &sys->area, &sys->sys, query);
>   }
> diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
> index 3606023b013..efe5fe9bdc3 100644
> --- a/modules/video_output/win32/glwin32.c
> +++ b/modules/video_output/win32/glwin32.c
> @@ -84,9 +84,8 @@ static int SetViewpoint(vout_display_t *vd, const vlc_viewpoint_t *vp)
>       return vout_display_opengl_SetViewpoint(sys->vgl, vp);
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list args)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
> -    VLC_UNUSED(args);
>       vout_display_sys_t *sys = vd->sys;
>       return CommonControl(vd, &sys->area, &sys->sys, query);
>   }
> diff --git a/modules/video_output/win32/wingdi.c b/modules/video_output/win32/wingdi.c
> index f65cdae1226..ba774672e36 100644
> --- a/modules/video_output/win32/wingdi.c
> +++ b/modules/video_output/win32/wingdi.c
> @@ -97,9 +97,8 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
>       picture_CopyPixels(&fake_pic, picture);
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list args)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
> -    VLC_UNUSED(args);
>       vout_display_sys_t *sys = vd->sys;
>       return CommonControl(vd, &sys->area, &sys->sys, query);
>   }
> diff --git a/modules/video_output/xcb/render.c b/modules/video_output/xcb/render.c
> index efc1906ca6b..2eeacf9c033 100644
> --- a/modules/video_output/xcb/render.c
> +++ b/modules/video_output/xcb/render.c
> @@ -350,7 +350,7 @@ static void DeleteBuffers(vout_display_t *vd)
>       xcb_free_pixmap(conn, sys->drawable.crop);
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list ap)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
>       vout_display_sys_t *sys = vd->sys;
>   
> diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
> index aaa56d87686..8e65a026004 100644
> --- a/modules/video_output/xcb/x11.c
> +++ b/modules/video_output/xcb/x11.c
> @@ -141,7 +141,7 @@ static int ResetPictures(vout_display_t *vd, video_format_t *fmt)
>       return VLC_SUCCESS;
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list ap)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
>       vout_display_sys_t *sys = vd->sys;
>   
> diff --git a/modules/video_output/yuv.c b/modules/video_output/yuv.c
> index 1f7036f3c33..58212dd67cb 100644
> --- a/modules/video_output/yuv.c
> +++ b/modules/video_output/yuv.c
> @@ -75,7 +75,7 @@ vlc_module_end()
>   
>   /* */
>   static void           Display(vout_display_t *, picture_t *);
> -static int            Control(vout_display_t *, int, va_list);
> +static int            Control(vout_display_t *, enum vout_display_query);
>   
>   /*****************************************************************************
>    * vout_display_sys_t: video output descriptor
> @@ -248,9 +248,9 @@ static void Display(vout_display_t *vd, picture_t *picture)
>       fflush(sys->f);
>   }
>   
> -static int Control(vout_display_t *vd, int query, va_list args)
> +static int Control(vout_display_t *vd, enum vout_display_query query)
>   {
> -    (void) vd; (void) args;
> +    (void) vd;
>   
>       switch (query) {
>           case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
> diff --git a/src/video_output/display.c b/src/video_output/display.c
> index 59814163a88..02a74502614 100644
> --- a/src/video_output/display.c
> +++ b/src/video_output/display.c
> @@ -61,15 +61,9 @@ static picture_t *VideoBufferNew(filter_t *filter)
>       return picture_pool_Get(pool);
>   }
>   
> -static int vout_display_Control(vout_display_t *vd, int query, ...)
> +static int vout_display_Control(vout_display_t *vd, enum vout_display_query query)
>   {
> -    va_list ap;
> -    int ret;
> -
> -    va_start(ap, query);
> -    ret = vd->ops->control(vd, query, ap);
> -    va_end(ap);
> -    return ret;
> +    return vd->ops->control(vd, query);
>   }
>   
>   /*****************************************************************************
> -- 
> 2.26.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list