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

2015-01-18 Thread Stephen Hutchinson
On Fri, Jan 16, 2015 at 8:40 AM, Derek Buitenhuis wrote: > On 1/16/2015 12:47 AM, Stephen Hutchinson wrote: >> There have been times I've run into issues >> because a shared library FFmpeg was linked against somehow >> got removed or was updated and broke compatibility. > > [...] > Usually, that

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

2015-01-16 Thread Reimar Döffinger
On Wed, Jan 14, 2015 at 06:26:06PM +0100, Michael Niedermayer wrote: > ive no idea how portable it is but one way to avoid most of the > mess would be to use attribute weak / lazy linking > that way as long as lib functions arent called nothing should try to > load the lib and so it should work wit

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

2015-01-16 Thread Derek Buitenhuis
On 1/16/2015 12:47 AM, Stephen Hutchinson wrote: > There have been times I've run into issues > because a shared library FFmpeg was linked against somehow > got removed or was updated and broke compatibility. [...] > Dynamic loading allows the main binary to still function > correctly if this occ

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

2015-01-15 Thread Stephen Hutchinson
On Thu, Jan 15, 2015 at 12:37 PM, Marc Giger wrote: > That's a very good point. Never thought about it in this detail. > Given that fact I have to admin that dynamic loading makes > less sense. There may still be some usecases e.g. vaapi where it > would make sense, but this seems to be the minori

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

2015-01-15 Thread wm4
On Thu, 15 Jan 2015 18:37:57 +0100 Marc Giger wrote: > Hi Nicolas, > > On Wed, 14 Jan 2015 21:33:25 +0100 > Nicolas George wrote: > > > Le quintidi 25 nivôse, an CCXXIII, Marc Giger a écrit : > > > For example if they want use libfaac then > > > they should be able to do s

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

2015-01-15 Thread Marc Giger
Hi Nicolas, On Wed, 14 Jan 2015 21:33:25 +0100 Nicolas George wrote: > Le quintidi 25 nivôse, an CCXXIII, Marc Giger a écrit : > >For example if they want use libfaac then > > they should be able to do so without that much hassle a full > > compilation inclusive all depen

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

2015-01-14 Thread Nicolas George
Le quintidi 25 nivôse, an CCXXIII, Marc Giger a écrit : > For example if they want use libfaac then > they should be able to do so without that much hassle a full compilation > inclusive all dependencies can be. I was expecting something like that. Unfortunately, it does n

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

2015-01-14 Thread Marc Giger
Hi, On Wed, 14 Jan 2015 10:49:23 +0100 wm4 wrote: > On Tue, 13 Jan 2015 19:45:01 +0100 > Marc Giger wrote: > > > Hi, > > > > On Tue, 13 Jan 2015 14:54:33 +0100 > > wm4 wrote: > > > > > On Mon, 12 Jan 2015 18:59:33 +0100 > > > Marc Giger wrote: > > > > > > > Hi, > > > > > > > > Attached i

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

2015-01-14 Thread Michael Niedermayer
On Wed, Jan 14, 2015 at 10:49:23AM +0100, wm4 wrote: > On Tue, 13 Jan 2015 19:45:01 +0100 > Marc Giger wrote: > > > Hi, > > > > On Tue, 13 Jan 2015 14:54:33 +0100 > > wm4 wrote: > > > > > On Mon, 12 Jan 2015 18:59:33 +0100 > > > Marc Giger wrote: > > > > > > > Hi, > > > > > > > > Attached i

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

2015-01-14 Thread wm4
On Tue, 13 Jan 2015 19:45:01 +0100 Marc Giger wrote: > Hi, > > On Tue, 13 Jan 2015 14:54:33 +0100 > wm4 wrote: > > > On Mon, 12 Jan 2015 18:59:33 +0100 > > Marc Giger wrote: > > > > > Hi, > > > > > > Attached is a preliminary patch that enables runtime loading of > > > external libraries vi

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

2015-01-13 Thread Marc Giger
Hi, On Tue, 13 Jan 2015 14:54:33 +0100 wm4 wrote: > On Mon, 12 Jan 2015 18:59:33 +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-dyna

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

2015-01-13 Thread Marc Giger
Hi Stephen, On Tue, 13 Jan 2015 08:26:10 -0500 Stephen Hutchinson wrote: > On general principle, the idea would be nice. I'll leave broader > critiques on the code to others, but I do have one thing to say: > > >diff --git a/libavcodec/utils.c b/libavcodec/utils.c > >index 1ec5cae..2520e69 100

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

2015-01-13 Thread Marc Giger
Hi Michael, On Mon, 12 Jan 2015 22:57:35 +0100 Michael Niedermayer wrote: > 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

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

2015-01-13 Thread Lukasz Marek
On 13 January 2015 at 14:54, wm4 wrote: > On Mon, 12 Jan 2015 18:59:33 +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)

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

2015-01-13 Thread wm4
On Mon, 12 Jan 2015 18:59:33 +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 usua

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

2015-01-13 Thread Stephen Hutchinson
On general principle, the idea would be nice. I'll leave broader critiques on the code to others, but I do have one thing to say: >diff --git a/libavcodec/utils.c b/libavcodec/utils.c >index 1ec5cae..2520e69 100644 >--- a/libavcodec/utils.c >+++ b/libavcodec/utils.c >@@ -69,6 +69,25 @@ > #include

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

2015-01-12 Thread Michael Niedermayer
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

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

2015-01-12 Thread Marc Giger
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