adding cumulative number of packets lost

pull/1224/head
Julien Chavanton 4 years ago committed by Julien Chavanton
parent 7aabd7dddd
commit 49786d049f

@ -2572,7 +2572,7 @@ void call_destroy(struct call *c) {
ilog(LOG_INFO, "--- SSRC %s%" PRIx32 "%s", FMT_M(se->h.ssrc));
ilog(LOG_INFO, "------ Average MOS %" PRIu64 ".%" PRIu64 ", "
"lowest MOS %" PRIu64 ".%" PRIu64 " (at %u:%02u), "
"highest MOS %" PRIu64 ".%" PRIu64 " (at %u:%02u)",
"highest MOS %" PRIu64 ".%" PRIu64 " (at %u:%02u) lost:%d",
se->average_mos.mos / mos_samples / 10,
se->average_mos.mos / mos_samples % 10,
se->lowest_mos->mos / 10,
@ -2582,7 +2582,8 @@ void call_destroy(struct call *c) {
se->highest_mos->mos / 10,
se->highest_mos->mos % 10,
(unsigned int) (timeval_diff(&se->highest_mos->reported, &c->created) / 1000000) / 60,
(unsigned int) (timeval_diff(&se->highest_mos->reported, &c->created) / 1000000) % 60);
(unsigned int) (timeval_diff(&se->highest_mos->reported, &c->created) / 1000000) % 60,
se->packets_lost);
}
g_list_free(k);

@ -1730,9 +1730,10 @@ static void ng_stats_ssrc(bencode_item_t *dict, struct ssrc_hash *ht) {
if (!se->stats_blocks.length || !se->lowest_mos || !se->highest_mos)
continue;
bencode_dictionary_add_integer(ent, "cumulative loss", se->packets_lost);
int mos_samples = se->stats_blocks.length - se->no_mos_count;
if (mos_samples < 1) mos_samples = 1;
ng_stats_ssrc_mos_entry_dict_avg(ent, "average MOS", &se->average_mos, mos_samples);
ng_stats_ssrc_mos_entry_dict(ent, "lowest MOS", se->lowest_mos);
ng_stats_ssrc_mos_entry_dict(ent, "highest MOS", se->highest_mos);

@ -364,7 +364,7 @@ void ssrc_receiver_report(struct call_media *m, const struct ssrc_receiver_repor
.reported = *tv,
.packetloss = (unsigned int) rr->fraction_lost * 100 / 256,
};
other_e->packets_lost = rr->packets_lost;
mos_calc(ssb);
ilog(LOG_DEBUG, "Calculated MOS from RR for %s%x%s is %.1f", FMT_M(rr->from), (double) ssb->mos / 10.0);

@ -94,6 +94,7 @@ struct ssrc_entry_call {
*highest_mos,
average_mos; // contains a running tally of all stats blocks
uint16_t no_mos_count; // how many time we where not able to compute MOS due to missing RTT
uint32_t packets_lost; // RTCP cumulative number of packets lost
unsigned int last_rtt; // last calculated raw rtt without rtt from opposide side
// for transcoding

Loading…
Cancel
Save