Commit 93692020 authored by jehan's avatar jehan
Browse files

add ilbc for android + add keep alive parameter for sal

parent 9a7053e4
......@@ -78,7 +78,7 @@ LOCAL_STATIC_LIBRARIES := \
libeXosip2 \
libosip2 \
libgsm
# libmsilbc \
LOCAL_MODULE_CLASS = SHARED_LIBRARIES
include $(BUILD_SHARED_LIBRARY)
......
......@@ -688,6 +688,8 @@ static void sip_config_read(LinphoneCore *lc)
lp_config_get_int(lc->config,"sip","register_only_when_network_is_up",1);
lc->sip_conf.ping_with_options=lp_config_get_int(lc->config,"sip","ping_with_options",1);
lc->sip_conf.auto_net_state_mon=lp_config_get_int(lc->config,"sip","auto_net_state_mon",1);
lc->sip_conf.keepalive_period=lp_config_get_int(lc->config,"sip","keepalive_period",10000);
sal_set_keepalive_period(lc->sal,lc->sip_conf.keepalive_period);
}
static void rtp_config_read(LinphoneCore *lc)
......@@ -3385,6 +3387,7 @@ void sip_config_uninit(LinphoneCore *lc)
lp_config_set_int(lc->config,"sip","use_ipv6",config->ipv6_enabled);
lp_config_set_int(lc->config,"sip","register_only_when_network_is_up",config->register_only_when_network_is_up);
lp_config_set_int(lc->config,"sip","default_proxy",linphone_core_get_default_proxy(lc,NULL));
for(elem=config->proxies,i=0;elem!=NULL;elem=ms_list_next(elem),i++){
......
......@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "linphonecore.h"
#ifdef ANDROID
#include <android/log.h>
extern "C" void libmsilbc_init();
#endif /*ANDROID*/
extern "C" void ms_andsnd_register_card(JavaVM *jvm) ;
......@@ -160,7 +161,9 @@ extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_newLinphoneCore(JNIEnv*
LinphoneCoreData* ldata = new LinphoneCoreData(env,thiz,jlistener,juserdata);
#ifdef ANDROID
ms_andsnd_register_card(jvm);
// requires an fpu libmsilbc_init();
#endif /*ANDROID*/
jlong nativePtr = (jlong)linphone_core_new( &ldata->vTable
,userConfig
,factoryConfig
......
......@@ -260,6 +260,7 @@ typedef struct sip_config
bool_t register_only_when_network_is_up;
bool_t ping_with_options;
bool_t auto_net_state_mon;
unsigned int keepalive_period; /* interval in ms between keep alive messages sent to the proxy server*/
} sip_config_t;
typedef struct rtp_config
......
......@@ -226,6 +226,8 @@ void sal_set_callbacks(Sal *ctx, const SalCallbacks *cbs);
int sal_listen_port(Sal *ctx, const char *addr, int port, SalTransport tr, int is_secure);
ortp_socket_t sal_get_socket(Sal *ctx);
void sal_set_user_agent(Sal *ctx, const char *user_agent);
/*keepalive period in ms*/
void sal_set_keepalive_period(Sal *ctx,unsigned int value);
void sal_use_session_timers(Sal *ctx, int expires);
int sal_iterate(Sal *sal);
MSList * sal_get_pending_auths(Sal *sal);
......
......@@ -1690,4 +1690,7 @@ char *sal_address_as_string_uri_only(const SalAddress *u){
void sal_address_destroy(SalAddress *u){
osip_from_free((osip_from_t*)u);
}
void sal_set_keepalive_period(Sal *ctx,unsigned int value) {
eXosip_set_option (EXOSIP_OPT_UDP_KEEP_ALIVE, &value);
}
mediastreamer2 @ 166db20a
Subproject commit 4882634280c82ca495d5bebec482d2744ddb7f61
Subproject commit 166db20a49a308e161d7b5c74fdc5aff000db9a2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment