Fix loading native libraries on OS X

This commit is contained in:
Cameron Gutman
2014-01-01 19:29:51 -05:00
parent 1fbdc9a622
commit 51d112306f
11 changed files with 18 additions and 20 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -15,26 +15,23 @@ public class LibraryHelper {
private static boolean librariesExtracted = false;
static {
// Windows and OS X need this, but we might as well do it for everybody
needsDependencyExtraction = true;
needsDependencyExtraction = System.getProperty("os.name").contains("Windows");
libraryExtractionFolder = System.getProperty("java.io.tmpdir", ".");
// FFMPEG libraries
avcDependencies.add("avutil-52");
avcDependencies.add("swresample-0");
avcDependencies.add("swscale-2");
avcDependencies.add("avcodec-55");
avcDependencies.add("avformat-55");
avcDependencies.add("avfilter-3");
// The AVC JNI library itself
avcDependencies.add("nv_avc_dec");
// Additional Windows dependencies
// AVC dependencies
if (System.getProperty("os.name").contains("Windows")) {
avcDependencies.add("avutil-52");
avcDependencies.add("swresample-0");
avcDependencies.add("swscale-2");
avcDependencies.add("avcodec-55");
avcDependencies.add("avformat-55");
avcDependencies.add("avfilter-3");
avcDependencies.add("postproc-52");
avcDependencies.add("pthreadVC2");
}
// The AVC JNI library itself
avcDependencies.add("nv_avc_dec");
}
public static void loadNativeLibrary(String libraryName) {

View File

@@ -4,16 +4,17 @@ import com.limelight.binding.LibraryHelper;
public class AvcDecoder {
static {
LibraryHelper.loadNativeLibrary("avutil-52");
// Windows uses runtime linking for ffmpeg libraries
if (System.getProperty("os.name").contains("Windows")) {
LibraryHelper.loadNativeLibrary("avutil-52");
LibraryHelper.loadNativeLibrary("postproc-52");
LibraryHelper.loadNativeLibrary("pthreadVC2");
LibraryHelper.loadNativeLibrary("swresample-0");
LibraryHelper.loadNativeLibrary("swscale-2");
LibraryHelper.loadNativeLibrary("avcodec-55");
LibraryHelper.loadNativeLibrary("avformat-55");
LibraryHelper.loadNativeLibrary("avfilter-3");
}
LibraryHelper.loadNativeLibrary("swresample-0");
LibraryHelper.loadNativeLibrary("swscale-2");
LibraryHelper.loadNativeLibrary("avcodec-55");
LibraryHelper.loadNativeLibrary("avformat-55");
LibraryHelper.loadNativeLibrary("avfilter-3");
LibraryHelper.loadNativeLibrary("nv_avc_dec");
}