From b132094af0ca13d1b3b072076e592078d4fb56e3 Mon Sep 17 00:00:00 2001 From: Simon Morlat <simon.morlat@linphone.org> Date: Mon, 28 Mar 2011 20:52:03 +0200 Subject: [PATCH] ready for 3.4.3 --- configure.ac | 2 +- coreapi/linphonecall.c | 30 ++++++++++++++++++++++++++++++ coreapi/linphonecore.h | 6 ++++++ mediastreamer2 | 2 +- 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 81042d2bb7..fe399168a4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([linphone],[3.4.2],[linphone-developers@nongnu.org]) +AC_INIT([linphone],[3.4.3],[linphone-developers@nongnu.org]) AC_CANONICAL_SYSTEM AC_CONFIG_SRCDIR([coreapi/linphonecore.c]) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 9a21ca65b5..8959c01b93 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1079,3 +1079,33 @@ bool_t linphone_call_echo_limiter_enabled(const LinphoneCall *call){ } } +/** + * Returns the measured sound volume played locally (received from remote) + * It is expressed in dbm0. +**/ +float linphone_call_get_play_volume(LinphoneCall *call){ + AudioStream *st=call->audiostream; + if (st && st->volsend){ + float vol=0; + ms_filter_call_method(st->volsend,MS_VOLUME_GET,&vol); + return vol; + + } + return LINPHONE_VOLUME_DB_LOWEST; +} + +/** + * Returns the measured sound volume recorded locally (sent to remote) + * It is expressed in dbm0. +**/ +float linphone_call_get_record_volume(LinphoneCall *call){ + AudioStream *st=call->audiostream; + if (st && st->volrecv){ + float vol=0; + ms_filter_call_method(st->volrecv,MS_VOLUME_GET,&vol); + return vol; + + } + return LINPHONE_VOLUME_DB_LOWEST; +} + diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 81ab3e9499..6e55ea2e36 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -253,6 +253,8 @@ bool_t linphone_call_camera_enabled(const LinphoneCall *lc); int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file); LinphoneReason linphone_call_get_reason(const LinphoneCall *call); const char *linphone_call_get_remote_user_agent(LinphoneCall *call); +float linphone_call_get_play_volume(LinphoneCall *call); +float linphone_call_get_record_volume(LinphoneCall *call); void *linphone_call_get_user_pointer(LinphoneCall *call); void linphone_call_set_user_pointer(LinphoneCall *call, void *user_pointer); /** @@ -283,6 +285,10 @@ void linphone_call_enable_echo_limiter(LinphoneCall *call, bool_t val); * @ingroup media_parameters **/ bool_t linphone_call_echo_limiter_enabled(const LinphoneCall *call); + +/*keep this in sync with mediastreamer2/msvolume.h*/ +#define LINPHONE_VOLUME_DB_LOWEST (-120) /**< Lowest measured that can be returned.*/ + /** * @addtogroup proxies * @{ diff --git a/mediastreamer2 b/mediastreamer2 index d81b5016b2..63788c7a33 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit d81b5016b2badea5a3c8b335a0cb9ea000e69711 +Subproject commit 63788c7a33857e6994da7138d40efa6fff6f6c92 -- GitLab