This mail is about a project I have to make FFmpeg's API and infrastructure more convenient. For a common introduction, see this thread: https://ffmpeg.org/pipermail/ffmpeg-devel/2020-December/274167.html
Global mutable state has annoyed developers for a long time. Log callbacks and flags, malloc limits, etc., can only be set once. If an application and a library it depends on both use FFmpeg, the settings will conflict. Recently, the lists of registered codecs, formats, protocols, etc., have been made const, but that cost us the ability to control which components were registered. I want to move all into a structure, maybe AVLibrary (or, more precisely, several structures, one per library, pointing to each-other). Contexts will have a pointer to it, making the access transparent in most cases. Existing applications will continue to work by using a global instance of AVLibrary, but new applications can allocate and their instance explicitly. The benefits I want from this: - Bring back the ability to register only a few codecs / formats / protocols. This is much more robust than a whitelist, because the whitelist must be checked each time, while a component that is not registered cannot be used at all. - Allow applications that want to use different memory allocation functions to register their own. Regards, -- Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".