Open soarqin opened 1 week ago
While CoreAudio is provided by iTunes on Windows and so we can try to load the library at runtime since the CoreAudio is "easily" installable.
This is not the case for FDK AAC.
For linux user: libfdk-aac is easy for linux user to install(especially from aur or emerge), so embed this plugin in flatpak release is good for those linux users who don't wanna compile obs from source or already have libfdk-aac installed for other purpose(for example: build with ffmpeg). For windows user: libfdk-aac is much easier to build (you can build dlls from mingw-w64 toolchains just like w64devkit or somewhat other, without Visual Studio/WinSDK installation) than libfdk-aac + obs-libfdk(from obs source code directory)
On the Linux side, the distribution (or the repo) is technically the entity to deal with patents issues. Some even use a fork of FDK stripped from patent issues.
FDK AAC is rarely an issue on the Linux side to require loading the library at runtime.
For windows user: libfdk-aac is much easier to build (you can build dlls from mingw-w64 toolchains just like w64devkit or somewhat other, without Visual Studio/WinSDK installation) than libfdk-aac + obs-libfdk(from obs source code directory)
This can not be called easy from a user perspective. At this point the user can just build themself obs-studio with fdk-aac.
This can not be called easy from a user perspective. At this point the user can just build themself obs-studio with fdk-aac.
I'd think this is for sure EASY if we provide a build instruction for users: they might take much less time to get a usable dll for obs-libfdk use than building the obs-libfdk from source code.
Description
Try to load libfdk-aac from shared library dynamically.
Motivation and Context
This plugin can be embedded to release package by default after using the dynamic loading method, just like
CoreAudio Encoder
plugin.How Has This Been Tested?
Tested on windows and linux, with libfdk-aac shared library put under default installation directory, obs exe directory(windows only), and plugin directory, all working fine.
Types of changes
Changes static linking of libfdk-aac to a dynamlic loading method, with some needed defines/enums/structs added in a wrapper header.
Checklist: