]> sjero.net Git - linphone/commitdiff
add ilbc for android + add keep alive parameter for sal
authorJehan Monnier <jehan.monnier@linphone.org>
Mon, 17 May 2010 15:08:56 +0000 (17:08 +0200)
committerJehan Monnier <jehan.monnier@linphone.org>
Mon, 17 May 2010 15:08:56 +0000 (17:08 +0200)
build/android/Android.mk
coreapi/linphonecore.c
coreapi/linphonecore_jni.cc
coreapi/private.h
coreapi/sal.h
coreapi/sal_eXosip2.c
mediastreamer2

index 529fc02ee81d4f46978b340f45949641a115d1b3..50ad5bef283da54e104122ee83f9b857b45bfb41 100755 (executable)
@@ -78,7 +78,7 @@ LOCAL_STATIC_LIBRARIES := \
        libeXosip2 \
        libosip2 \
        libgsm
-
+#      libmsilbc \
 LOCAL_MODULE_CLASS = SHARED_LIBRARIES
 
 include $(BUILD_SHARED_LIBRARY)
index 6247f39b89334f7a20edb3cad80b57b84b38ba6d..3d5cb9a4e4666d951b74072c0f70556d925122d7 100644 (file)
@@ -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++){
index 390c56232e78c38e0d975f715325cc33de983fd3..7efc94ff5e9244e1a6aee9cf7c33cdbb7f624fa8 100644 (file)
@@ -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
index 4a3c1dbaa3bd33ce0c818b14a5da5a4901f19b51..c3e2960a32a64c2aaf90b8c95a3d0f0f44db3754 100644 (file)
@@ -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
index 882761ffb3c7fc86fff68d33b35096d1f91689f9..d3943a64d01333350b0d59aecb116132acba5e0d 100644 (file)
@@ -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);
index d1ade9af2d25f8a0b7e7f8355a262cef44e09ef7..ba5730139614ceb3f80de28890d1d049e973fe0b 100644 (file)
@@ -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);
+}
 
index 4882634280c82ca495d5bebec482d2744ddb7f61..166db20a49a308e161d7b5c74fdc5aff000db9a2 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 4882634280c82ca495d5bebec482d2744ddb7f61
+Subproject commit 166db20a49a308e161d7b5c74fdc5aff000db9a2