From 01ea50745690cf33d15fc0c29c78b5bf4a730686 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 6 Apr 2012 12:59:48 +0200 Subject: [PATCH 01/21] update ms2 and ortp --- mediastreamer2 | 2 +- oRTP | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mediastreamer2 b/mediastreamer2 index 3870493e9..150bda5db 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 3870493e9a59ddf7858cf4628dd86ec7a8b469d8 +Subproject commit 150bda5db6f25850e32bb0947daee8bdd0222e52 diff --git a/oRTP b/oRTP index 04570bd7a..5e7a3b571 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 04570bd7a02f9baa682c4667fbba16e8c951b62b +Subproject commit 5e7a3b571a073cab29e52634c11f780d7008e0e8 From b3a6a7014ce66bcc27a884fed71cb13117634db3 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 6 Apr 2012 16:03:52 +0200 Subject: [PATCH 02/21] update NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 10dc278dc..413970e6a 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +linphone-3.xxx -- + * fix bug in zRTP support (upgrade required) + * + linphone-3.5.2 -- February 22, 2012 * updated oRTP to 0.20.0 * updated mediastreamer2 to 2.8.2 From 9f4d3ab100b03cdd8e089e47d437ec1554d6d304 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 6 Apr 2012 16:07:14 +0200 Subject: [PATCH 03/21] Mediastreamer2 updated --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 150bda5db..ecee8e86d 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 150bda5db6f25850e32bb0947daee8bdd0222e52 +Subproject commit ecee8e86d403a6bf18e87ca24607ce9a1783674c From 52e06a6fba5eba90f6daab043204105da7224bcd Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 6 Apr 2012 17:24:16 +0200 Subject: [PATCH 04/21] fix a few codecs without numbering --- coreapi/linphonecore.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 5854774ff..fd1fe7d1c 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -992,6 +992,19 @@ static void linphone_core_assign_payload_type(LinphoneCore *lc, PayloadType *con lc->payload_types=ms_list_append(lc->payload_types,pt); } +static void linphone_core_handle_static_payloads(LinphoneCore *lc){ + RtpProfile *prof=&av_profile; + int i; + for(i=0;i<128;++i){ + PayloadType *pt=rtp_profile_get_payload(prof,i); + if (pt){ + if (payload_type_get_number(pt)!=i){ + linphone_core_assign_payload_type(lc,pt,i,NULL); + } + } + } +} + static void linphone_core_free_payload_types(LinphoneCore *lc){ ms_list_for_each(lc->payload_types,(void (*)(void*))payload_type_destroy); ms_list_free(lc->payload_types); @@ -1069,7 +1082,7 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta /*add all payload type for which we don't care about the number */ linphone_core_assign_payload_type(lc,&payload_type_ilbc,-1,"mode=30"); linphone_core_assign_payload_type(lc,&payload_type_amr,-1,"octet-align=1"); - linphone_core_assign_payload_type(lc,&payload_type_amrwb,-1,"octet-align=1"); + linphone_core_assign_payload_type(lc,&payload_type_amrwb,-1,"octet-align=1"); linphone_core_assign_payload_type(lc,&payload_type_lpc1015,-1,NULL); linphone_core_assign_payload_type(lc,&payload_type_g726_16,-1,NULL); linphone_core_assign_payload_type(lc,&payload_type_g726_24,-1,NULL); @@ -1084,6 +1097,7 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta linphone_core_assign_payload_type(lc,&payload_type_silk_wb,-1,NULL); linphone_core_assign_payload_type(lc,&payload_type_silk_swb,-1,NULL); linphone_core_assign_payload_type(lc,&payload_type_g729,18,"annexb=no"); + linphone_core_handle_static_payloads(lc); ms_init(); /* create a mediastreamer2 event queue and set it as global */ From f97f8094c9bce5a565018aa9dccd5a4bd2a1ddd4 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Wed, 11 Apr 2012 14:25:46 +0200 Subject: [PATCH 05/21] update ms2: protect iounit render call back againt filter destruction --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index ecee8e86d..abb47bc01 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit ecee8e86d403a6bf18e87ca24607ce9a1783674c +Subproject commit abb47bc01fadac3e943d9d4a9cfb55993ca0e609 From 57d665e1625c0c1c3872b92096d6b12e1217ecc2 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 12 Apr 2012 13:51:55 +0200 Subject: [PATCH 06/21] fix ms2 compilation issue --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index abb47bc01..da89da8f9 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit abb47bc01fadac3e943d9d4a9cfb55993ca0e609 +Subproject commit da89da8f938e658ef713511e2ff653bce4b7d423 From 51694fd79acb88cf1d7cb3e10d4aefd603449d08 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 16 Apr 2012 15:44:02 +0200 Subject: [PATCH 07/21] use double registration also for TCP and TLS --- coreapi/sal_eXosip2.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/coreapi/sal_eXosip2.c b/coreapi/sal_eXosip2.c index a89a8a13c..ef82b9bea 100644 --- a/coreapi/sal_eXosip2.c +++ b/coreapi/sal_eXosip2.c @@ -1788,26 +1788,24 @@ static bool_t register_again_with_updated_contact(SalOp *op, osip_message_t *ori osip_free(tmp); sal_address_destroy(ori_contact_address); - if (transport == SalTransportUDP) { - eXosip_lock(); - eXosip_register_build_register(op->rid,op->expires,&msg); - if (msg==NULL){ - eXosip_unlock(); - ms_warning("Fail to create a contact updated register."); - return FALSE; - } - if (fix_message_contact(op,msg,last_answer)) { - eXosip_register_send_register(op->rid,msg); - eXosip_unlock(); - ms_message("Resending new register with updated contact"); - return TRUE; - } else { - ms_warning("Fail to send updated register."); - eXosip_unlock(); - return FALSE; - } - eXosip_unlock(); + eXosip_lock(); + eXosip_register_build_register(op->rid,op->expires,&msg); + if (msg==NULL){ + eXosip_unlock(); + ms_warning("Fail to create a contact updated register."); + return FALSE; } + if (fix_message_contact(op,msg,last_answer)) { + eXosip_register_send_register(op->rid,msg); + eXosip_unlock(); + ms_message("Resending new register with updated contact"); + return TRUE; + } else { + ms_warning("Fail to send updated register."); + eXosip_unlock(); + return FALSE; + } + eXosip_unlock(); update_contact_from_response(op,last_answer); return FALSE; From 02369158f50408f4d805fe0284a37aa8fe953105 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 17 Apr 2012 11:13:29 +0200 Subject: [PATCH 08/21] Add video zoom API --- coreapi/linphonecore.c | 23 +++++++++++++++++++++++ coreapi/linphonecore.h | 2 ++ mediastreamer2 | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index fd1fe7d1c..f7d78a025 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -4776,3 +4776,26 @@ void linphone_core_init_default_params(LinphoneCore*lc, LinphoneCallParams *para params->in_conference=FALSE; } +void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float cx, float cy) { + VideoStream* vstream = call->videostream; + float zoom[3]; + + if (zoom_factor < 1) + zoom_factor = 1; + float halfsize = 0.5 * 1.0 / zoom_factor; + + if ((cx - halfsize) < 0) + cx = 0 + halfsize; + if ((cx + halfsize) > 1) + cx = 1 - halfsize; + if ((cy - halfsize) < 0) + cy = 0 + halfsize; + if ((cy + halfsize) > 1) + cy = 1 - halfsize; + + zoom[0] = zoom_factor; + zoom[1] = cx; + zoom[2] = cy; + ms_filter_call_method(vstream->output, MS_VIDEO_DISPLAY_ZOOM, &zoom); +} + diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 0bca75ce9..a5a1e8c0c 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -1131,6 +1131,8 @@ typedef struct LinphoneTunnel LinphoneTunnel; * get tunnel instance if available */ LinphoneTunnel *linphone_core_get_tunnel(LinphoneCore *lc); + + void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float cx, float cy); #ifdef __cplusplus } diff --git a/mediastreamer2 b/mediastreamer2 index da89da8f9..c194c9209 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit da89da8f938e658ef713511e2ff653bce4b7d423 +Subproject commit c194c9209bf6c96d419c0513f979ca1114ff3111 From ec2bfe3f34e04b08e1410d2349e88ae700b4c271 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 17 Apr 2012 16:50:07 +0200 Subject: [PATCH 09/21] Makefile for Android without neon --- build/android/Android-no-neon.mk | 199 +++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 build/android/Android-no-neon.mk diff --git a/build/android/Android-no-neon.mk b/build/android/Android-no-neon.mk new file mode 100644 index 000000000..a7348ca5c --- /dev/null +++ b/build/android/Android-no-neon.mk @@ -0,0 +1,199 @@ +## +## Android.mk -Android build script- +## +## +## Copyright (C) 2010 Belledonne Communications, Grenoble, France +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## + +LOCAL_PATH:= $(call my-dir)/../../coreapi + + +include $(CLEAR_VARS) + +LOCAL_CPP_EXTENSION := .cc + +LOCAL_SRC_FILES := \ + linphonecore.c \ + misc.c \ + enum.c \ + presence.c \ + proxy.c \ + friend.c \ + authentication.c \ + lpconfig.c \ + chat.c \ + sipsetup.c \ + siplogin.c \ + address.c \ + linphonecore_jni.cc \ + sal.c \ + sal_eXosip2.c \ + sal_eXosip2_presence.c \ + sal_eXosip2_sdp.c \ + offeranswer.c \ + callbacks.c \ + linphonecall.c \ + conference.c \ + ec-calibrator.c + +ifndef MY_LOG_DOMAIN +MY_LOG_DOMAIN = \"Linphone\" +endif + +LOCAL_CFLAGS += \ + -D_BYTE_ORDER=_LITTLE_ENDIAN \ + -DORTP_INET6 \ + -DINET6 \ + -DOSIP_MT \ + -DENABLE_TRACE \ + -DLINPHONE_VERSION=\"3.4.0\" \ + -DLINPHONE_PLUGINS_DIR=\"\\tmp\" \ + -DLOG_DOMAIN=$(MY_LOG_DOMAIN) + +LOCAL_CFLAGS += -DIN_LINPHONE + +ifeq ($(LINPHONE_VIDEO),1) +LOCAL_CFLAGS += -DVIDEO_ENABLED +ifeq ($(BUILD_X264),1) +LOCAL_CFLAGS += -DHAVE_X264 +endif +endif + +LOCAL_C_INCLUDES += \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/include \ + $(LOCAL_PATH)/../oRTP/include \ + $(LOCAL_PATH)/../mediastreamer2/include \ + $(LOCAL_PATH)/../../externals/exosip/include \ + $(LOCAL_PATH)/../../externals/osip/include + +LOCAL_LDLIBS += -llog -ldl + + + +LOCAL_STATIC_LIBRARIES := \ + cpufeatures \ + libmediastreamer2 \ + libortp \ + libeXosip2 \ + libosip2 \ + libgsm + +ifeq ($(BUILD_TUNNEL),1) +LOCAL_CFLAGS +=-DTUNNEL_ENABLED +LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../tunnel/include $(LOCAL_PATH)/../../tunnel/src +LOCAL_SRC_FILES += linphone_tunnel.cc TunnelManager.cc +ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) +LOCAL_SHARED_LIBRARIES += libtunnelclient +else +LOCAL_STATIC_LIBRARIES += libtunnelclient +endif +endif + + +_BUILD_AMR=0 +ifneq ($(BUILD_AMRNB), 0) +_BUILD_AMR=1 +endif + +ifneq ($(BUILD_AMRWB), 0) +_BUILD_AMR=1 +endif + +ifneq ($(_BUILD_AMR), 0) +LOCAL_CFLAGS += -DHAVE_AMR +LOCAL_STATIC_LIBRARIES += \ + libmsamr \ + libopencoreamr +endif + +ifneq ($(BUILD_AMRWB), 0) +LOCAL_STATIC_LIBRARIES += \ + libvoamrwbenc +endif + + +ifeq ($(BUILD_SILK),1) +LOCAL_CFLAGS += -DHAVE_SILK +LOCAL_STATIC_LIBRARIES += libmssilk +endif + +ifeq ($(BUILD_G729),1) +LOCAL_CFLAGS += -DHAVE_G729 +LOCAL_SHARED_LIBRARIES += libbcg729 +LOCAL_STATIC_LIBRARIES += libmsbcg729 +endif + +ifeq ($(LINPHONE_VIDEO),1) +LOCAL_LDLIBS += -lGLESv2 +LOCAL_STATIC_LIBRARIES += libvpx +ifeq ($(BUILD_X264),1) +LOCAL_STATIC_LIBRARIES += \ + libmsx264 \ + libx264 +endif +LOCAL_SHARED_LIBRARIES += \ + libavcodecnoneon \ + libswscalenoneon \ + libavcorenoneon \ + libavutilnoneon +endif + +LOCAL_STATIC_LIBRARIES += libspeex + +ifeq ($(BUILD_SRTP), 1) + LOCAL_C_INCLUDES += $(SRTP_C_INCLUDE) +endif + +ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) +LOCAL_CFLAGS += -DHAVE_ILBC=1 +LOCAL_STATIC_LIBRARIES += libmsilbc +endif + +LOCAL_C_INCLUDES += $(LIBLINPHONE_EXTENDED_C_INCLUDES) +LOCAL_WHOLE_STATIC_LIBRARIES += $(LIBLINPHONE_EXTENDED_STATIC_LIBS) +LOCAL_SRC_FILES += $(LIBLINPHONE_EXTENDED_SRC_FILES) + +ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) + LOCAL_SHARED_LIBRARIES += liblinssl liblincrypto + ifeq ($(BUILD_GPLV3_ZRTP),1) + LOCAL_SHARED_LIBRARIES += libzrtpcpp + endif + + ifeq ($(BUILD_SRTP),1) + LOCAL_SHARED_LIBRARIES += libsrtp + endif +else + LOCAL_LDLIBS += -lz + #LOCAL_STATIC_LIBRARIES += libz libdl + LOCAL_STATIC_LIBRARIES += \ + libssl-static libcrypto-static + ifeq ($(BUILD_GPLV3_ZRTP),1) + LOCAL_STATIC_LIBRARIES += libzrtpcpp-static + endif + + ifeq ($(BUILD_SRTP),1) + LOCAL_STATIC_LIBRARIES += libsrtp-static + endif +endif + +LOCAL_MODULE := liblinphonenoneon +include $(BUILD_SHARED_LIBRARY) + +$(call import-module,android/cpufeatures) + + From a1d057be714b8a12fb7ab1c2b9586b442d831b04 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 17 Apr 2012 18:05:05 +0200 Subject: [PATCH 10/21] optimize AudioUnit startup time --- coreapi/callbacks.c | 7 +++++-- coreapi/linphonecore.c | 8 +++++++- mediastreamer2 | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index bde6a2f40..b587ac75c 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -277,6 +277,9 @@ static void call_ringing(SalOp *h){ if (lc->sound_conf.play_sndcard!=NULL){ MSSndCard *ringcard=lc->sound_conf.lsd_card ? lc->sound_conf.lsd_card : lc->sound_conf.play_sndcard; if (call->localdesc->streams[0].max_rate>0) ms_snd_card_set_preferred_sample_rate(ringcard, call->localdesc->streams[0].max_rate); + /*we release sound before playing ringback tone*/ + if (call->audiostream) + audio_stream_unprepare_sound(call->audiostream); lc->ringstream=ring_start(lc->sound_conf.remote_ring,2000,ringcard); } ms_message("Remote ringing..."); @@ -285,7 +288,7 @@ static void call_ringing(SalOp *h){ linphone_call_set_state(call,LinphoneCallOutgoingRinging,"Remote ringing"); }else{ /*accept early media */ - if (call->audiostream && call->audiostream->ticker!=NULL){ + if (call->audiostream && audio_stream_started(call->audiostream)){ /*streams already started */ ms_message("Early media already started."); return; @@ -299,7 +302,7 @@ static void call_ringing(SalOp *h){ lc->ringstream=NULL; } ms_message("Doing early media..."); - linphone_core_update_streams (lc,call,md); + linphone_core_update_streams(lc,call,md); } } diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index f7d78a025..9a73d0aa6 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2071,8 +2071,9 @@ int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, LinphonePro ms_free(contact); } - //TODO : should probably not be done here linphone_call_init_media_streams(call); + if (lc->ringstream==NULL) + audio_stream_prepare_sound(call->audiostream,lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard); if (!lc->sip_conf.sdp_200_ack){ call->media_pending=TRUE; sal_call_set_local_media_description(call->op,call->localdesc); @@ -2459,6 +2460,7 @@ int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, const char *contact=NULL; SalOp *replaced; SalMediaDescription *new_md; + bool_t was_ringing=FALSE; if (call==NULL){ //if just one call is present answer the only one ... @@ -2494,6 +2496,7 @@ int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, ring_stop(lc->ringstream); ms_message("ring stopped"); lc->ringstream=NULL; + was_ringing=TRUE; } if (call->ringing_beep){ linphone_core_stop_dtmf(lc); @@ -2515,6 +2518,9 @@ int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, if (call->audiostream==NULL) linphone_call_init_media_streams(call); + if (!was_ringing && call->audiostream->ticker==NULL){ + audio_stream_prepare_sound(call->audiostream,lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard); + } if (params){ call->params=*params; diff --git a/mediastreamer2 b/mediastreamer2 index c194c9209..bef50ee99 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit c194c9209bf6c96d419c0513f979ca1114ff3111 +Subproject commit bef50ee99700c4b6cb8c504fbec1686f3102edea From 1e25bf2a30cd6b9c78593cc19a14f38de8873aa7 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 19 Apr 2012 11:36:17 +0200 Subject: [PATCH 11/21] fix bug with bad contact in 200Ok in case of authless proxy config. --- coreapi/sal_eXosip2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/coreapi/sal_eXosip2.c b/coreapi/sal_eXosip2.c index ef82b9bea..f21f43654 100644 --- a/coreapi/sal_eXosip2.c +++ b/coreapi/sal_eXosip2.c @@ -1799,6 +1799,7 @@ static bool_t register_again_with_updated_contact(SalOp *op, osip_message_t *ori eXosip_register_send_register(op->rid,msg); eXosip_unlock(); ms_message("Resending new register with updated contact"); + update_contact_from_response(op,last_answer); return TRUE; } else { ms_warning("Fail to send updated register."); @@ -1806,8 +1807,6 @@ static bool_t register_again_with_updated_contact(SalOp *op, osip_message_t *ori return FALSE; } eXosip_unlock(); - - update_contact_from_response(op,last_answer); return FALSE; } From c0c9ebc214434556b50db8023e172048cf7a9866 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 19 Apr 2012 16:32:30 +0200 Subject: [PATCH 12/21] Mediastreamer2 updated --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index bef50ee99..153983f60 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit bef50ee99700c4b6cb8c504fbec1686f3102edea +Subproject commit 153983f60d0b1865bd1e6f164d7f48ff4fc4e7eb From e1faecc5e5b363813046a776b7a88af477688c42 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 19 Apr 2012 17:47:31 +0200 Subject: [PATCH 13/21] fix bug for refer state notifications and update ortp --- coreapi/callbacks.c | 8 ++++++-- coreapi/sal_eXosip2.c | 25 ++++++++++++++++++++++--- coreapi/sal_eXosip2.h | 1 + oRTP | 2 +- 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index b587ac75c..142a7a564 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -341,6 +341,8 @@ static void call_accepted(SalOp *op){ } linphone_core_update_streams (lc,call,md); linphone_call_set_state(call,LinphoneCallPaused,"Call paused"); + if (call->refer_pending) + linphone_core_start_refered_call(lc,call); }else if (sal_media_description_has_dir(md,SalStreamRecvOnly)){ /*we are put on hold when the call is initially accepted */ if (lc->vtable.display_status){ @@ -757,8 +759,10 @@ static void refer_received(Sal *sal, SalOp *op, const char *referto){ ms_message("Automatically pausing current call to accept transfer."); linphone_core_pause_call(lc,call); call->was_automatically_paused=TRUE; - } - linphone_core_start_refered_call(lc,call); + /*then we will start the refered when the pause is accepted, in order to serialize transactions within the dialog. + * Indeed we need to avoid to send a NOTIFY to inform about of state of the refered call while the pause isn't completed. + **/ + }else linphone_core_start_refered_call(lc,call); }else if (lc->vtable.refer_received){ lc->vtable.refer_received(lc,referto); } diff --git a/coreapi/sal_eXosip2.c b/coreapi/sal_eXosip2.c index f21f43654..6a4e2b284 100644 --- a/coreapi/sal_eXosip2.c +++ b/coreapi/sal_eXosip2.c @@ -734,7 +734,7 @@ static int send_notify_for_refer(int did, const char *sipfrag){ eXosip_call_build_notify(did,EXOSIP_SUBCRSTATE_ACTIVE,&msg); if (msg==NULL){ eXosip_unlock(); - ms_error("Could not build NOTIFY for refer."); + ms_warning("Could not build NOTIFY for refer."); return -1; } osip_message_set_content_type(msg,"message/sipfrag"); @@ -760,7 +760,10 @@ int sal_call_notify_refer_state(SalOp *h, SalOp *newcall){ } }else{ if (!newcall->terminated){ - send_notify_for_refer(h->did,"SIP/2.0 200 Ok\r\n"); + if (send_notify_for_refer(h->did,"SIP/2.0 200 Ok\r\n")==-1){ + /* we need previous notify transaction to complete, so buffer the request for later*/ + h->sipfrag_pending="SIP/2.0 200 Ok\r\n"; + } } } } @@ -1536,7 +1539,7 @@ static void process_refer(Sal *sal, SalOp *op, eXosip_event_t *ev){ } } -void process_notify(Sal *sal, eXosip_event_t *ev){ +static void process_notify(Sal *sal, eXosip_event_t *ev){ osip_header_t *h=NULL; char *from=NULL; SalOp *op=find_op(sal,ev); @@ -1900,6 +1903,18 @@ static void other_request_reply(Sal *sal,eXosip_event_t *ev){ } } +static void process_in_call_reply(Sal *sal, eXosip_event_t *ev){ + SalOp *op=find_op(sal,ev); + if (ev->response){ + if (ev->request && strcmp(osip_message_get_method(ev->request),"NOTIFY")==0){ + if (op->sipfrag_pending){ + send_notify_for_refer(op->did,op->sipfrag_pending); + op->sipfrag_pending=NULL; + } + } + } +} + static bool_t process_event(Sal *sal, eXosip_event_t *ev){ ms_message("linphone process event get a message %d\n",ev->type); switch(ev->type){ @@ -1961,6 +1976,10 @@ static bool_t process_event(Sal *sal, eXosip_event_t *ev){ return process_authentication(sal,ev); } break; + case EXOSIP_CALL_MESSAGE_ANSWERED: + ms_message("EXOSIP_CALL_MESSAGE_ANSWERED "); + process_in_call_reply(sal,ev); + break; case EXOSIP_IN_SUBSCRIPTION_NEW: ms_message("CALL_IN_SUBSCRIPTION_NEW "); sal_exosip_subscription_recv(sal,ev); diff --git a/coreapi/sal_eXosip2.h b/coreapi/sal_eXosip2.h index 75dd7e58c..f85ddfa1c 100644 --- a/coreapi/sal_eXosip2.h +++ b/coreapi/sal_eXosip2.h @@ -66,6 +66,7 @@ struct SalOp{ char *replaces; char *referred_by; const SalAuthInfo *auth_info; + const char *sipfrag_pending; bool_t supports_session_timers; bool_t sdp_offering; bool_t reinvite; diff --git a/oRTP b/oRTP index 5e7a3b571..41d13b7e4 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 5e7a3b571a073cab29e52634c11f780d7008e0e8 +Subproject commit 41d13b7e491c7fc418987b63ff6ef80c7e8895a4 From 7eee8c91693c3ac8ffb92e6a3df0bf1d8ef8d6a5 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 20 Apr 2012 22:30:24 +0200 Subject: [PATCH 14/21] update ms2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 153983f60..75eb1fcf8 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 153983f60d0b1865bd1e6f164d7f48ff4fc4e7eb +Subproject commit 75eb1fcf8d6097e51bcb507be339dd397c6b4dd5 From 93bed082d2c61a88bf793aa748e365744ce8df5b Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 20 Apr 2012 22:49:29 +0200 Subject: [PATCH 15/21] stop dtmf stream before starting a new call --- coreapi/linphonecore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 9a73d0aa6..a7ccef402 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2070,7 +2070,7 @@ int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, LinphonePro sal_op_set_contact(call->op, contact); ms_free(contact); } - + linphone_core_stop_dtmf_stream(lc); linphone_call_init_media_streams(call); if (lc->ringstream==NULL) audio_stream_prepare_sound(call->audiostream,lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard); From 9694d4a9eba15cc79ed0813d9198082c1be052f3 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Mon, 23 Apr 2012 13:51:24 +0200 Subject: [PATCH 16/21] Compatible with Java 1.3 --- .../org/linphone/core/LinphoneCall.java | 4 +-- .../org/linphone/core/LinphoneCallLog.java | 4 +-- .../org/linphone/core/LinphoneCore.java | 27 +++++++++---------- .../linphone/core/LinphoneCoreFactory.java | 2 +- .../org/linphone/core/LinphoneFriend.java | 4 +-- .../org/linphone/core/OnlineStatus.java | 4 +-- 6 files changed, 21 insertions(+), 24 deletions(-) diff --git a/java/common/org/linphone/core/LinphoneCall.java b/java/common/org/linphone/core/LinphoneCall.java index 24606ada7..4d8e23d80 100644 --- a/java/common/org/linphone/core/LinphoneCall.java +++ b/java/common/org/linphone/core/LinphoneCall.java @@ -31,7 +31,7 @@ public interface LinphoneCall { * */ static class State { - @SuppressWarnings("unchecked") + static private Vector values = new Vector(); private final int mValue; public final int value() {return mValue;} @@ -119,7 +119,7 @@ public interface LinphoneCall { */ public static final State CallReleased = new State(18,"CallReleased"); - @SuppressWarnings("unchecked") + private State(int value,String stringValue) { mValue = value; values.addElement(this); diff --git a/java/common/org/linphone/core/LinphoneCallLog.java b/java/common/org/linphone/core/LinphoneCallLog.java index dbd2bcc27..015f071df 100644 --- a/java/common/org/linphone/core/LinphoneCallLog.java +++ b/java/common/org/linphone/core/LinphoneCallLog.java @@ -31,7 +31,7 @@ public interface LinphoneCallLog { * */ static class CallStatus { - @SuppressWarnings("unchecked") + static private Vector values = new Vector(); private final int mValue; private final String mStringValue; @@ -52,7 +52,7 @@ public interface LinphoneCallLog { */ public final static CallStatus Declined = new CallStatus(3,"Declined"); - @SuppressWarnings("unchecked") + private CallStatus(int value,String stringValue) { mValue = value; values.addElement(this); diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 88db6a590..31300e384 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -18,8 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.linphone.core; - -import java.util.List; import java.util.Vector; import org.linphone.core.LinphoneCallParams; @@ -34,7 +32,7 @@ public interface LinphoneCore { * linphone core states */ static public class GlobalState { - @SuppressWarnings("unchecked") + static private Vector values = new Vector(); /** * Off @@ -56,7 +54,7 @@ public interface LinphoneCore { private final int mValue; private final String mStringValue; - @SuppressWarnings("unchecked") + private GlobalState(int value,String stringValue) { mValue = value; values.addElement(this); @@ -79,7 +77,7 @@ public interface LinphoneCore { * */ static public class RegistrationState { - @SuppressWarnings("unchecked") + private static Vector values = new Vector(); /** * None @@ -104,7 +102,7 @@ public interface LinphoneCore { private final int mValue; private final String mStringValue; - @SuppressWarnings("unchecked") + private RegistrationState(int value,String stringValue) { mValue = value; values.addElement(this); @@ -127,7 +125,7 @@ public interface LinphoneCore { * */ static public class FirewallPolicy { - @SuppressWarnings("unchecked") + static private Vector values = new Vector(); /** * No firewall is assumed. @@ -145,7 +143,7 @@ public interface LinphoneCore { private final int mValue; private final String mStringValue; - @SuppressWarnings("unchecked") + private FirewallPolicy(int value,String stringValue) { mValue = value; values.addElement(this); @@ -187,7 +185,7 @@ public interface LinphoneCore { * */ static public class MediaEncryption { - @SuppressWarnings("unchecked") + static private Vector values = new Vector(); /** * None @@ -204,7 +202,7 @@ public interface LinphoneCore { protected final int mValue; private final String mStringValue; - @SuppressWarnings("unchecked") + private MediaEncryption(int value,String stringValue) { mValue = value; values.addElement(this); @@ -226,7 +224,7 @@ public interface LinphoneCore { * EC Calibrator Status */ static public class EcCalibratorStatus { - @SuppressWarnings("unchecked") + static private Vector values = new Vector(); public static final int IN_PROGRESS_STATUS=0; public static final int DONE_STATUS=1; @@ -247,7 +245,7 @@ public interface LinphoneCore { private final int mValue; private final String mStringValue; - @SuppressWarnings("unchecked") + private EcCalibratorStatus(int value,String stringValue) { mValue = value; values.addElement(this); @@ -411,8 +409,7 @@ public interface LinphoneCore { /** * @return a list of LinphoneCallLog */ - @SuppressWarnings("unchecked") - public List getCallLogs(); + public Vector getCallLogs(); /** * This method is called by the application to notify the Linphone core library when network is reachable. @@ -693,7 +690,7 @@ public interface LinphoneCore { int getConferenceSize(); void terminateAllCalls(); - @SuppressWarnings("unchecked") List getCalls(); + Vector getCalls(); int getCallsNb(); diff --git a/java/common/org/linphone/core/LinphoneCoreFactory.java b/java/common/org/linphone/core/LinphoneCoreFactory.java index b5beba393..fe35b257f 100644 --- a/java/common/org/linphone/core/LinphoneCoreFactory.java +++ b/java/common/org/linphone/core/LinphoneCoreFactory.java @@ -36,7 +36,7 @@ abstract public class LinphoneCoreFactory { factoryName = className; } - @SuppressWarnings("unchecked") + public static final synchronized LinphoneCoreFactory instance() { try { if (theLinphoneCoreFactory == null) { diff --git a/java/common/org/linphone/core/LinphoneFriend.java b/java/common/org/linphone/core/LinphoneFriend.java index 88bcbab8e..d4f0e7503 100644 --- a/java/common/org/linphone/core/LinphoneFriend.java +++ b/java/common/org/linphone/core/LinphoneFriend.java @@ -36,7 +36,7 @@ public interface LinphoneFriend { */ static class SubscribePolicy { - @SuppressWarnings("unchecked") + static private Vector values = new Vector(); protected final int mValue; private final String mStringValue; @@ -54,7 +54,7 @@ public interface LinphoneFriend { */ public final static SubscribePolicy SPAccept = new SubscribePolicy(2,"SPAccept"); - @SuppressWarnings("unchecked") + private SubscribePolicy(int value,String stringValue) { mValue = value; values.addElement(this); diff --git a/java/common/org/linphone/core/OnlineStatus.java b/java/common/org/linphone/core/OnlineStatus.java index 8a0da6ce2..a1b36ab37 100644 --- a/java/common/org/linphone/core/OnlineStatus.java +++ b/java/common/org/linphone/core/OnlineStatus.java @@ -27,7 +27,7 @@ import java.util.Vector; */ public class OnlineStatus { - @SuppressWarnings("unchecked") + static private Vector values = new Vector(); /** * Offline @@ -77,7 +77,7 @@ public class OnlineStatus { protected final int mValue; private final String mStringValue; - @SuppressWarnings("unchecked") + private OnlineStatus(int value,String stringValue) { mValue = value; values.addElement(this); From 7f9529d265644466096e67dff6745a1d5ecf239e Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Tue, 24 Apr 2012 10:16:31 +0200 Subject: [PATCH 17/21] Add linphone icon to uninstaller icon --- linphone.iss.in | 1 + 1 file changed, 1 insertion(+) diff --git a/linphone.iss.in b/linphone.iss.in index b0cbd08f0..de88854d3 100644 --- a/linphone.iss.in +++ b/linphone.iss.in @@ -13,6 +13,7 @@ OutputBaseFilename=setup Compression=lzma SolidCompression=yes ShowLanguageDialog=yes +UninstallDisplayIcon={app}\bin\linphone.exe [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" From 49631ae72f33c9f667780d3b961344f61dee9889 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 24 Apr 2012 11:46:05 +0200 Subject: [PATCH 18/21] Update ms2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 75eb1fcf8..7303425a2 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 75eb1fcf8d6097e51bcb507be339dd397c6b4dd5 +Subproject commit 7303425a2bc993eff7f8446c566f7f282e90cc33 From 9635ebedd5a30fd734572e497ae64590974a0429 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 24 Apr 2012 15:13:26 +0200 Subject: [PATCH 19/21] Update ms2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 7303425a2..7e21fed93 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 7303425a2bc993eff7f8446c566f7f282e90cc33 +Subproject commit 7e21fed93e1c35a721a63fc089cc53b9e503af62 From edad295e0596eebc7ca4aed7472e0e3bdc696b41 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 25 Apr 2012 09:25:22 +0200 Subject: [PATCH 20/21] improve Ui and update ms2 for important bugfix --- gtk/main.c | 4 +--- gtk/main.ui | 2 +- mediastreamer2 | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gtk/main.c b/gtk/main.c index 819195268..b7ef5869f 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -774,13 +774,12 @@ void linphone_gtk_answer_clicked(GtkWidget *button){ void linphone_gtk_enable_video(GtkWidget *w){ gboolean val=gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w)); - GtkWidget *selfview_item=linphone_gtk_get_widget(linphone_gtk_get_main_window(),"selfview_item"); + //GtkWidget *selfview_item=linphone_gtk_get_widget(linphone_gtk_get_main_window(),"selfview_item"); LinphoneVideoPolicy policy={0}; policy.automatically_initiate=policy.automatically_accept=val; linphone_core_enable_video(linphone_gtk_get_core(),TRUE,TRUE); linphone_core_set_video_policy(linphone_gtk_get_core(),&policy); - gtk_widget_set_sensitive(selfview_item,val); if (val){ linphone_core_enable_video_preview(linphone_gtk_get_core(), linphone_gtk_get_ui_config_int("videoselfview",VIDEOSELFVIEW_DEFAULT)); @@ -1418,7 +1417,6 @@ static void linphone_gtk_check_menu_items(void){ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(linphone_gtk_get_widget( linphone_gtk_get_main_window(),"enable_video_item")), video_enabled); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(selfview_item),selfview); - gtk_widget_set_sensitive(selfview_item,video_enabled); } static gboolean linphone_gtk_can_manage_accounts(){ diff --git a/gtk/main.ui b/gtk/main.ui index 96647fe4d..eebb05e75 100644 --- a/gtk/main.ui +++ b/gtk/main.ui @@ -498,7 +498,7 @@ True False False - Enable video + Always start video True diff --git a/mediastreamer2 b/mediastreamer2 index 7e21fed93..43c192346 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 7e21fed93e1c35a721a63fc089cc53b9e503af62 +Subproject commit 43c1923468d962aa5577ebcf6d8674ef9d426e40 From ea6dd35f763c1f678dbd44da6330a9994abf34bc Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Wed, 25 Apr 2012 14:58:57 +0200 Subject: [PATCH 21/21] Add API to know Call audio/video codec --- coreapi/linphonecall.c | 14 ++++++++++++++ coreapi/linphonecore.h | 6 ++++-- coreapi/misc.c | 8 ++++---- coreapi/private.h | 2 ++ 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index d41c6cdad..69f9266a1 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -770,6 +770,14 @@ void linphone_call_params_enable_video(LinphoneCallParams *cp, bool_t enabled){ cp->has_video=enabled; } +const PayloadType* linphone_call_params_get_used_audio_codec(const LinphoneCallParams *cp) { + return cp->audio_codec; +} + +const PayloadType* linphone_call_params_get_used_video_codec(const LinphoneCallParams *cp) { + return cp->video_codec; +} + /** * Returns whether video is enabled. **/ @@ -1146,6 +1154,7 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna bool_t use_ec; if (used_pt!=-1){ + call->current_params.audio_codec = rtp_profile_get_payload(call->audio_profile, used_pt); if (playcard==NULL) { ms_warning("No card defined for playback !"); } @@ -1262,6 +1271,7 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna const char *addr=vstream->addr[0]!='\0' ? vstream->addr : call->resultdesc->addr; call->video_profile=make_profile(call,call->resultdesc,vstream,&used_pt); if (used_pt!=-1){ + call->current_params.video_codec = rtp_profile_get_payload(call->video_profile, used_pt); VideoStreamDir dir=VideoStreamSendRecv; MSWebCam *cam=lc->video_conf.device; bool_t is_inactive=FALSE; @@ -1333,6 +1343,10 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_muted, bool_t send_ringbacktone){ LinphoneCore *lc=call->core; + + call->current_params.audio_codec = NULL; + call->current_params.video_codec = NULL; + LinphoneAddress *me=linphone_core_get_primary_contact_parsed(lc); char *cname; bool_t use_arc=linphone_core_adaptive_rate_control_enabled(lc); diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index a5a1e8c0c..d3a514a69 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -183,6 +183,8 @@ char * linphone_call_log_to_str(LinphoneCallLog *cl); struct _LinphoneCallParams; typedef struct _LinphoneCallParams LinphoneCallParams; +const PayloadType* linphone_call_params_get_used_audio_codec(const LinphoneCallParams *cp); +const PayloadType* linphone_call_params_get_used_video_codec(const LinphoneCallParams *cp); LinphoneCallParams * linphone_call_params_copy(const LinphoneCallParams *cp); void linphone_call_params_enable_video(LinphoneCallParams *cp, bool_t enabled); bool_t linphone_call_params_video_enabled(const LinphoneCallParams *cp); @@ -786,13 +788,13 @@ const MSList *linphone_core_get_video_codecs(const LinphoneCore *lc); int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs); -bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, PayloadType *pt); +bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, const PayloadType *pt); int linphone_core_enable_payload_type(LinphoneCore *lc, PayloadType *pt, bool_t enable); PayloadType* linphone_core_find_payload_type(LinphoneCore* lc, const char* type, int rate) ; -int linphone_core_get_payload_type_number(LinphoneCore *lc, PayloadType *pt); +int linphone_core_get_payload_type_number(LinphoneCore *lc, const PayloadType *pt); const char *linphone_core_get_payload_type_description(LinphoneCore *lc, PayloadType *pt); diff --git a/coreapi/misc.c b/coreapi/misc.c index 41d4efac8..881b88eb6 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -181,12 +181,12 @@ static void payload_type_set_enable(PayloadType *pt,int value) else payload_type_unset_flag(pt,PAYLOAD_TYPE_ENABLED); } -static bool_t payload_type_enabled(PayloadType *pt) { +static bool_t payload_type_enabled(const PayloadType *pt) { return (((pt)->flags & PAYLOAD_TYPE_ENABLED)!=0); } -bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, PayloadType *pt){ - if (ms_list_find(lc->codecs_conf.audio_codecs,pt) || ms_list_find(lc->codecs_conf.video_codecs,pt)){ +bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, const PayloadType *pt){ + if (ms_list_find(lc->codecs_conf.audio_codecs, (PayloadType*) pt) || ms_list_find(lc->codecs_conf.video_codecs, (PayloadType*)pt)){ return payload_type_enabled(pt); } ms_error("Getting enablement status of codec not in audio or video list of PayloadType !"); @@ -202,7 +202,7 @@ int linphone_core_enable_payload_type(LinphoneCore *lc, PayloadType *pt, bool_t return -1; } -int linphone_core_get_payload_type_number(LinphoneCore *lc, PayloadType *pt){ +int linphone_core_get_payload_type_number(LinphoneCore *lc, const PayloadType *pt){ return payload_type_get_number(pt); } diff --git a/coreapi/private.h b/coreapi/private.h index ec57eaf9c..a790276dd 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -68,6 +68,8 @@ struct _LinphoneCallParams{ LinphoneCall *referer; /*in case this call creation is consecutive to an incoming transfer, this points to the original call */ int audio_bw; /* bandwidth limit for audio stream */ LinphoneMediaEncryption media_encryption; + PayloadType *audio_codec; + PayloadType *video_codec; bool_t has_video; bool_t real_early_media; /*send real media even during early media (for outgoing calls)*/ bool_t in_conference; /*in conference mode */