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
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)
+
+
diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c
index bde6a2f40..142a7a564 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);
}
}
@@ -338,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){
@@ -754,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/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.c b/coreapi/linphonecore.c
index 5854774ff..a7ccef402 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 */
@@ -2056,9 +2070,10 @@ int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, LinphonePro
sal_op_set_contact(call->op, contact);
ms_free(contact);
}
-
- //TODO : should probably not be done here
+ 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);
if (!lc->sip_conf.sdp_200_ack){
call->media_pending=TRUE;
sal_call_set_local_media_description(call->op,call->localdesc);
@@ -2445,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 ...
@@ -2480,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);
@@ -2501,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;
@@ -4762,3 +4782,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..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);
@@ -1131,6 +1133,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/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 */
diff --git a/coreapi/sal_eXosip2.c b/coreapi/sal_eXosip2.c
index a89a8a13c..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);
@@ -1788,28 +1791,25 @@ 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;
}
-
- update_contact_from_response(op,last_answer);
+ 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");
+ update_contact_from_response(op,last_answer);
+ return TRUE;
+ } else {
+ ms_warning("Fail to send updated register.");
+ eXosip_unlock();
+ return FALSE;
+ }
+ eXosip_unlock();
return FALSE;
}
@@ -1903,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){
@@ -1964,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/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/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);
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"
diff --git a/mediastreamer2 b/mediastreamer2
index 3870493e9..43c192346 160000
--- a/mediastreamer2
+++ b/mediastreamer2
@@ -1 +1 @@
-Subproject commit 3870493e9a59ddf7858cf4628dd86ec7a8b469d8
+Subproject commit 43c1923468d962aa5577ebcf6d8674ef9d426e40
diff --git a/oRTP b/oRTP
index 04570bd7a..41d13b7e4 160000
--- a/oRTP
+++ b/oRTP
@@ -1 +1 @@
-Subproject commit 04570bd7a02f9baa682c4667fbba16e8c951b62b
+Subproject commit 41d13b7e491c7fc418987b63ff6ef80c7e8895a4