[FFmpeg-devel] [RFC] Support dynamic loading of third-party libs

Michael Niedermayer michaelni at gmx.at
Mon Jan 12 22:57:35 CET 2015

On Mon, Jan 12, 2015 at 06:59:33PM +0100, Marc Giger wrote:
> Hi,
> Attached is a preliminary patch that enables runtime loading of external
> libraries via dlopen and friends. Dynamic loading is a build time option
> (--enable-dynamic-loading) and if it is not activated the libs are
> linked as usual (still no dependency to dlopen required).
> The patch is intended as a basis for a discussion and therefore the
> following applies:
> - only libmp3lame and libva will by dynamically loaded atm

> - only tested on linux atm

tested building 32bit binaries on 64bit linux:
LD      ffmpeg_g
/usr/bin/ld: cannot find -lva
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1

> - deregistering not implemented (dlclose)
> - versioning (which version of a lib should be loaded?)
> - library usage counter missing
> - ...?

> What do you think?

I think binary based distros (and some of their users)
might like this feature as it would allow them to build packages which
have fewer hard dependencies but can still use all the libs if they
are available and installed

about the code, i think it looks ugly, too many #if too many changes
interspaced with existing code. Could this be implemeted in a
nicer way ?
I am thinking here of keeping (almost) all changes
outside of existing files


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150112/8dd6e790/attachment.asc>

More information about the ffmpeg-devel mailing list