[vlc-devel] [PATCH] demux: mock: Add orientation option

Rémi Denis-Courmont remi at remlab.net
Wed Sep 16 17:31:10 CEST 2020


Le keskiviikkona 16. syyskuuta 2020, 17.01.50 EEST Tanguy Dubroca a écrit :
> Usage: ./vlc 'mock://<mock options>;video_orientation=<orientation>'
> 
> The video_orientation option is a simplification of the values from
> video_orientation_t. The possible values are:
> 
> - normal
> - transposed / antitransposed
> - hflipped / vflipped
> - rotated_90 / rotated_180 / rotated_270
> 
> Fix #25054
> ---
>  modules/demux/mock.c | 39 ++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 38 insertions(+), 1 deletion(-)
> 
> diff --git a/modules/demux/mock.c b/modules/demux/mock.c
> index 3e40de176d..d2156132ea 100644
> --- a/modules/demux/mock.c
> +++ b/modules/demux/mock.c
> @@ -118,6 +118,10 @@ var_Read_float(const char *psz)
>      return atof(psz);
>  }
> 
> +typedef char* orientation_str_t;

Yuck, no please. A character pointer is a character point.

> +
> +#define var_Read_orientation_str_t(psz) NULL
> +
>  #define OPTIONS_AUDIO(Y) \
>      Y(audio, packetized, bool, add_bool, Bool, true) \
>      Y(audio, add_track_at, vlc_tick_t, add_integer, Integer,
> VLC_TICK_INVALID) \ @@ -136,7 +140,8 @@ var_Read_float(const char *psz)
>      Y(video, width, unsigned, add_integer, Unsigned, 640) \
>      Y(video, height, unsigned, add_integer, Unsigned, 480) \
>      Y(video, frame_rate, unsigned, add_integer, Unsigned, 25) \
> -    Y(video, frame_rate_base, unsigned, add_integer, Unsigned, 1)
> +    Y(video, frame_rate_base, unsigned, add_integer, Unsigned, 1) \
> +    Y(video, orientation, orientation_str_t, add_string, String, NULL)
> 
>  #define OPTIONS_SUB(Y) \
>      Y(sub, packetized, bool, add_bool, Bool, true)\

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list