Commit 39c59be2 authored by Simon Morlat's avatar Simon Morlat

fix linphone-daemon printing of RTCP stats

parent 0878d89d
......@@ -149,43 +149,11 @@ static ostream &printCallStatsHelper(ostream &ostr, const LinphoneCallStats *sta
// ostr << prefix << "MaxJitterTs: " << stats->jitter_stats.max_jitter_ts << "\n";
ostr << prefix << "JitterBufferSizeMs: " << stats->jitter_stats.jitter_buffer_size_ms << "\n";
const report_block_t *rrb = NULL;
if (stats->received_rtcp != NULL) {
if (stats->received_rtcp->b_cont != NULL)
msgpullup(stats->received_rtcp, -1);
if (rtcp_is_SR(stats->received_rtcp)) {
rrb = rtcp_SR_get_report_block(stats->received_rtcp, 0);
} else if (rtcp_is_RR(stats->received_rtcp)) {
rrb = rtcp_RR_get_report_block(stats->received_rtcp, 0);
}
}
if (rrb) {
unsigned int ij;
float flost;
ij = report_block_get_interarrival_jitter(rrb);
flost = (float) (100.0 * report_block_get_fraction_lost(rrb) / 256.0);
ostr << prefix << "Received-InterarrivalJitter: " << ij << "\n";
ostr << prefix << "Received-FractionLost: " << flost << "\n";
}
const report_block_t *srb = NULL;
if (stats->sent_rtcp != NULL) {
if (stats->sent_rtcp->b_cont != NULL)
msgpullup(stats->sent_rtcp, -1);
if (rtcp_is_SR(stats->sent_rtcp)) {
srb = rtcp_SR_get_report_block(stats->sent_rtcp, 0);
} else if (rtcp_is_RR(stats->sent_rtcp)) {
srb = rtcp_RR_get_report_block(stats->sent_rtcp, 0);
}
}
if (srb) {
unsigned int ij;
float flost;
ij = report_block_get_interarrival_jitter(srb);
flost = (float) (100.0 * report_block_get_fraction_lost(srb) / 256.0);
ostr << prefix << "Sent-InterarrivalJitter: " << ij << "\n";
ostr << prefix << "Sent-FractionLost: " << flost << "\n";
}
ostr << prefix << "Received-InterarrivalJitter: " << linphone_call_stats_get_receiver_interarrival_jitter(stats) << "\n";
ostr << prefix << "Received-FractionLost: " << linphone_call_stats_get_receiver_loss_rate(stats) << "\n";
ostr << prefix << "Sent-InterarrivalJitter: " << linphone_call_stats_get_sender_interarrival_jitter(stats) << "\n";
ostr << prefix << "Sent-FractionLost: " << linphone_call_stats_get_sender_loss_rate(stats) << "\n";
return ostr;
}
......
oRTP @ f9099f6b
Subproject commit 235e5175b2befa2d3e5f19cd969b0f3bda5b9b4c
Subproject commit f9099f6b2d8f95c6d4237524e66e47b76c26ecca
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment