From 2a2c792cee34e4205de56e470a9bddc0d0656b50 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 17 Sep 2012 15:14:50 +0200 Subject: [PATCH] Add ICE state to the call stats display. --- daemon/daemon.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/daemon/daemon.cc b/daemon/daemon.cc index 9e977f7f3..38e83afc2 100644 --- a/daemon/daemon.cc +++ b/daemon/daemon.cc @@ -52,6 +52,14 @@ void usleep(int waitTime) { #define LICENCE_COMMERCIAL #endif +const char * const ice_state_str[] = { + "Not activated", /* LinphoneIceStateNotActivated */ + "In progress", /* LinphoneIceStateInProgress */ + "Host connection", /* LinphoneIceStateHostConnection */ + "Reflexive connection", /* LinphoneIceStateReflexiveConnection */ + "Relayed connection" /* LinphoneIceStateRelayConnection */ +}; + void *Daemon::iterateThread(void *arg) { Daemon *daemon = (Daemon *) arg; while (daemon->mRunning) { @@ -102,6 +110,7 @@ CallStatsResponse::CallStatsResponse(Daemon *daemon, LinphoneCall *call, const L prefix = ((stats->type == LINPHONE_CALL_STATS_AUDIO) ? "Audio-" : "Video-"); } + ostr << prefix << "ICE state: " << ice_state_str[stats->ice_state] << "\n"; ostr << prefix << "RoundTripDelay: " << stats->round_trip_delay << "\n"; ostr << prefix << "Jitter: " << stats->jitter_stats.jitter << "\n"; // ostr << prefix << "MaxJitter: " << stats->jitter_stats.max_jitter << "\n";