From 7904f6a2292e5b5d99db00cd47a959d11400af72 Mon Sep 17 00:00:00 2001 From: smorlat Date: Fri, 11 Sep 2009 10:06:48 +0000 Subject: [PATCH] add mute capability update windows compilation notes. git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@645 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/README.mingw | 7 ++++--- linphone/coreapi/linphonecore.c | 13 ++++++++----- linphone/coreapi/linphonecore.h | 2 ++ linphone/coreapi/misc.c | 2 +- linphone/gtk-glade/incall_view.c | 5 +++++ linphone/po/Makefile.in.in | 4 ++-- 6 files changed, 22 insertions(+), 11 deletions(-) diff --git a/linphone/README.mingw b/linphone/README.mingw index 336c6f395..e2dd5b377 100644 --- a/linphone/README.mingw +++ b/linphone/README.mingw @@ -14,7 +14,6 @@ Download from mingw download page (http://www.mingw.org, click download): - MSYS automake-1.11 - MSYS autoconf-2.63 - MSYS libtool>=2.2.7 - - GNU binutils-2.19 - MSYS libcrypt*-bin - MSYS perl ===> Uncompress all these packages in / @@ -28,12 +27,13 @@ Download from mingw download page (http://www.mingw.org, click download): - mpfr*-dll - w32api-dev - mingwrt-dev and mingwrt-dll (mingw run time) + - gnu binutils 2.19 ===> Uncompress all these packages in /mingw note: lzma files can be uncompressed using tar --lzma -xvf * Move out libstdc++.la in order to workaround a gcc-4.4.0 bug (or packaging bug): - mv /mingw/lib/gcc/4.4.0/libstdc++.la /mingw/lib/gcc/4.4.0/libstdc++.la.bak + mv /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la.bak * Download intltool (quicklink: http://ftp.acc.umu.se/pub/GNOME/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip @@ -52,7 +52,8 @@ note: lzma files can be uncompressed using tar --lzma -xvf http://download.savannah.gnu.org/releases-noredirect/linphone/misc/) uncompress in / * Download and install Inno Setup Compiler in its default path (required only if you run 'make setup.exe'). - +* HACK: move out /lib/libintl.la : it confuses libtool + mv /lib/libintl.la /lib/libintl.la.bak Get Linphone source code ************************ diff --git a/linphone/coreapi/linphonecore.c b/linphone/coreapi/linphonecore.c index 760bc0c14..c6b325df9 100644 --- a/linphone/coreapi/linphonecore.c +++ b/linphone/coreapi/linphonecore.c @@ -1509,15 +1509,11 @@ void linphone_core_init_media_streams(LinphoneCore *lc){ lc->audiostream=audio_stream_new(linphone_core_get_audio_port(lc),linphone_core_ipv6_enabled(lc)); if (linphone_core_echo_limiter_enabled(lc)){ const char *type=lp_config_get_string(lc->config,"sound","el_type","mic"); - float gain=lp_config_get_float(lc->config,"sound","mic_gain",-1); if (strcasecmp(type,"mic")==0) audio_stream_enable_echo_limiter(lc->audiostream,ELControlMic); else if (strcasecmp(type,"speaker")==0) audio_stream_enable_echo_limiter(lc->audiostream,ELControlSpeaker); - if (gain!=-1){ - audio_stream_enable_gain_control(lc->audiostream,TRUE); - } - + audio_stream_enable_gain_control(lc->audiostream,TRUE); } if (linphone_core_echo_cancelation_enabled(lc)){ int len,delay,framesize; @@ -2074,6 +2070,13 @@ bool_t linphone_core_echo_limiter_enabled(const LinphoneCore *lc){ return lc->sound_conf.ea; } +void linphone_core_mute_mic(LinphoneCore *lc, bool_t val){ + if (lc->audiostream!=NULL){ + audio_stream_set_mic_gain(lc->audiostream, + (val==TRUE) ? 0 : 1.0); + } +} + void linphone_core_enable_agc(LinphoneCore *lc, bool_t val){ lc->sound_conf.agc=val; } diff --git a/linphone/coreapi/linphonecore.h b/linphone/coreapi/linphonecore.h index 816490f91..fe389246b 100644 --- a/linphone/coreapi/linphonecore.h +++ b/linphone/coreapi/linphonecore.h @@ -726,6 +726,8 @@ bool_t linphone_core_echo_limiter_enabled(const LinphoneCore *lc); void linphone_core_enable_agc(LinphoneCore *lc, bool_t val); bool_t linphone_core_agc_enabled(const LinphoneCore *lc); +void linphone_core_mute_mic(LinphoneCore *lc, bool_t muted); + void linphone_core_set_presence_info(LinphoneCore *lc,int minutes_away,const char *contact,LinphoneOnlineStatus os); LinphoneOnlineStatus linphone_core_get_presence_info(const LinphoneCore *lc); diff --git a/linphone/coreapi/misc.c b/linphone/coreapi/misc.c index 63a921dc7..2add44d7b 100644 --- a/linphone/coreapi/misc.c +++ b/linphone/coreapi/misc.c @@ -769,7 +769,7 @@ int linphone_core_get_local_ip_for(const char *dest, char *result){ } sock=socket(res->ai_family,SOCK_DGRAM,0); tmp=1; - err=setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,&tmp,sizeof(int)); + err=setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(SOCKET_OPTION_VALUE)&tmp,sizeof(int)); if (err<0){ ms_warning("Error in setsockopt: %s",strerror(errno)); } diff --git a/linphone/gtk-glade/incall_view.c b/linphone/gtk-glade/incall_view.c index 5ec94eba6..32b274f68 100644 --- a/linphone/gtk-glade/incall_view.c +++ b/linphone/gtk-glade/incall_view.c @@ -109,3 +109,8 @@ void linphone_gtk_in_call_view_terminate(const char *error_msg){ } g_timeout_add_seconds(2,(GSourceFunc)in_call_view_terminated,NULL); } + +void linphone_gtk_incall_mute_toggled(GtkToggleButton *button){ + linphone_core_mute_mic(linphone_gtk_get_core(), + gtk_toggle_button_get_active(button)); +} diff --git a/linphone/po/Makefile.in.in b/linphone/po/Makefile.in.in index 402a25f7a..57ef267b3 100644 --- a/linphone/po/Makefile.in.in +++ b/linphone/po/Makefile.in.in @@ -21,7 +21,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ -SHELL = @SHELL@ +SHELL = /bin/sh srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -56,7 +56,7 @@ ALL_LINGUAS = @ALL_LINGUAS@ PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) -USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) +USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep ^$$lang$$`"; then printf "$$lang "; fi; done; fi) USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)