From 0121763b41b4ee42b0d5722908af7edf8b04cb7e Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 24 Jul 2012 11:37:48 +0200 Subject: [PATCH 01/22] ms2 update --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 3ad17dab4..cb0ef89e9 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 3ad17dab4138c1a4fa1536388caced23a5610e6a +Subproject commit cb0ef89e9fd1ef936fd4168fd89f41616caed382 From 46a38951859ad9401d652ca8793b4b12dd4cf6e3 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 25 Jul 2012 16:21:35 +0200 Subject: [PATCH 02/22] Fix SIGSEV when pausing call --- coreapi/linphonecore_jni.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index c6e774d23..e17cd929a 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -241,7 +241,7 @@ public: return; } LinphoneCoreData* lcData = (LinphoneCoreData*)linphone_core_get_user_data(lc); - env->CallVoidMethod(lcData->listener,lcData->displayStatusId,lcData->core,env->NewStringUTF(message)); + env->CallVoidMethod(lcData->listener,lcData->displayStatusId,lcData->core,message ? env->NewStringUTF(message) : NULL); } static void displayMessageCb(LinphoneCore *lc, const char *message) { From 78565bae79d273468c755d9b1634e2ccceece95c Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 25 Jul 2012 17:21:16 +0200 Subject: [PATCH 03/22] update ms2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index cb0ef89e9..a9df77b27 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit cb0ef89e9fd1ef936fd4168fd89f41616caed382 +Subproject commit a9df77b2734b2628eb030f0c0768681b6573ae8b From 75e09c9613844a8999d8ad3b3b908c3b27a7a10a Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 25 Jul 2012 17:23:51 +0200 Subject: [PATCH 04/22] Updated builtin echo canceller devices list --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index a9df77b27..985da5aee 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit a9df77b2734b2628eb030f0c0768681b6573ae8b +Subproject commit 985da5aeec14582ecde457ab7ff6382e01d470b6 From 771cff42526e5758e1a16f1faf1bcc87549a7f96 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 26 Jul 2012 15:38:02 +0200 Subject: [PATCH 05/22] Update ms2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 985da5aee..9ede70899 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 985da5aeec14582ecde457ab7ff6382e01d470b6 +Subproject commit 9ede708999a083165190982d31b358963faf5b7a From 14fc5446d03d5cf7a62e8884fa99fd7bbe175ecb Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 26 Jul 2012 16:17:46 +0200 Subject: [PATCH 06/22] Fix Decline/Missed call log --- coreapi/linphonecall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index ec006dd58..3793cb32b 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -489,9 +489,10 @@ void linphone_call_set_state(LinphoneCall *call, LinphoneCallState cstate, const call->state=cstate; } if (cstate==LinphoneCallEnd || cstate==LinphoneCallError){ - switch(call->reason){ + switch(call->reason){ case LinphoneReasonDeclined: call->log->status=LinphoneCallDeclined; + break; case LinphoneReasonNotAnswered: call->log->status=LinphoneCallMissed; break; From d36cc880b8a04eb7fac4baf44581e68c7d02b812 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 31 Jul 2012 11:28:44 +0200 Subject: [PATCH 07/22] merge patch to indicate whether video is active in linphonec --- console/linphonec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console/linphonec.c b/console/linphonec.c index 7d5c0cdd2..6220a0599 100644 --- a/console/linphonec.c +++ b/console/linphonec.c @@ -346,7 +346,7 @@ static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, L linphonec_out("Resuming call %i with %s.\n", id, from); break; case LinphoneCallStreamsRunning: - linphonec_out("Media streams established with %s for call %i.\n", from,id); + linphonec_out("Media streams established with %s for call %i (%s).\n", from,id,( linphone_call_params_video_enabled( linphone_call_get_current_params(call)) ? "video":"audio")); break; case LinphoneCallPausing: linphonec_out("Pausing call %i with %s.\n", id, from); From 9a0097a9748862b91448bb71c10c619e122e739a Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Tue, 31 Jul 2012 16:22:25 +0200 Subject: [PATCH 08/22] fix IOS camera localized name issue --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 9ede70899..c621a8ac6 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 9ede708999a083165190982d31b358963faf5b7a +Subproject commit c621a8ac69a33ae72f176689fa837bc5f0fb8eff From deb7ed6d93904dd0acee486e24f8bf9fb7b5aa33 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 1 Aug 2012 14:03:28 +0200 Subject: [PATCH 09/22] Exported is_network_reachable method through JNI --- coreapi/linphonecore_jni.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index e17cd929a..64837cab5 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -598,6 +598,12 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setNetworkStateReachable linphone_core_set_network_reachable((LinphoneCore*)lc,isReachable); } +extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isNetworkStateReachable( JNIEnv* env + ,jobject thiz + ,jlong lc) { + return linphone_core_is_network_reachabled((LinphoneCore*)lc); +} + extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setPlaybackGain( JNIEnv* env ,jobject thiz ,jlong lc From 1be354174188f8fbb800cd7a981d88176f1cbd4d Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Wed, 1 Aug 2012 17:59:50 +0200 Subject: [PATCH 10/22] Update ms2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index c621a8ac6..8daca1b79 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit c621a8ac69a33ae72f176689fa837bc5f0fb8eff +Subproject commit 8daca1b79969ea90068ceb3a64cbbde974a9bf74 From 78fae7acaf65bf083a8d35ae0c0bdddc87b649cc Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 2 Aug 2012 09:20:51 +0200 Subject: [PATCH 11/22] Update ms2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 8daca1b79..94eb4afe7 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 8daca1b79969ea90068ceb3a64cbbde974a9bf74 +Subproject commit 94eb4afe778c5fab72ca3e4defca42bc2a4d8118 From 042890cddef0e27b568bb03a00fa7894927c399f Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 2 Aug 2012 12:17:57 +0200 Subject: [PATCH 12/22] GetVersion method for linphoneCore exported --- coreapi/linphonecore_jni.cc | 5 +++++ java/common/org/linphone/core/LinphoneCore.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 64837cab5..894e4c1f8 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -1769,3 +1769,8 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setVideoPolicy(JNIEnv *e extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setCpuCountNative(JNIEnv *env, jobject thiz, jint count) { ms_set_cpu_count(count); } + +extern "C" jstring Java_org_linphone_core_LinphoneCoreImpl_getVersion(JNIEnv* env,jobject thiz,jlong ptr) { + jstring jvalue =env->NewStringUTF(linphone_core_get_version()); + return jvalue; +} diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 6f0ce2c65..e06342178 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -784,4 +784,8 @@ public interface LinphoneCore { */ public void refreshRegisters(); + /** + * return the version code of linphone core + */ + public String getVersion(); } From 5f2640d57a48e122cb14ffa2df23304103e3d6a9 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 2 Aug 2012 12:45:15 +0200 Subject: [PATCH 13/22] Android Makefile changed to automatically update linphone version --- build/android/common.mk | 6 +++++- configure.ac | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build/android/common.mk b/build/android/common.mk index c85318ee4..40742b959 100644 --- a/build/android/common.mk +++ b/build/android/common.mk @@ -50,13 +50,17 @@ ifndef MY_LOG_DOMAIN MY_LOG_DOMAIN = \"Linphone\" endif +ifndef LINPHONE_VERSION +LINPHONE_VERSION = \"Devel\" +endif + LOCAL_CFLAGS += \ -D_BYTE_ORDER=_LITTLE_ENDIAN \ -DORTP_INET6 \ -DINET6 \ -DOSIP_MT \ -DENABLE_TRACE \ - -DLINPHONE_VERSION=\"3.4.0\" \ + -DLINPHONE_VERSION=\"$(LINPHONE_VERSION)\" \ -DLINPHONE_PLUGINS_DIR=\"\\tmp\" \ -DLOG_DOMAIN=$(MY_LOG_DOMAIN) diff --git a/configure.ac b/configure.ac index 235fb79b1..8dbf90482 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,8 @@ dnl Process this file with autoconf to produce a configure script. +dnl Keep this line, it is parsed by Android Makefile +LINPHONE_VERSION=3.5.2 -AC_INIT([linphone],[3.5.2],[linphone-developers@nongnu.org]) +AC_INIT([linphone],[$LINPHONE_VERSION],[linphone-developers@nongnu.org]) AC_CANONICAL_SYSTEM AC_CONFIG_SRCDIR([coreapi/linphonecore.c]) From e6ef8b45a4d109f06b452276061303c0e2173dda Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 3 Aug 2012 09:41:00 +0200 Subject: [PATCH 14/22] Update MS2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 94eb4afe7..ec0a638d5 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 94eb4afe778c5fab72ca3e4defca42bc2a4d8118 +Subproject commit ec0a638d5c487ca8b7916094d14ad3967db62ce3 From a58b548331c103bca50b33898b07e13f5745b1c4 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 3 Aug 2012 13:44:43 +0200 Subject: [PATCH 15/22] fix version number declaration --- configure.ac | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 8dbf90482..235fb79b1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -dnl Keep this line, it is parsed by Android Makefile -LINPHONE_VERSION=3.5.2 -AC_INIT([linphone],[$LINPHONE_VERSION],[linphone-developers@nongnu.org]) +AC_INIT([linphone],[3.5.2],[linphone-developers@nongnu.org]) AC_CANONICAL_SYSTEM AC_CONFIG_SRCDIR([coreapi/linphonecore.c]) From bde9b86e968531cfdef2677f54abfecf6e9876ab Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 3 Aug 2012 16:33:22 +0200 Subject: [PATCH 16/22] add API to set custom parameters in the SIP contact address of registers. --- coreapi/linphonecore.h | 2 ++ coreapi/private.h | 1 + coreapi/proxy.c | 34 ++++++++++++++++++++++++++++++++-- mediastreamer2 | 2 +- 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 81044fff5..a269bc476 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -474,6 +474,8 @@ const char *linphone_proxy_config_get_addr(const LinphoneProxyConfig *obj); int linphone_proxy_config_get_expires(const LinphoneProxyConfig *obj); bool_t linphone_proxy_config_register_enabled(const LinphoneProxyConfig *obj); void linphone_proxy_config_refresh_register(LinphoneProxyConfig *obj); +const char *linphone_proxy_config_get_contact_parameters(const LinphoneProxyConfig *obj); +void linphone_proxy_config_set_contact_parameters(LinphoneProxyConfig *obj, const char *contact_params); struct _LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyConfig *obj); bool_t linphone_proxy_config_get_dial_escape_plus(const LinphoneProxyConfig *cfg); diff --git a/coreapi/private.h b/coreapi/private.h index 1ab7a6a7d..bc035f215 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -270,6 +270,7 @@ struct _LinphoneProxyConfig char *reg_identity; char *reg_route; char *realm; + char *contact_params; int expires; int reg_time; SalOp *op; diff --git a/coreapi/proxy.c b/coreapi/proxy.c index 1676e0918..8e066ea33 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -256,9 +256,10 @@ static char *guess_contact_for_register(LinphoneProxyConfig *obj){ if (proxy==NULL) return NULL; host=linphone_address_get_domain (proxy); if (host!=NULL){ - LinphoneAddress *contact; char localip[LINPHONE_IPADDR_SIZE]; + char *tmp; LCSipTransports tr; + LinphoneAddress *contact; linphone_core_get_local_ip(obj->lc,host,localip); contact=linphone_address_new(obj->reg_identity); @@ -274,8 +275,12 @@ static char *guess_contact_for_register(LinphoneProxyConfig *obj){ sal_address_set_param(contact,"transport","tls"); } } - ret=linphone_address_as_string(contact); + tmp=linphone_address_as_string_uri_only(contact); + if (obj->contact_params) + ret=ms_strdup_printf("<%s;%s>",tmp,obj->contact_params); + else ret=ms_strdup_printf("<%s>",tmp); linphone_address_destroy(contact); + ms_free(tmp); } linphone_address_destroy (proxy); return ret; @@ -511,6 +516,31 @@ bool_t linphone_proxy_config_register_enabled(const LinphoneProxyConfig *obj){ return obj->reg_sendregister; } +/** + * Set optional contact parameters that will be added to the contact information sent in the registration. + * @param obj the proxy config object + * @param contact_params a string contaning the additional parameters in text form, like "myparam=something;myparam2=something_else" + * + * The main use case for this function is provide the proxy additional information regarding the user agent, like for example unique identifier or apple push id. + * As an example, the contact address in the SIP register sent will look like . +**/ +void linphone_proxy_config_set_contact_parameters(LinphoneProxyConfig *obj, const char *contact_params){ + if (obj->contact_params) { + ms_free(obj->contact_params); + obj->contact_params=NULL; + } + if (contact_params){ + obj->contact_params=ms_strdup(contact_params); + } +} + +/** + * Returns previously set contact parameters. +**/ +const char *linphone_proxy_config_get_contact_parameters(const LinphoneProxyConfig *obj){ + return obj->contact_params; +} + struct _LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyConfig *obj){ return obj->lc; } diff --git a/mediastreamer2 b/mediastreamer2 index 94eb4afe7..ec0a638d5 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 94eb4afe778c5fab72ca3e4defca42bc2a4d8118 +Subproject commit ec0a638d5c487ca8b7916094d14ad3967db62ce3 From 3be24046c2cd689216166ca7339bee6a3e78ce4f Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 6 Aug 2012 10:40:59 +0200 Subject: [PATCH 17/22] update documentation --- coreapi/linphonecore.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index a269bc476..3d10a26af 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -720,11 +720,11 @@ typedef struct _LinphoneVTable{ BuddyInfoUpdated buddy_info_updated; /**< a LinphoneFriend's BuddyInfo has changed*/ NotifyReceivedCb notify_recv; /**< Other notifications*/ CallStatsUpdated call_stats_updated; /** Date: Tue, 7 Aug 2012 11:44:14 +0200 Subject: [PATCH 18/22] Fix memory leak for android --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index ec0a638d5..e1beea6f7 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit ec0a638d5c487ca8b7916094d14ad3967db62ce3 +Subproject commit e1beea6f700b39002facf7520b757c264d8d3c5e From e93d9096ff433d3195c177e4c767881406e71d88 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Tue, 7 Aug 2012 17:38:20 +0200 Subject: [PATCH 19/22] Update ms2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index e1beea6f7..863022b56 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit e1beea6f700b39002facf7520b757c264d8d3c5e +Subproject commit 863022b56fab41d2ca45dd1d149cb0caab08b54b From dc5b821d22ae39eda6a5c448a3f9e35e8b81f008 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 9 Aug 2012 11:04:23 +0200 Subject: [PATCH 20/22] fix makefile for android --- build/android/common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/android/common.mk b/build/android/common.mk index 40742b959..4fa833b59 100644 --- a/build/android/common.mk +++ b/build/android/common.mk @@ -51,7 +51,7 @@ MY_LOG_DOMAIN = \"Linphone\" endif ifndef LINPHONE_VERSION -LINPHONE_VERSION = \"Devel\" +LINPHONE_VERSION = "Devel" endif LOCAL_CFLAGS += \ From 6f9b9458f711961f389362410718390ac933873f Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 9 Aug 2012 16:07:43 +0200 Subject: [PATCH 21/22] add config entry to finely select audio stream features --- coreapi/linphonecall.c | 2 ++ coreapi/linphonecore.c | 3 +++ coreapi/misc.c | 33 ++++++++++++++++++++++++++++++++- coreapi/private.h | 1 + 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 3793cb32b..77fd9e20f 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -933,6 +933,8 @@ void linphone_call_init_media_streams(LinphoneCall *call){ audio_stream_enable_noise_gate(audiostream,enabled); } + audio_stream_set_features(audiostream,linphone_core_get_audio_features(lc)); + if (lc->rtptf){ RtpTransport *artp=lc->rtptf->audio_rtp_func(lc->rtptf->audio_rtp_func_data, call->audio_port); RtpTransport *artcp=lc->rtptf->audio_rtcp_func(lc->rtptf->audio_rtcp_func_data, call->audio_port+1); diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 40b2a647d..62942726a 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -485,6 +485,9 @@ static void sound_config_read(LinphoneCore *lc) linphone_core_set_playback_gain_db (lc,gain); linphone_core_set_remote_ringback_tone (lc,lp_config_get_string(lc->config,"sound","ringback_tone",NULL)); + + /*just parse requested stream feature once at start to print out eventual errors*/ + linphone_core_get_audio_features(lc); } static void sip_config_read(LinphoneCore *lc) diff --git a/coreapi/misc.c b/coreapi/misc.c index a749bf279..786347d63 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "private.h" +#include "lpconfig.h" #include "mediastreamer2/mediastream.h" #include #include @@ -574,6 +575,37 @@ LinphoneProxyConfig * is_a_linphone_proxy_config(void *user_pointer){ return cfg->magic==linphone_proxy_config_magic ? cfg : NULL; } +unsigned int linphone_core_get_audio_features(LinphoneCore *lc){ + unsigned int ret=0; + const char *features=lp_config_get_string(lc->config,"sound","features",NULL); + if (features){ + char tmp[256]={0}; + char name[256]; + char *p,*n; + strncpy(tmp,features,sizeof(tmp)-1); + for(p=tmp;*p!='\0';p++){ + if (*p==' ') continue; + n=strchr(p,'|'); + if (n) *n='\0'; + sscanf(p,"%s",name); + ms_message("Found audio feature %s",name); + if (strcasecmp(name,"PLC")==0) ret|=AUDIO_STREAM_FEATURE_PLC; + else if (strcasecmp(name,"EC")==0) ret|=AUDIO_STREAM_FEATURE_EC; + else if (strcasecmp(name,"EQUALIZER")==0) ret|=AUDIO_STREAM_FEATURE_EQUALIZER; + else if (strcasecmp(name,"VOL_SND")==0) ret|=AUDIO_STREAM_FEATURE_VOL_SND; + else if (strcasecmp(name,"VOL_RCV")==0) ret|=AUDIO_STREAM_FEATURE_VOL_RCV; + else if (strcasecmp(name,"DTMF")==0) ret|=AUDIO_STREAM_FEATURE_DTMF; + else if (strcasecmp(name,"DTMF_ECHO")==0) ret|=AUDIO_STREAM_FEATURE_DTMF_ECHO; + else if (strcasecmp(name,"ALL")==0) ret|=AUDIO_STREAM_FEATURE_ALL; + else if (strcasecmp(name,"NONE")==0) ret=0; + else ms_error("Unsupported audio feature %s requested in config file.",name); + if (!n) break; + p=n; + } + }else ret=AUDIO_STREAM_FEATURE_ALL; + return ret; +} + #ifdef HAVE_GETIFADDRS @@ -697,7 +729,6 @@ int linphone_core_get_local_ip_for(int type, const char *dest, char *result){ - void _linphone_core_configure_resolver(){ /*bionic declares _res but does not define nor export it !!*/ #ifdef ANDROID diff --git a/coreapi/private.h b/coreapi/private.h index bc035f215..24ee7f899 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -567,6 +567,7 @@ void linphone_call_remove_from_conf(LinphoneCall *call); void linphone_core_conference_check_uninit(LinphoneCore *lc); bool_t linphone_core_sound_resources_available(LinphoneCore *lc); void linphone_core_notify_refer_state(LinphoneCore *lc, LinphoneCall *referer, LinphoneCall *newcall); +unsigned int linphone_core_get_audio_features(LinphoneCore *lc); void __linphone_core_invalidate_registers(LinphoneCore* lc); void _linphone_core_codec_config_write(LinphoneCore *lc); From c97efee37aea1ccae3c476a108e988e47f38faa4 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 10 Aug 2012 10:41:51 +0200 Subject: [PATCH 22/22] Update ms2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 863022b56..b72c14600 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 863022b56fab41d2ca45dd1d149cb0caab08b54b +Subproject commit b72c14600003707dce7abd0c1003bd51a0d033c1