[FFmpeg-devel] [PATCH 1/3] nvenc: use runtime api version to support old drivers

Timo Rothenpieler timo at rothenpieler.org
Thu Jul 16 12:36:52 EEST 2020


On 16.07.2020 04:16, Wang Bin wrote:
> 
>> What happens if a struct
>> gets updated, and ffmpeg wants to use the new fields when available,
>> like happened plenty of times?
>>
> Upgrade nvEncodeAPI.h like we've already done. Part of reserved bits will
> become a struct member and have a name. These bits will be recognized on
> new drivers but ignored on old ones.

So if someone relies on one of the new fields, be it for quality 
settings or something, it will then silently be ignored?
This needs some kind of guard for every single field, with an 
appropriate error message if a feature newer than what's supported has 
been used.

I'm really not sure if this is all worth it. It will massively blow up 
the code and make it harder and harder to maintain with every version.


More information about the ffmpeg-devel mailing list