mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
Improvements on OpenH264 Java helper
This commit is contained in:
parent
367243d224
commit
a7adfbdaf5
2 changed files with 13 additions and 19 deletions
|
|
@ -63,6 +63,19 @@ public class OpenH264DownloadHelper {
|
|||
if (context.getFilesDir() != null) {
|
||||
fileDirection = context.getFilesDir().toString();
|
||||
}
|
||||
|
||||
File file = new File(context.getApplicationInfo().nativeLibraryDir+"/libmsopenh264.so");
|
||||
if (!file.exists()) {
|
||||
Log.i("LinphoneCoreFactoryImpl"," libmsopenh264 not found, we disable the download of Openh264");
|
||||
isDownloadEnabled = false;
|
||||
}
|
||||
if (isCodecFound()) {
|
||||
Log.i("OpenH264DownloadHelper"," Loading OpenH264 downloaded plugin:" + downloadHelper.getFullPathLib());
|
||||
System.load(downloadHelper.getFullPathLib());
|
||||
} else {
|
||||
Log.i("OpenH264DownloadHelper"," Cannot load OpenH264 downloaded plugin");
|
||||
}
|
||||
isDownloadEnabled = true;
|
||||
}
|
||||
|
||||
public static boolean isOpenH264DownloadEnabled() {
|
||||
|
|
@ -73,24 +86,6 @@ public class OpenH264DownloadHelper {
|
|||
isDownloadEnabled = enabled;
|
||||
}
|
||||
|
||||
public static boolean checkIfOpenH264DownloadCanBeEnabled(Context context) {
|
||||
File file = new File(context.getApplicationInfo().nativeLibraryDir+"/libmsopenh264.so");
|
||||
|
||||
if (!file.exists()) {
|
||||
Log.i("LinphoneCoreFactoryImpl"," libmsopenh264 not found, we disable the download of Openh264");
|
||||
return false;
|
||||
}
|
||||
|
||||
OpenH264DownloadHelper downloadHelper = new OpenH264DownloadHelper(context);
|
||||
if (downloadHelper.isCodecFound()) {
|
||||
Log.i("OpenH264DownloadHelper"," Loading OpenH264 downloaded plugin:" + downloadHelper.getFullPathLib());
|
||||
System.load(downloadHelper.getFullPathLib());
|
||||
} else {
|
||||
Log.i("OpenH264DownloadHelper"," Cannot load OpenH264 downloaded plugin");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set OpenH264DownloadHelperListener
|
||||
* @param h264Listener
|
||||
|
|
|
|||
|
|
@ -234,7 +234,6 @@ eval "$SED_START 's/enableDownloadOpenH264(/OpenH264DownloadHelper.enableDownloa
|
|||
#Factory.instance().setLogCollectionPath(getFilesDir().getAbsolutePath());
|
||||
#Factory.instance().enableLogCollection(isDebugEnabled);
|
||||
#Factory.instance().setDebugMode(isDebugEnabled, getString(R.string.app_name));
|
||||
#Factory.instance().createConfig(String s);
|
||||
#AccountCreator.updatePassword
|
||||
|
||||
#Android specifics not wrapped automatically
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue