From e1faecc5e5b363813046a776b7a88af477688c42 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 19 Apr 2012 17:47:31 +0200 Subject: [PATCH 01/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 02/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 03/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 04/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 05/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 06/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 07/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 08/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 09/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 */ From 38d4730be5d172c13d0bd58a53c397c140f81231 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 26 Apr 2012 11:30:50 +0200 Subject: [PATCH 10/21] add missing using namespace::std --- coreapi/TunnelManager.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/coreapi/TunnelManager.cc b/coreapi/TunnelManager.cc index b8f1dae48..3e998cb74 100644 --- a/coreapi/TunnelManager.cc +++ b/coreapi/TunnelManager.cc @@ -25,6 +25,7 @@ using namespace belledonnecomm; +using namespace ::std; Mutex TunnelManager::sMutex; From 0e496ed3d9f19528b0a2db5050c11030ca6a1312 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 26 Apr 2012 15:30:08 +0200 Subject: [PATCH 11/21] zoom: float to float* so the app can know about zoom limits --- coreapi/linphonecore.c | 22 +++++++++++----------- coreapi/linphonecore.h | 2 +- mediastreamer2 | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index a7ccef402..a8440a63d 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -4782,7 +4782,7 @@ 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) { +void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy) { VideoStream* vstream = call->videostream; float zoom[3]; @@ -4790,18 +4790,18 @@ void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float cx, f 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; + 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; + 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 d3a514a69..bd10556a0 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -1134,7 +1134,7 @@ typedef struct LinphoneTunnel LinphoneTunnel; */ LinphoneTunnel *linphone_core_get_tunnel(LinphoneCore *lc); - void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float cx, float cy); +void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy); #ifdef __cplusplus } diff --git a/mediastreamer2 b/mediastreamer2 index 43c192346..37474c877 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 43c1923468d962aa5577ebcf6d8674ef9d426e40 +Subproject commit 37474c877a7f4e1c458c6f9edf1302e75d929dd1 From 53d5f0c2bf8a5fbbfb04ce4126db81ff3da38916 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 27 Apr 2012 10:24:38 +0200 Subject: [PATCH 12/21] fix login frame --- gtk/loginframe.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gtk/loginframe.c b/gtk/loginframe.c index f1a67d9d5..7251adf38 100644 --- a/gtk/loginframe.c +++ b/gtk/loginframe.c @@ -62,14 +62,14 @@ void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg){ int nettype; const char *passwd=NULL; - + if (linphone_core_get_download_bandwidth(lc)==512 && linphone_core_get_upload_bandwidth(lc)==512) nettype=NetworkKindOpticalFiber; else nettype=NetworkKindAdsl; gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(mw,"login_internet_kind")),nettype); - gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(mw,"internet_kind")),nettype); - + //gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(mw,"internet_kind")),nettype); + if (linphone_gtk_get_ui_config_int("automatic_login",0) ){ g_timeout_add(250,(GSourceFunc)do_login_noprompt,cfg); return; @@ -88,7 +88,6 @@ void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg){ gtk_widget_hide(linphone_gtk_get_widget(mw,"disconnect_item")); gtk_widget_hide(linphone_gtk_get_widget(mw,"main_frame")); gtk_widget_show(linphone_gtk_get_widget(mw,"login_frame")); - gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"main_menu"),FALSE); gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"options_menu"),FALSE); str=g_strdup_printf(_("Please enter login information for %s"),linphone_proxy_config_get_domain(cfg)); gtk_label_set_text(GTK_LABEL(label),str); @@ -118,7 +117,6 @@ void linphone_gtk_exit_login_frame(void){ GtkWidget *mw=linphone_gtk_get_main_window(); gtk_widget_show(linphone_gtk_get_widget(mw,"main_frame")); gtk_widget_hide(linphone_gtk_get_widget(mw,"login_frame")); - gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"main_menu"),TRUE); gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"options_menu"),TRUE); gtk_widget_show(linphone_gtk_get_widget(mw,"disconnect_item")); } From acc0b85683c64c4a808db1eeb8992fdf69118dda Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 27 Apr 2012 16:30:40 +0200 Subject: [PATCH 13/21] Refresh identity after loginframe --- gtk/loginframe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gtk/loginframe.c b/gtk/loginframe.c index 7251adf38..08b90fe45 100644 --- a/gtk/loginframe.c +++ b/gtk/loginframe.c @@ -49,6 +49,7 @@ static gboolean do_login_noprompt(LinphoneProxyConfig *cfg){ tmp=linphone_address_as_string (addr); do_login(ssctx,tmp,NULL); linphone_address_destroy(addr); + linphone_gtk_load_identities(); return FALSE; } From d0ced93c25f088c04a9f92b82aa41c5b1f271e23 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 27 Apr 2012 17:08:36 +0200 Subject: [PATCH 14/21] bugfix with srtp at shutdown --- oRTP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oRTP b/oRTP index 41d13b7e4..07fa32444 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 41d13b7e491c7fc418987b63ff6ef80c7e8895a4 +Subproject commit 07fa32444a010965baec9562c9d07da5e5d6f2ce From 504a67b0e74c9d9a23c95e8e38127368c8276804 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Wed, 2 May 2012 10:10:20 +0200 Subject: [PATCH 15/21] replace vectors by array lin LinphoneCore.java --- java/common/org/linphone/core/LinphoneCore.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 31300e384..f33415b46 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -409,7 +409,7 @@ public interface LinphoneCore { /** * @return a list of LinphoneCallLog */ - public Vector getCallLogs(); + public LinphoneCallLog[] getCallLogs(); /** * This method is called by the application to notify the Linphone core library when network is reachable. @@ -690,7 +690,7 @@ public interface LinphoneCore { int getConferenceSize(); void terminateAllCalls(); - Vector getCalls(); + LinphoneCall[] getCalls(); int getCallsNb(); From 04fa4d457b3b584eae8c5964a48a97ec4040c94a Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Mon, 30 Apr 2012 14:34:48 +0200 Subject: [PATCH 16/21] make sure registration with expires=0 is allowed --- coreapi/linphonecore.c | 4 ++-- coreapi/proxy.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index a8440a63d..802afe725 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -4393,7 +4393,7 @@ void linphone_core_refresh_registers(LinphoneCore* lc) { elem=linphone_core_get_proxy_config_list(lc); for(;elem!=NULL;elem=elem->next){ LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data; - if (linphone_proxy_config_register_enabled(cfg) ) { + if (linphone_proxy_config_register_enabled(cfg) && linphone_proxy_config_get_expires(cfg)>0) { linphone_proxy_config_refresh_register(cfg); } } @@ -4403,7 +4403,7 @@ void __linphone_core_invalidate_registers(LinphoneCore* lc){ const MSList *elem=linphone_core_get_proxy_config_list(lc); for(;elem!=NULL;elem=elem->next){ LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data; - if (linphone_proxy_config_register_enabled(cfg) ) { + if (linphone_proxy_config_register_enabled(cfg)) { linphone_proxy_config_edit(cfg); linphone_proxy_config_done(cfg); } diff --git a/coreapi/proxy.c b/coreapi/proxy.c index 49e0ec3cc..cf7675807 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -218,7 +218,7 @@ void linphone_proxy_config_enableregister(LinphoneProxyConfig *obj, bool_t val){ * Sets the registration expiration time in seconds. **/ void linphone_proxy_config_expires(LinphoneProxyConfig *obj, int val){ - if (val<=0) val=600; + if (val<0) val=600; obj->expires=val; } From eb10f722f830e4cde7463679ef2ecb931636da4a Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 3 May 2012 09:42:44 +0200 Subject: [PATCH 17/21] update oRTP --- m4/readline.m4 | 6 +++--- oRTP | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/m4/readline.m4 b/m4/readline.m4 index 8c4e18566..13a217fda 100644 --- a/m4/readline.m4 +++ b/m4/readline.m4 @@ -22,15 +22,15 @@ if test "$readline_prefix" != "none"; then AC_CHECK_HEADERS(readline.h readline/readline.h, readline_h_found=yes) AC_CHECK_HEADERS(history.h readline/history.h) - AC_CHECK_LIB(readline, readline, [readline_libs_found=yes],[],[-lncurses]) + AC_CHECK_LIB(readline, readline, [readline_libs_found=yes],[],[]) LIBS=$LIBS_save CPPFLAGS=$CPPFLAGS_save if test "$readline_libs_found$readline_h_found" != "yesyes" ; then - AC_MSG_WARN("Could not find libreadline headers or library, linphonec will have limited prompt features") + AC_MSG_WARN([Could not find libreadline headers or library, linphonec will have limited prompt features]) else - READLINE_LIBS="$READLINE_LIBS -lreadline -lncurses" + READLINE_LIBS="$READLINE_LIBS -lreadline " fi diff --git a/oRTP b/oRTP index 07fa32444..a24da0932 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 07fa32444a010965baec9562c9d07da5e5d6f2ce +Subproject commit a24da093214970684312a70592b3e7e5dbaa1b26 From 394fab87613733ca6d76896dabba0f63e3199496 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 3 May 2012 16:21:23 +0200 Subject: [PATCH 18/21] Update mediastreamer --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 37474c877..32e7b8fde 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 37474c877a7f4e1c458c6f9edf1302e75d929dd1 +Subproject commit 32e7b8fde7ea0aeb86c5a456af9c6b43dbde1837 From 1c39ff2ce3a54395306565b85b1242db1ec7a26f Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 3 May 2012 16:32:11 +0200 Subject: [PATCH 19/21] Update mediastreamer --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 32e7b8fde..13818e851 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 32e7b8fde7ea0aeb86c5a456af9c6b43dbde1837 +Subproject commit 13818e851af2f51b3f0fe7bcec64931038a3d9f3 From a0bf029785638361f1a80be4e2d50bcfe29e5eda Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 4 May 2012 09:48:52 +0200 Subject: [PATCH 20/21] update ms2 for fixing make distcheck --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 13818e851..382bc1036 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 13818e851af2f51b3f0fe7bcec64931038a3d9f3 +Subproject commit 382bc1036d37e7339813a3c5796d88beea1211f5 From cac68c720a8154846e399d28876f4f57ff5e91f2 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 7 May 2012 22:16:26 +0200 Subject: [PATCH 21/21] update ms2 for android bugfix --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 382bc1036..f08143a15 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 382bc1036d37e7339813a3c5796d88beea1211f5 +Subproject commit f08143a159df482c84e71307071da6655910ad4d