]> sjero.net Git - linphone/commitdiff
merge patch to parametrize video codecs in linphonec.
authorSimon Morlat <simon.morlat@linphone.org>
Wed, 23 Jun 2010 14:34:12 +0000 (16:34 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Wed, 23 Jun 2010 14:34:12 +0000 (16:34 +0200)
fix unterminated calls in some rare cases

NEWS
configure.in
console/commands.c
coreapi/linphonecore.c
coreapi/sal_eXosip2.c
mediastreamer2

diff --git a/NEWS b/NEWS
index 05b7a5ac686ce8e9f38366f1889d0a41c4bd08a2..826dbc65b8f98e582130841af7bc6e5b73801f2b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+linphone-3.3.2 -- June 23, 2010
+       * fix crash when setting firewall address in gtk interface
+       * fix crash while closing video window on windows
+       * fix un-sent BYE message in some rare cases.
+       Requires:
+               mediastreamer2-2.6.0
+               ortp-0.16.3
+
 linphone-3.3.1 -- June 3, 2010
        * fix bugs when carrying non ascii displaynames in SIP messages
        * fix crash when codecs are incompatible
index 10af6c7706aacc7c948dc7f2e03e656b18592d0c..e7edf835e5c465488ba6e251cf6b5abc007afeaf 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT([linphone],[3.3.1],[linphone-developers@nongnu.org])
+AC_INIT([linphone],[3.3.2],[linphone-developers@nongnu.org])
 AC_CANONICAL_SYSTEM
 
 dnl Source packaging numbers
index 967e035786b5827e140b5b47afaeed586211b646..b46edc1944dbc4b1d2aba3e5136a16c07d56781f 100644 (file)
@@ -41,6 +41,9 @@
 #include <sys/wait.h>
 #endif
 
+#define AUDIO 0
+#define VIDEO 1
+
 /***************************************************************************
  *
  *  Forward declarations 
@@ -76,7 +79,9 @@ static int lpc_cmd_duration(LinphoneCore *lc, char *args);
 static int lpc_cmd_status(LinphoneCore *lc, char *args);
 static int lpc_cmd_ports(LinphoneCore *lc, char *args);
 static int lpc_cmd_speak(LinphoneCore *lc, char *args);
-static int lpc_cmd_codec(LinphoneCore *lc, char *args);
+static int lpc_cmd_acodec(LinphoneCore *lc, char *args);
+static int lpc_cmd_vcodec(LinphoneCore *lc, char *args);
+static int lpc_cmd_codec(int type, LinphoneCore *lc, char *args);
 static int lpc_cmd_echocancellation(LinphoneCore *lc, char *args);
 static int lpc_cmd_mute_mic(LinphoneCore *lc, char *args);
 static int lpc_cmd_unmute_mic(LinphoneCore *lc, char *args);
@@ -98,9 +103,9 @@ static int linphonec_friend_add(LinphoneCore *lc, const char *name, const char *
 #endif
 static int linphonec_friend_delete(LinphoneCore *lc, int num);
 static int linphonec_friend_delete(LinphoneCore *lc, int num);
-static void linphonec_codec_list(LinphoneCore *lc);
-static void linphonec_codec_enable(LinphoneCore *lc, int index);
-static void linphonec_codec_disable(LinphoneCore *lc, int index);
+static void linphonec_codec_list(int type, LinphoneCore *lc);
+static void linphonec_codec_enable(int type, LinphoneCore *lc, int index);
+static void linphonec_codec_disable(int type, LinphoneCore *lc, int index);
 
 
 
@@ -218,10 +223,14 @@ LPC_COMMAND commands[] = {
                        "'speak <voice name> <sentence>'        : speak a text using the specified espeak voice.\n"
                        "Example for english voice: 'speak default Hello my friend !'"
        },
-    { "codec", lpc_cmd_codec, "Codec configuration",
-            "'codec list' : list codecs\n"  
-            "'codec enable <index>' : enable available codec\n"  
-            "'codec disable <index>' : disable codecs" }, 
+    { "codec", lpc_cmd_acodec, "Audio codec configuration",
+            "'codec list' : list audio codecs\n"
+            "'codec enable <index>' : enable available audio codec\n"
+            "'codec disable <index>' : disable audio codec" },
+    { "vcodec", lpc_cmd_vcodec, "Video codec configuration",
+            "'vcodec list' : list video codecs\n"
+            "'vcodec enable <index>' : enable available video codec\n"
+            "'vcodec disable <index>' : disable video codec" },
     { "ec", lpc_cmd_echocancellation, "Echo cancellation",
             "'ec on [<delay>] [<tail>] [<framesize>]' : turn EC on with given delay, tail length and framesize\n"
             "'ec off' : turn echo cancellation (EC) off\n"
@@ -1690,7 +1699,15 @@ static int lpc_cmd_speak(LinphoneCore *lc, char *args){
        return 1;
 }
 
-static int lpc_cmd_codec(LinphoneCore *lc, char *args){
+static int lpc_cmd_acodec(LinphoneCore *lc, char *args){
+    return lpc_cmd_codec(AUDIO, lc, args);
+}
+
+static int lpc_cmd_vcodec(LinphoneCore *lc, char *args){
+    return lpc_cmd_codec(VIDEO, lc, args);
+}
+
+static int lpc_cmd_codec(int type, LinphoneCore *lc, char *args){
        char *arg1 = args;
        char *arg2 = NULL;
        char *ptr = args;
@@ -1711,20 +1728,20 @@ static int lpc_cmd_codec(LinphoneCore *lc, char *args){
 #ifdef HAVE_READLINE
                rl_inhibit_completion=1;
 #endif
-        if (!strcmp(arg2,"all")) linphonec_codec_enable(lc,-1);
-        else linphonec_codec_enable(lc,atoi(arg2));
+        if (!strcmp(arg2,"all")) linphonec_codec_enable(type,lc,-1);
+        else linphonec_codec_enable(type,lc,atoi(arg2));
 #ifdef HAVE_READLINE
                rl_inhibit_completion=0;
 #endif
        }
        else if (strcmp(arg1,"list")==0)
        {
-               linphonec_codec_list(lc);
+               linphonec_codec_list(type,lc);
        }
        else if (strcmp(arg1,"disable")==0)
        {
-        if (!strcmp(arg2,"all")) linphonec_codec_disable(lc,-1);
-        else linphonec_codec_disable(lc,atoi(arg2));
+        if (!strcmp(arg2,"all")) linphonec_codec_disable(type,lc,-1);
+        else linphonec_codec_disable(type,lc,atoi(arg2));
        }
        else
        {
@@ -1734,12 +1751,19 @@ static int lpc_cmd_codec(LinphoneCore *lc, char *args){
        return 1;
 }
 
-static void linphonec_codec_list(LinphoneCore *lc){
+static void linphonec_codec_list(int type, LinphoneCore *lc){
        PayloadType *pt;
     codecs_config_t *config=&lc->codecs_conf;
        int index=0;
-       MSList *node;
-       for(node=config->audio_codecs;node!=NULL;node=ms_list_next(node)){
+       MSList *node=NULL;
+
+    if (type == AUDIO) {
+      node=config->audio_codecs;
+    } else if(type==VIDEO) {
+      node=config->video_codecs;
+    }
+
+       for(;node!=NULL;node=ms_list_next(node)){
                pt=(PayloadType*)(node->data);
         linphonec_out("%2d: %s (%d) %s\n", index, pt->mime_type, pt->clock_rate, 
                    linphone_core_payload_type_enabled(lc,pt) ? "enabled" : "disabled");
@@ -1747,12 +1771,19 @@ static void linphonec_codec_list(LinphoneCore *lc){
        }
 }
 
-static void linphonec_codec_enable(LinphoneCore *lc, int sel_index){
+static void linphonec_codec_enable(int type, LinphoneCore *lc, int sel_index){
        PayloadType *pt;
     codecs_config_t *config=&lc->codecs_conf;
        int index=0;
-       MSList *node;
-    for(node=config->audio_codecs;node!=NULL;node=ms_list_next(node)){
+       MSList *node=NULL;
+
+    if (type == AUDIO) {
+      node=config->audio_codecs;
+    } else if(type==VIDEO) {
+      node=config->video_codecs;
+    }
+
+    for(;node!=NULL;node=ms_list_next(node)){
         if (index == sel_index || sel_index == -1) {
                    pt=(PayloadType*)(node->data);
             pt->flags|=PAYLOAD_TYPE_ENABLED;
@@ -1762,12 +1793,19 @@ static void linphonec_codec_enable(LinphoneCore *lc, int sel_index){
        }
 }
 
-static void linphonec_codec_disable(LinphoneCore *lc, int sel_index){
+static void linphonec_codec_disable(int type, LinphoneCore *lc, int sel_index){
        PayloadType *pt;
     codecs_config_t *config=&lc->codecs_conf;
        int index=0;
-       MSList *node;
-       for(node=config->audio_codecs;node!=NULL;node=ms_list_next(node)){
+       MSList *node=NULL;
+
+    if (type == AUDIO) {
+      node=config->audio_codecs;
+    } else if(type==VIDEO) {
+      node=config->video_codecs;
+    }
+
+       for(;node!=NULL;node=ms_list_next(node)){
         if (index == sel_index || sel_index == -1) {
                pt=(PayloadType*)(node->data);
             pt->flags&=~PAYLOAD_TYPE_ENABLED;
index a6911b301bdc66623757b19b0700c5fc0fa150bf..ccc40a810ea814ae5decaff0d949ddd4f99461ef 100644 (file)
@@ -1207,7 +1207,8 @@ int linphone_core_set_primary_contact(LinphoneCore *lc, const char *contact)
 
 /*result must be an array of chars at least LINPHONE_IPADDR_SIZE */
 void linphone_core_get_local_ip(LinphoneCore *lc, const char *dest, char *result){
-       if (linphone_core_get_firewall_policy(lc)==LINPHONE_POLICY_USE_NAT_ADDRESS){
+       if (linphone_core_get_firewall_policy(lc)==LINPHONE_POLICY_USE_NAT_ADDRESS
+           && linphone_core_get_nat_address(lc)!=NULL){
                strncpy(result,linphone_core_get_nat_address(lc),LINPHONE_IPADDR_SIZE);
                return;
        }
index bd3e7e664069bf47ef7ecec9e1762ea4ae136b8c..19e3a2196e3504ef5bf7fa7549e6b28216892eb6 100644 (file)
@@ -889,6 +889,9 @@ static void call_accepted(Sal *sal, eXosip_event_t *ev){
                ms_error("A closed call is accepted ?");
                return;
        }
+
+       op->did=ev->did;
+       
        sdp=eXosip_get_sdp_info(ev->response);
        if (sdp){
                op->base.remote_media=sal_media_description_new();
index bc6cdb650a9fc76d00380221eb0198ba4bb96812..0401519a5946e9216c836ef6271bb2b3bf688179 160000 (submodule)
@@ -1 +1 @@
-Subproject commit bc6cdb650a9fc76d00380221eb0198ba4bb96812
+Subproject commit 0401519a5946e9216c836ef6271bb2b3bf688179