Change-Id: I8610c5144015abc2628cf8c5ab136d5baece1265
pull/1130/head
Richard Fuchs 5 years ago
commit 2f5cd2fcee

@ -1530,6 +1530,7 @@ static void ng_stats_ssrc_mos_entry_common(bencode_item_t *subent, struct ssrc_s
{
bencode_dictionary_add_integer(subent, "MOS", sb->mos / div);
bencode_dictionary_add_integer(subent, "round-trip time", sb->rtt / div);
bencode_dictionary_add_integer(subent, "round-trip time leg", sb->rtt_leg / div);
bencode_dictionary_add_integer(subent, "jitter", sb->jitter / div);
bencode_dictionary_add_integer(subent, "packet loss", sb->packetloss / div);
}

@ -357,6 +357,7 @@ void ssrc_receiver_report(struct call_media *m, const struct ssrc_receiver_repor
*ssb = (struct ssrc_stats_block) {
.jitter = jitter,
.rtt = rtt + other_e->last_rtt,
.rtt_leg = rtt,
.reported = *tv,
.packetloss = (unsigned int) rr->fraction_lost * 100 / 256,
};
@ -386,6 +387,7 @@ void ssrc_receiver_report(struct call_media *m, const struct ssrc_receiver_repor
// running tally
other_e->average_mos.jitter += ssb->jitter;
other_e->average_mos.rtt += ssb->rtt;
other_e->average_mos.rtt_leg += ssb->rtt_leg;
other_e->average_mos.packetloss += ssb->packetloss;
other_e->average_mos.mos += ssb->mos;

@ -71,6 +71,7 @@ struct ssrc_stats_block {
struct timeval reported;
u_int64_t jitter; // ms
u_int64_t rtt; // us - combined from both sides
u_int32_t rtt_leg; // RTT only for the leg receiving the RTCP report
u_int64_t packetloss; // percent
u_int64_t mos; // nominal range of 10 - 50 for MOS values 1.0 to 5.0
};

Loading…
Cancel
Save