[Clam-devel] COMMIT 11822 - Re: Faust support - plugins dynamic reloading

David García Garzón dgarcia at iua.upf.edu
Mon Aug 4 03:12:17 PDT 2008


El Monday 04 August 2008 11:15:20 Pau Arumí va escriure:
> > LAZY is needed there. It checks for a given symbol that is only present
> > on Ladspa plugins to avoid loading a dynamic lib that is not a ladspa.
>
> BTW, are we still trying to open _any_ file? We should restrict
> to .so, .dylib and .dll, and save time (and traces).
>
> Another related feature: as Hernan suggested, we should support "reload
> clam plugins" from NE.  I think Natanael can code this with the eyes
> closed :-) -- It actually could be a _general_ (clam, ladspa) reload
> option if it is easier.
>
> P

Maybe, the fist goal should be obtaining (and keeping) a list of the loaded 
plugin libraries (and maybe a list the processings they contain) so that we 
can provide a unload/reload dialog with the list.

My suggestion:
* First move all dl_ calls to the base RunTimeLibraryLoader primitives (see 
LoadLibraryError and FullyLoadLibrary) so that we can encapsulate the 
platform dependant bits.
* Add in the same class some static structure that holds the list of 
libraries.
* Add also a static state that holds the currently loading library and set it 
and unset it when appropiate.
* When registering a factory entry check that state and if set, populate the 
structure or just add some metadata.
* The factory registrator destructor should remove the processing type from 
the factory (this should be TDD) in order to allow unloading the library.

I am not sure whether this should work. But, anyway, be carefull, remember 
that we are in release!!! The plugin system cannot be broken!

David.





More information about the clam-devel mailing list