forked from mirrors/linphone-iphone
Added AndroidContext param to createlinphonecore (needed for opensles sound module for android) + updated ms2
This commit is contained in:
parent
a4ad87bcba
commit
8bf0387c35
8 changed files with 18 additions and 14 deletions
|
|
@ -105,7 +105,7 @@ LOCAL_C_INCLUDES += \
|
|||
$(LOCAL_PATH)/../../externals/libxml2/include \
|
||||
$(LOCAL_PATH)/../../externals/build/libxml2
|
||||
|
||||
LOCAL_LDLIBS += -llog -ldl
|
||||
LOCAL_LDLIBS += -llog -lOpenSLES -ldl
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
cpufeatures \
|
||||
|
|
|
|||
|
|
@ -20,24 +20,24 @@ package org.linphone.core.tutorials;
|
|||
|
||||
import org.linphone.core.LinphoneAddress;
|
||||
import org.linphone.core.LinphoneCall;
|
||||
import org.linphone.core.LinphoneCall.State;
|
||||
import org.linphone.core.LinphoneCallStats;
|
||||
import org.linphone.core.LinphoneChatMessage;
|
||||
import org.linphone.core.LinphoneChatRoom;
|
||||
import org.linphone.core.LinphoneContent;
|
||||
import org.linphone.core.LinphoneCore;
|
||||
import org.linphone.core.LinphoneCore.EcCalibratorStatus;
|
||||
import org.linphone.core.LinphoneCore.GlobalState;
|
||||
import org.linphone.core.LinphoneCore.RegistrationState;
|
||||
import org.linphone.core.LinphoneCoreException;
|
||||
import org.linphone.core.LinphoneCoreFactory;
|
||||
import org.linphone.core.LinphoneCoreListener;
|
||||
import org.linphone.core.LinphoneEvent;
|
||||
import org.linphone.core.LinphoneFriend;
|
||||
import org.linphone.core.LinphoneFriend.SubscribePolicy;
|
||||
import org.linphone.core.LinphoneInfoMessage;
|
||||
import org.linphone.core.LinphoneProxyConfig;
|
||||
import org.linphone.core.OnlineStatus;
|
||||
import org.linphone.core.LinphoneCall.State;
|
||||
import org.linphone.core.LinphoneCore.GlobalState;
|
||||
import org.linphone.core.LinphoneCore.RegistrationState;
|
||||
import org.linphone.core.LinphoneFriend.SubscribePolicy;
|
||||
import org.linphone.core.PublishState;
|
||||
import org.linphone.core.SubscriptionState;
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ public class TutorialBuddyStatus implements LinphoneCoreListener {
|
|||
|
||||
// First instantiate the core Linphone object given only a listener.
|
||||
// The listener will react to events in Linphone core.
|
||||
LinphoneCore lc = lcFactory.createLinphoneCore(this);
|
||||
LinphoneCore lc = lcFactory.createLinphoneCore(this, null);
|
||||
|
||||
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ public class TutorialChatRoom implements LinphoneCoreListener, LinphoneChatMessa
|
|||
|
||||
// First instantiate the core Linphone object given only a listener.
|
||||
// The listener will react to events in Linphone core.
|
||||
LinphoneCore lc = LinphoneCoreFactory.instance().createLinphoneCore(this);
|
||||
LinphoneCore lc = LinphoneCoreFactory.instance().createLinphoneCore(this, null);
|
||||
|
||||
try {
|
||||
// Next step is to create a chat room
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class TutorialHelloWorld implements LinphoneCoreListener {
|
|||
|
||||
// First instantiate the core Linphone object given only a listener.
|
||||
// The listener will react to events in Linphone core.
|
||||
LinphoneCore lc = LinphoneCoreFactory.instance().createLinphoneCore(this);
|
||||
LinphoneCore lc = LinphoneCoreFactory.instance().createLinphoneCore(this, null);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ public class TutorialRegistration implements LinphoneCoreListener {
|
|||
|
||||
// First instantiate the core Linphone object given only a listener.
|
||||
// The listener will react to events in Linphone core.
|
||||
LinphoneCore lc = lcFactory.createLinphoneCore(this);
|
||||
LinphoneCore lc = lcFactory.createLinphoneCore(this, null);
|
||||
|
||||
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ package org.linphone.core;
|
|||
|
||||
|
||||
|
||||
|
||||
abstract public class LinphoneCoreFactory {
|
||||
|
||||
private static String factoryName = "org.linphone.core.LinphoneCoreFactoryImpl";
|
||||
|
|
@ -65,8 +66,8 @@ abstract public class LinphoneCoreFactory {
|
|||
* */
|
||||
abstract public LinphoneAuthInfo createAuthInfo(String username, String userid, String passwd, String ha1, String realm, String domain);
|
||||
|
||||
abstract public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, String userConfig,String factoryConfig,Object userdata) throws LinphoneCoreException;
|
||||
abstract public LinphoneCore createLinphoneCore(LinphoneCoreListener listener) throws LinphoneCoreException;
|
||||
abstract public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, String userConfig,String factoryConfig,Object userdata, Object context) throws LinphoneCoreException;
|
||||
abstract public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, Object context) throws LinphoneCoreException;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ package org.linphone.core;
|
|||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.linphone.mediastream.MediastreamerAndroidContext;
|
||||
import org.linphone.mediastream.Version;
|
||||
|
||||
import android.util.Log;
|
||||
|
|
@ -94,9 +95,10 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
|
|||
|
||||
@Override
|
||||
public LinphoneCore createLinphoneCore(LinphoneCoreListener listener,
|
||||
String userConfig, String factoryConfig, Object userdata)
|
||||
String userConfig, String factoryConfig, Object userdata, Object context)
|
||||
throws LinphoneCoreException {
|
||||
try {
|
||||
MediastreamerAndroidContext.setContext(context);
|
||||
File user = userConfig == null ? null : new File(userConfig);
|
||||
File factory = factoryConfig == null ? null : new File(factoryConfig);
|
||||
return new LinphoneCoreImpl(listener, user, factory, userdata);
|
||||
|
|
@ -106,8 +108,9 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public LinphoneCore createLinphoneCore(LinphoneCoreListener listener) throws LinphoneCoreException {
|
||||
public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, Object context) throws LinphoneCoreException {
|
||||
try {
|
||||
MediastreamerAndroidContext.setContext(context);
|
||||
return new LinphoneCoreImpl(listener);
|
||||
} catch (IOException e) {
|
||||
throw new LinphoneCoreException("Cannot create LinphoneCore",e);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 184cca52e9816d02b1a3e94619e71547458481e8
|
||||
Subproject commit 1283fad5a14aaa14343206d96ba4133694349b3e
|
||||
Loading…
Add table
Reference in a new issue