mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 05:38:14 +00:00
Fix some case in LinphoneCoreFactoryImpl
This commit is contained in:
parent
00f620c58a
commit
700b06dda0
1 changed files with 8 additions and 6 deletions
|
|
@ -111,10 +111,10 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
|
|||
|
||||
OpenH264DownloadHelper downloadHelper = new OpenH264DownloadHelper(context);
|
||||
if (downloadHelper.isCodecFound()) {
|
||||
org.linphone.mediastream.Log.i("LinphoneCoreFactoryImpl"," Loading OpenH264 plugin:" + downloadHelper.getFullPathLib());
|
||||
Log.i("LinphoneCoreFactoryImpl"," Loading OpenH264 plugin:" + downloadHelper.getFullPathLib());
|
||||
System.load(downloadHelper.getFullPathLib());
|
||||
} else {
|
||||
org.linphone.mediastream.Log.i("LinphoneCoreFactoryImpl"," Cannot load OpenH264 plugin");
|
||||
Log.i("LinphoneCoreFactoryImpl"," Cannot load OpenH264 plugin");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -126,13 +126,14 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
|
|||
throws LinphoneCoreException {
|
||||
try {
|
||||
fcontext = (Context)context;
|
||||
boolean openh264Enabled = loadOpenH264(fcontext);
|
||||
boolean openh264Enabled = false;
|
||||
if (context != null) openh264Enabled = loadOpenH264(fcontext);
|
||||
MediastreamerAndroidContext.setContext(context);
|
||||
File user = userConfig == null ? null : new File(userConfig);
|
||||
File factory = factoryConfig == null ? null : new File(factoryConfig);
|
||||
LinphoneCore lc = new LinphoneCoreImpl(listener, user, factory, userdata);
|
||||
lc.enableOpenH264(openh264Enabled);
|
||||
if(context!=null) lc.setContext(context);
|
||||
if (context != null) lc.setContext(context);
|
||||
return lc;
|
||||
} catch (IOException e) {
|
||||
throw new LinphoneCoreException("Cannot create LinphoneCore",e);
|
||||
|
|
@ -143,11 +144,12 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
|
|||
public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, Object context) throws LinphoneCoreException {
|
||||
try {
|
||||
fcontext = (Context)context;
|
||||
boolean openh264Enabled = loadOpenH264(fcontext);
|
||||
boolean openh264Enabled = false;
|
||||
if (context != null) openh264Enabled = loadOpenH264(fcontext);
|
||||
MediastreamerAndroidContext.setContext(context);
|
||||
LinphoneCore lc = new LinphoneCoreImpl(listener);
|
||||
lc.enableOpenH264(openh264Enabled);
|
||||
if(context!=null) lc.setContext(context);
|
||||
if (context != null) lc.setContext(context);
|
||||
return lc;
|
||||
} catch (IOException e) {
|
||||
throw new LinphoneCoreException("Cannot create LinphoneCore",e);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue