[vlc-devel] reenabling java bindings

Filippo Carone filippo at carone.org
Fri Dec 12 17:07:12 CET 2008

Olivier Aubert ha scritto:
> libvlc does not dlopen(libvlccore) explicitly. libtool does its job, and
> libvlc is simply compiled against -lvlccore, which the loader resolves
> at runtime.
> With your approach, all other mentionned systems (java bindings, python
> bindings, mozilla plugin) should have to explicitly load libvlcore with
> something like
> if (!dlopen ("libvlccore.so", RTLD_NOW | RTLD_GLOBAL))
>   printf ("\n%s\n", dlerror());
> (with an additional #define to use .dll instead of .so for windows, etc).
> so that libvlccore symbols are available for subsequently loaded vlc modules.

IMO, the need of a direct dlopen on libvlccore spoils the essence of 
libvlc as the only library an external system should know of. That would 
be needed only non windows platform, since on windows plugins are linked 
against libvlccore.

> It is not undoable, but looks hackish to me: since plugins use symbols
> from libvlccore, we should simply link them with libvlccore, not rely on
> user code to do that.

I agree. Furthermore on Java, the System.loadLibrary does not use 
RTLD_GLOBAL (and there's no mean to enforce that flag), so as a 
workaround I should create a dummy native library to explicitly dlopen 
libvlccore. I'm taking a look if jna helps in this way...


More information about the vlc-devel mailing list