[vlc-devel] [PATCH 5/7] video_output: rename internal functions

Thomas Guillem thomas at gllm.fr
Wed Oct 9 20:19:06 CEST 2019


I prefer the current naming

On Wed, Oct 9, 2019, at 17:36, Steve Lhomme wrote:
> So they are not confused with vout_XXX API
> ---
>  src/video_output/video_output.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
> index 0f32377a0c4..adbacd0633f 100644
> --- a/src/video_output/video_output.c
> +++ b/src/video_output/video_output.c
> @@ -101,7 +101,7 @@ static bool VideoFormatIsCropArEqual(video_format_t *dst,
>             dst->i_visible_height == src->i_visible_height;
>  }
>  
> -static void vout_display_SizeWindow(unsigned *restrict width,
> +static void VoutGetDisplayWindowSize(unsigned *restrict width,
>                                      unsigned *restrict height,
>                                      unsigned w, unsigned h,
>                                      unsigned sar_num, unsigned sar_den,
> @@ -147,7 +147,7 @@ static void vout_display_SizeWindow(unsigned 
> *restrict width,
>      *height = (h * cfg->zoom.num) / cfg->zoom.den;
>  }
>  
> -static void vout_SizeWindow(vout_thread_t *vout, unsigned *restrict 
> width,
> +static void VoutGetWindowSize(vout_thread_t *vout, unsigned *restrict 
> width,
>                              unsigned *restrict height)
>  {
>      vout_thread_sys_t *sys = vout->p;
> @@ -189,12 +189,12 @@ static void vout_SizeWindow(vout_thread_t *vout, 
> unsigned *restrict width,
>      }
>  
>      /* If the vout thread is running, the window lock must be held here. */
> -    vout_display_SizeWindow(width, height, w, h, sar_num, sar_den,
> +    VoutGetDisplayWindowSize(width, height, w, h, sar_num, sar_den,
>                              sys->original.orientation,
>                              &sys->display_cfg);
>  }
>  
> -static void vout_UpdateWindowSizeLocked(vout_thread_t *vout)
> +static void VoutSetWindowSizeLocked(vout_thread_t *vout)
>  {
>      vout_thread_sys_t *sys = vout->p;
>      unsigned width, height;
> @@ -206,7 +206,7 @@ static void vout_UpdateWindowSizeLocked(vout_thread_t *vout)
>      if (sys->display != NULL)
>      {
>          new_size = true;
> -        vout_SizeWindow(vout, &width, &height);
> +        VoutGetWindowSize(vout, &width, &height);
>          msg_Dbg(vout, "requested window size: %ux%u", width, height);
>      }
>      vlc_mutex_unlock(&sys->display_lock);
> @@ -403,7 +403,7 @@ void vout_ChangeWindowed(vout_thread_t *vout)
>      vlc_mutex_lock(&vout->p->window_lock);
>      vout_window_UnsetFullScreen(vout->p->display_cfg.window);
>      /* Attempt to reset the intended window size */
> -    vout_UpdateWindowSizeLocked(vout);
> +    VoutSetWindowSizeLocked(vout);
>      vlc_mutex_unlock(&vout->p->window_lock);
>  }
>  
> @@ -470,7 +470,7 @@ void vout_ChangeZoom(vout_thread_t *vout, unsigned 
> num, unsigned den)
>      sys->display_cfg.zoom.num = num;
>      sys->display_cfg.zoom.den = den;
>  
> -    vout_UpdateWindowSizeLocked(vout);
> +    VoutSetWindowSizeLocked(vout);
>  
>      vlc_mutex_lock(&sys->display_lock);
>      vlc_mutex_unlock(&sys->window_lock);
> @@ -490,7 +490,7 @@ void vout_ChangeDisplayAspectRatio(vout_thread_t *vout,
>      sys->source.dar.num = dar_num;
>      sys->source.dar.den = dar_den;
>  
> -    vout_UpdateWindowSizeLocked(vout);
> +    VoutSetWindowSizeLocked(vout);
>  
>      vlc_mutex_lock(&sys->display_lock);
>      vlc_mutex_unlock(&sys->window_lock);
> @@ -513,7 +513,7 @@ void vout_ChangeCropRatio(vout_thread_t *vout, 
> unsigned num, unsigned den)
>      } else
>          sys->source.crop.mode = VOUT_CROP_NONE;
>  
> -    vout_UpdateWindowSizeLocked(vout);
> +    VoutSetWindowSizeLocked(vout);
>  
>      vlc_mutex_lock(&sys->display_lock);
>      vlc_mutex_unlock(&sys->window_lock);
> @@ -545,7 +545,7 @@ void vout_ChangeCropWindow(vout_thread_t *vout,
>      sys->source.crop.window.width = width;
>      sys->source.crop.window.height = height;
>  
> -    vout_UpdateWindowSizeLocked(vout);
> +    VoutSetWindowSizeLocked(vout);
>  
>      vlc_mutex_lock(&sys->display_lock);
>      vlc_mutex_unlock(&sys->window_lock);
> @@ -577,7 +577,7 @@ void vout_ChangeCropBorder(vout_thread_t *vout,
>      sys->source.crop.border.top = top;
>      sys->source.crop.border.bottom = bottom;
>  
> -    vout_UpdateWindowSizeLocked(vout);
> +    VoutSetWindowSizeLocked(vout);
>  
>      vlc_mutex_lock(&sys->display_lock);
>      vlc_mutex_unlock(&sys->window_lock);
> @@ -1969,7 +1969,7 @@ int vout_Request(const vout_configuration_t *cfg, 
> input_thread_t *input)
>          };
>  
>          VoutGetDisplayCfg(vout, &original, &sys->display_cfg);
> -        vout_SizeWindow(vout, &wcfg.width, &wcfg.height);
> +        VoutGetWindowSize(vout, &wcfg.width, &wcfg.height);
>  
>          if (vout_window_Enable(sys->display_cfg.window, &wcfg)) {
>              vlc_mutex_unlock(&sys->window_lock);
> @@ -1977,7 +1977,7 @@ int vout_Request(const vout_configuration_t *cfg, 
> input_thread_t *input)
>          }
>          sys->window_enabled = true;
>      } else
> -        vout_UpdateWindowSizeLocked(vout);
> +        VoutSetWindowSizeLocked(vout);
>  
>      sys->delay = 0;
>      sys->rate = 1.f;
> -- 
> 2.17.1
> 
> _______________________________________________
> 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