[vlc-devel] commit: tell jna to load libvlc with RTLD_GLOBAL option (Filippo Carone )
Alexander Bethke
abethke at oamk.fi
Mon Jan 19 15:01:48 CET 2009
Hi,
I have a question regarding that change. When building the bindings now,
I get following error from maven:
bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java:[48,23]
cannot find symbol
symbol : variable OPTION_DLOPEN_GLOBAL
location: interface com.sun.jna.Library
I couldn't either find the OPTION_DLOPEN_GLOBAL field in JNA's Library
class source (at least not in JNA version 3.0.9 that maven resolves when
running mvn install for jvlc, it seems to be in the JNA trunk though).
So how did you build jvlc with that configuration? Or how should I work
around it? Revert this change, or take a trunk version of jna?
Thanks and regards, Alex
git version control wrote:
> vlc | branch: master | Filippo Carone <littlejohn at videolan.org> | Sat Dec 13 15:13:49 2008 +0100| [08f1edc95818be242d1ad63142b5b916d8bd5916] | committer: Filippo Carone
>
> tell jna to load libvlc with RTLD_GLOBAL option
>
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=08f1edc95818be242d1ad63142b5b916d8bd5916
>>
> ---
>
> .../java/org/videolan/jvlc/internal/LibVlc.java | 13 ++++++++++++-
> 1 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java b/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java
> index 0c528eb..69f591b 100644
> --- a/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java
> +++ b/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java
> @@ -25,6 +25,9 @@
>
> package org.videolan.jvlc.internal;
>
> +import java.util.HashMap;
> +import java.util.Map;
> +
> import com.sun.jna.Callback;
> import com.sun.jna.Library;
> import com.sun.jna.Native;
> @@ -34,11 +37,19 @@ import com.sun.jna.Pointer;
> import com.sun.jna.PointerType;
> import com.sun.jna.Structure;
> import com.sun.jna.Union;
> +import com.sun.jna.win32.W32APIFunctionMapper;
> +import com.sun.jna.win32.W32APITypeMapper;
>
>
> public interface LibVlc extends Library
> {
> - LibVlc INSTANCE = (LibVlc) Native.loadLibrary(Platform.isWindows()? "libvlc" : "vlc", LibVlc.class);
> + Map options = new HashMap() {
> + {
> + put(Library.OPTION_DLOPEN_GLOBAL, Boolean.TRUE);
> + }
> + };
> +
> + LibVlc INSTANCE = (LibVlc) Native.loadLibrary(Platform.isWindows()? "libvlc" : "vlc", LibVlc.class, options);
>
> LibVlc SYNC_INSTANCE = (LibVlc) Native.synchronizedLibrary(INSTANCE);
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
>
More information about the vlc-devel
mailing list