]> sjero.net Git - linphone/commitdiff
update ms2 for new echo limiter features
authorSimon Morlat <simon.morlat@linphone.org>
Fri, 14 Jan 2011 11:53:12 +0000 (12:53 +0100)
committerSimon Morlat <simon.morlat@linphone.org>
Fri, 14 Jan 2011 11:53:12 +0000 (12:53 +0100)
console/commands.c
coreapi/linphonecall.c
mediastreamer2

index bf18a0ac089d65930494761faee99c5279f23696..6d0d005f27e312e8d4c467de98b970656ea31988 100644 (file)
@@ -83,6 +83,7 @@ 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_echolimiter(LinphoneCore *lc, char *args);
 static int lpc_cmd_pause(LinphoneCore *lc, char *args);
 static int lpc_cmd_resume(LinphoneCore *lc, char *args);
 static int lpc_cmd_mute_mic(LinphoneCore *lc, char *args);
@@ -269,6 +270,10 @@ static LPC_COMMAND advanced_commands[] = {
            "'ec on [<delay>] [<tail>] [<framesize>]' : turn EC on with given delay, tail length and framesize\n"
            "'ec off' : turn echo cancellation (EC) off\n"
            "'ec show' : show EC status" },
+       { "el", lpc_cmd_echolimiter, "Echo limiter",
+           "'el on turns on echo limiter (automatic half duplex, for cases where echo canceller cannot work)\n"
+           "'el off' : turn echo limiter off\n"
+           "'el show' : show echo limiter status" },
        { "nortp-on-audio-mute", lpc_cmd_rtp_no_xmit_on_audio_mute,
                  "Set the rtp_no_xmit_on_audio_mute configuration parameter",
                  "   If set to 1 then rtp transmission will be muted when\n"
@@ -2210,6 +2215,18 @@ static int lpc_cmd_echocancellation(LinphoneCore *lc, char *args){
     return 1;
 }
 
+static int lpc_cmd_echolimiter(LinphoneCore *lc, char *args){
+       if (args){
+               if (strcmp(args,"on")==0){
+                       linphone_core_enable_echo_limiter (lc,TRUE);
+               }else if (strcmp(args,"off")==0){
+                       linphone_core_enable_echo_limiter (lc,FALSE);
+               }
+       }
+       linphonec_out("Echo limiter is now %s.\n",linphone_core_echo_limiter_enabled (lc) ? "on":"off");
+       return 1;
+}
+
 static int lpc_cmd_mute_mic(LinphoneCore *lc, char *args)
 {
        linphone_core_mute_mic(lc, 1);
index 8210338aa863a60679131fac108d9e6f541288af..89e730a74f470c98b50725e6a7bf236a86092c48 100644 (file)
@@ -678,6 +678,7 @@ static void post_configure_audio_streams(LinphoneCall*call){
                thres=lp_config_get_float(lc->config,"sound","el_thres",-1);
                float force=lp_config_get_float(lc->config,"sound","el_force",-1);
                int sustain=lp_config_get_int(lc->config,"sound","el_sustain",-1);
+               float transmit_thres=lp_config_get_float(lc->config,"sound","el_transmit_thres",-1);
                MSFilter *f=NULL;
                if (st->el_type!=ELInactive){
                        f=st->volsend;
@@ -689,6 +690,8 @@ static void post_configure_audio_streams(LinphoneCall*call){
                                ms_filter_call_method(f,MS_VOLUME_SET_EA_THRESHOLD,&thres);
                        if (sustain!=-1)
                                ms_filter_call_method(f,MS_VOLUME_SET_EA_SUSTAIN,&sustain);
+                       if (transmit_thres!=-1)
+                               ms_filter_call_method(f,MS_VOLUME_SET_EA_TRANSMIT_THRESHOLD,&transmit_thres);
                }
        }
                
index 82220afa1b04a9ba380c720d5e2bf83347d7404b..3bdc6245ee1577ae4b123e1a2ab0f56388f34b13 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 82220afa1b04a9ba380c720d5e2bf83347d7404b
+Subproject commit 3bdc6245ee1577ae4b123e1a2ab0f56388f34b13