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

Francois Cartegnie fcvlcdev at free.fr
Mon Jun 15 17:36:59 CEST 2020


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 :/

-- 
Francois Cartegnie
VideoLAN - VLC Developer


More information about the vlc-devel mailing list