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

Alexandre Janniaux ajanni at videolabs.io
Thu Sep 17 20:33:36 CEST 2020


So would you suggest to add error handling to all var_Read_
variant and then add the patch returning a video_orient_t
or can it be done afterwards anyway?

Regards,
--
Alexandre Janniaux
Videolabs

On Wed, Sep 16, 2020 at 06:31:10PM +0300, Rémi Denis-Courmont wrote:
> 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/
>
>
>
> _______________________________________________
> 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