filter out periodical call stats updates from linphone-daemon's event queue (there are too many)

This commit is contained in:
Simon Morlat 2015-12-17 17:16:58 +01:00
parent 58cee9ff5d
commit baf6f95839
2 changed files with 7 additions and 2 deletions

View file

@ -25,7 +25,7 @@ void CallCommand::exec(Daemon *app, const char *args) {
char *opt;
LinphoneCallParams *cp;
opt = strstr(early_media,"--early-media");
cp = linphone_core_create_default_call_parameters(app->getCore());
cp = linphone_core_create_call_params(app->getCore(), NULL);
if (opt) {
linphone_call_params_enable_early_media_sending(cp, TRUE);
ostr << "Early media: Ok\n";

View file

@ -515,7 +515,12 @@ void Daemon::callStateChanged(LinphoneCall *call, LinphoneCallState state, const
}
void Daemon::callStatsUpdated(LinphoneCall *call, const LinphoneCallStats *stats) {
if (mUseStatsEvents) mEventQueue.push(new CallStatsResponse(this, call, stats, true));
if (mUseStatsEvents) {
/* don't queue periodical updates (3 per seconds for just bandwidth updates) */
if (!(stats->updated & LINPHONE_CALL_STATS_PERIODICAL_UPDATE)){
mEventQueue.push(new CallStatsResponse(this, call, stats, true));
}
}
}
void Daemon::dtmfReceived(LinphoneCall *call, int dtmf) {