diff --git a/src/processing/video/Video.java b/src/processing/video/Video.java index 1eaa0e0..02b1345 100644 --- a/src/processing/video/Video.java +++ b/src/processing/video/Video.java @@ -114,6 +114,8 @@ static protected void initImpl() { if (!gstreamerLibPath.equals("")) { System.setProperty("jna.library.path", gstreamerLibPath); } + // outputs the paths JNA is trying + //System.setProperty("jna.debug_load", "true"); if (PApplet.platform == WINDOWS) { LibraryLoader loader = LibraryLoader.getInstance(); @@ -153,7 +155,16 @@ static protected void removePlugins() { static protected void buildLinuxPaths() { - gstreamerLibPath = ""; + // looking pretty dire, make sure at least LD_LIBRARY_PATH is set + // see https://github.com/twall/jna/issues/477 + String ldPath = System.getenv("LD_LIBRARY_PATH"); + if (ldPath == null || ldPath.length() == 0) { + System.out.println("Your system's LD_LIBRARY_PATH environment variable " + + "is not set, limiting the search for the video libraries to /usr/lib " + + "and /lib."); + } else { + gstreamerLibPath = ldPath; + } gstreamerPluginPath = ""; }