Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

obs-libfdk: Load libfdk-aac from shared library dynamically. #11490

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

soarqin
Copy link

@soarqin soarqin commented Nov 5, 2024

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:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation. (No doc is related to this plugin actually)

This plugin can be embedded to release package by default now.
@soarqin soarqin changed the title Load libfdk-aac from shared library dynamically so that this plugin c… Load libfdk-aac from shared library dynamically. Nov 5, 2024
@soarqin soarqin changed the title Load libfdk-aac from shared library dynamically. obs-libfdk: Load libfdk-aac from shared library dynamically. Nov 5, 2024
@WizardCM WizardCM added the Enhancement Improvement to existing functionality label Nov 5, 2024
@tytan652
Copy link
Collaborator

tytan652 commented Nov 5, 2024

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.

@soarqin
Copy link
Author

soarqin commented Nov 5, 2024

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)

@tytan652
Copy link
Collaborator

tytan652 commented Nov 5, 2024

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.

@soarqin
Copy link
Author

soarqin commented Nov 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants