[vlc-devel] commit: tell jna to load libvlc with RTLD_GLOBAL option (Filippo Carone )
git version control
git at videolan.org
Sat Dec 13 15:20:14 CET 2008
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);
More information about the vlc-devel
mailing list