[vlc-devel] [PATCH 1/7] demux: mock: assign variables per track and create all tracks

Rémi Denis-Courmont remi at remlab.net
Mon Jun 15 17:56:45 CEST 2020


Le maanantaina 15. kesäkuuta 2020, 18.36.59 EEST Francois Cartegnie a écrit :
> Le 09/06/2020 à 17:26, Rémi Denis-Courmont a écrit :
> >> +#define LIST_OPTIONS_AUDIO \
> >> +    Y(audio, channels, unsigned, add_integer, var_InheritUnsigned, 2) \
> >> +    Y(audio, format, vlc_fourcc_t, add_string, var_InheritFourcc, "u8")
> >> \
> >> +    Y(audio, rate, unsigned, add_integer, var_InheritUnsigned, 44100) \
> >> +    Y(audio, packetized, bool, add_bool, var_InheritBool, true) \
> >> +    Y(audio, sample_length, vlc_tick_t, add_integer, var_InheritInteger,
> > 
> > I think it's more natural/readable to define LIST_OPTIONS_AUDIO(Y) and
> > then
> > pass Y as a parameter, than rely on recursive evaluation for the same
> > result.
> I don't see how that can be achevied without passing all arguments, or
> applying macro to every entry :/

#define LIST_OPTIONS_AUDIO(Y)

Also could skip the 'var_Inherit' part with ## .

-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/





More information about the vlc-devel mailing list