Commit 08f1edc9 authored by Filippo Carone's avatar Filippo Carone

tell jna to load libvlc with RTLD_GLOBAL option

parent 541ab326
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
package org.videolan.jvlc.internal; package org.videolan.jvlc.internal;
import java.util.HashMap;
import java.util.Map;
import com.sun.jna.Callback; import com.sun.jna.Callback;
import com.sun.jna.Library; import com.sun.jna.Library;
import com.sun.jna.Native; import com.sun.jna.Native;
...@@ -34,11 +37,19 @@ import com.sun.jna.Pointer; ...@@ -34,11 +37,19 @@ import com.sun.jna.Pointer;
import com.sun.jna.PointerType; import com.sun.jna.PointerType;
import com.sun.jna.Structure; import com.sun.jna.Structure;
import com.sun.jna.Union; import com.sun.jna.Union;
import com.sun.jna.win32.W32APIFunctionMapper;
import com.sun.jna.win32.W32APITypeMapper;
public interface LibVlc extends Library 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); LibVlc SYNC_INSTANCE = (LibVlc) Native.synchronizedLibrary(INSTANCE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment