[vlc-devel] [PATCH 1/2] api: allow to change A/R on the fly.

Jean-Baptiste Kempf jb at videolan.org
Sun Dec 29 10:10:36 CET 2013


LGTM.

On 28 Dec, Francois Cartegnie wrote :
> ASF allows specifying a new aspect ratio while playing back.
> Triggering change using the "aspect-ratio" variable can't work
> for unknown A/R as the variable is "Checked" type.
> ---
>  include/vlc_vout.h              | 3 +++
>  src/libvlccore.sym              | 1 +
>  src/video_output/video_output.c | 6 ++++++
>  3 files changed, 10 insertions(+)
> 
> diff --git a/include/vlc_vout.h b/include/vlc_vout.h
> index 2d6c180..b39e49b 100644
> --- a/include/vlc_vout.h
> +++ b/include/vlc_vout.h
> @@ -145,6 +145,9 @@ VLC_API int vout_GetSnapshot( vout_thread_t *p_vout,
>                                video_format_t *p_fmt,
>                                const char *psz_format, mtime_t i_timeout );
>  
> +VLC_API void vout_ChangeAspectRatio( vout_thread_t *p_vout,
> +                                     unsigned int i_num, unsigned int i_den );
> +
>  /* */
>  VLC_API picture_t * vout_GetPicture( vout_thread_t * );
>  VLC_API void vout_PutPicture( vout_thread_t *, picture_t * );
> diff --git a/src/libvlccore.sym b/src/libvlccore.sym
> index 5efc67e..d0025c6 100644
> --- a/src/libvlccore.sym
> +++ b/src/libvlccore.sym
> @@ -591,6 +591,7 @@ vlm_MessageDelete
>  vlm_MessageNew
>  vlm_MessageSimpleNew
>  vlm_New
> +vout_ChangeAspectRatio
>  vout_Close
>  vout_GetPicture
>  vout_PutPicture
> diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
> index f9e52cd..6739d4c 100644
> --- a/src/video_output/video_output.c
> +++ b/src/video_output/video_output.c
> @@ -487,6 +487,12 @@ int vout_GetSnapshot(vout_thread_t *vout,
>      return VLC_SUCCESS;
>  }
>  
> +void vout_ChangeAspectRatio( vout_thread_t *p_vout,
> +                             unsigned int i_num, unsigned int i_den )
> +{
> +    vout_ControlChangeSampleAspectRatio( p_vout, i_num, i_den );
> +}
> +
>  /* vout_Control* are usable by anyone at anytime */
>  void vout_ControlChangeFullscreen(vout_thread_t *vout, bool fullscreen)
>  {
> -- 
> 1.8.3.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list