mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-04 06:56:27 +00:00
Fix loading native libraries on OS X
This commit is contained in:
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.
@@ -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) {
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user