Skip to content

Commit 038d80f

Browse files
committed
Teach JNA to look for custom library paths
This is twall's jna git, commit a82a6ca (post release 4.1.0), with my path ("Get additional library paths from ldconfig on Linux"), commit f0ea52c, on top. Upstream PR: java-native-access/jna#478
1 parent cd0d8b1 commit 038d80f

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

library/jna.jar

182 KB
Binary file not shown.

src/processing/video/Video.java

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,11 @@ static protected void removePlugins() {
155155

156156

157157
static protected void buildLinuxPaths() {
158-
// looking pretty dire, make sure at least LD_LIBRARY_PATH is set
159-
// see https://github.com/twall/jna/issues/477
160-
String ldPath = System.getenv("LD_LIBRARY_PATH");
161-
if (ldPath == null || ldPath.length() == 0) {
162-
System.out.println("Your system's LD_LIBRARY_PATH environment variable " +
163-
"is not set, limiting the search for the video libraries to /usr/lib " +
164-
"and /lib.");
165-
// temporary hack for testing on Raspbian
166-
if (System.getProperty("os.arch").equals("arm")) {
167-
gstreamerLibPath = "/opt/vc/lib:/usr/local/lib:/lib/arm-linux-gnueabihf:/usr/lib/arm-linux-gnueabihf";
168-
}
169-
} else {
170-
gstreamerLibPath = ldPath;
171-
}
158+
// the version of the JNA library bundled automatically tries
159+
// all library paths known to the host system's ldconfig
160+
// so we'd even catch locations like /usr/local/lib etc
161+
// PL for upstream: https://github.com/twall/jna/pull/478
162+
gstreamerLibPath = "";
172163
gstreamerPluginPath = "";
173164
}
174165

0 commit comments

Comments
 (0)