mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
integrate jni; need to keep from crashing
This commit is contained in:
parent
c243718ed4
commit
021df9eceb
@ -51,6 +51,7 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector;
|
||||
import org.sleuthkit.autopsy.modules.pictureanalyzer.impls.HeifJNI;
|
||||
import org.sleuthkit.autopsy.python.JythonModuleLoader;
|
||||
import org.sleuthkit.autopsy.texttranslation.TextTranslationService;
|
||||
|
||||
|
@ -80,8 +80,8 @@ public class HEICProcessor implements PictureProcessor {
|
||||
public HEICProcessor() {
|
||||
HeifJNI heifJNI;
|
||||
try {
|
||||
heifJNI = new HeifJNI();
|
||||
} catch (Exception ex) {
|
||||
heifJNI = HeifJNI.getInstance();
|
||||
} catch (UnsatisfiedLinkError ex) {
|
||||
logger.log(Level.SEVERE, "libheif native dependencies not found. HEIC functionality will be automatically disabled.", ex);
|
||||
heifJNI = null;
|
||||
}
|
||||
|
@ -20,18 +20,25 @@ package org.sleuthkit.autopsy.modules.pictureanalyzer.impls;
|
||||
|
||||
/**
|
||||
*
|
||||
* Interop with libheif dll's.
|
||||
* Interop with libheif native dependencies.
|
||||
*/
|
||||
public class HeifJNI {
|
||||
|
||||
// static {
|
||||
// System.load("C:\\Users\\gregd\\Documents\\Source\\heif_convert_test\\HeifConvertTestJNI\\dist\\Release\\libx265.dll");
|
||||
// System.load("C:\\Users\\gregd\\Documents\\Source\\heif_convert_test\\HeifConvertTestJNI\\dist\\Release\\libde265.dll");
|
||||
// System.load("C:\\Users\\gregd\\Documents\\Source\\heif_convert_test\\HeifConvertTestJNI\\dist\\Release\\heif.dll");
|
||||
// System.load("C:\\Users\\gregd\\Documents\\Source\\heif_convert_test\\HeifConvertTestJNI\\dist\\Release\\jpeg62.dll");
|
||||
// System.load("C:\\Users\\gregd\\Documents\\Source\\heif_convert_test\\HeifConvertTestJNI\\dist\\Release\\heif-convert.dll");
|
||||
//
|
||||
// }
|
||||
private static HeifJNI instance = null;
|
||||
|
||||
public static HeifJNI getInstance() throws UnsatisfiedLinkError {
|
||||
if (instance == null) {
|
||||
System.loadLibrary("libx265");
|
||||
System.loadLibrary("libde265");
|
||||
System.loadLibrary("heif");
|
||||
System.loadLibrary("jpeg62");
|
||||
System.loadLibrary("heif-convert");
|
||||
instance = new HeifJNI();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private HeifJNI() {}
|
||||
|
||||
public native int convertToDisk(byte[] data, String jpgOutputPath);
|
||||
}
|
||||
|
BIN
thirdparty/libheif/Release/lib/x86_64/heif-convert.dll
vendored
Normal file
BIN
thirdparty/libheif/Release/lib/x86_64/heif-convert.dll
vendored
Normal file
Binary file not shown.
BIN
thirdparty/libheif/Release/lib/x86_64/heif.dll
vendored
Normal file
BIN
thirdparty/libheif/Release/lib/x86_64/heif.dll
vendored
Normal file
Binary file not shown.
BIN
thirdparty/libheif/Release/lib/x86_64/jpeg62.dll
vendored
Normal file
BIN
thirdparty/libheif/Release/lib/x86_64/jpeg62.dll
vendored
Normal file
Binary file not shown.
BIN
thirdparty/libheif/Release/lib/x86_64/libde265.dll
vendored
Normal file
BIN
thirdparty/libheif/Release/lib/x86_64/libde265.dll
vendored
Normal file
Binary file not shown.
BIN
thirdparty/libheif/Release/lib/x86_64/libx265.dll
vendored
Normal file
BIN
thirdparty/libheif/Release/lib/x86_64/libx265.dll
vendored
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user