MT#55283 explicitly track non empty samples

Change-Id: I15f648dba1e89f14906d6c7865c16162a1fc0434
(cherry picked from commit 0510796e04)
pull/2228/head
Richard Fuchs 1 month ago
parent 1a6b40ee6f
commit cdd4cbeefc

@ -5354,7 +5354,7 @@ void call_destroy(call_t *c) {
if (!se->stats_blocks.length || !se->lowest_mos || !se->highest_mos)
continue;
int mos_samples = (se->stats_blocks.length - se->no_mos_count);
int mos_samples = se->mos_samples;
if (mos_samples < 1) mos_samples = 1;
ilog(LOG_INFO, "--- SSRC %s%" PRIx32 "%s", FMT_M(se->h.ssrc));

@ -1144,7 +1144,7 @@ static void ng_stats_ssrc_1(const ng_parser_t *parser, parser_arg ent, struct ss
parser->dict_add_int(ent, "cumulative loss", se->packets_lost);
int mos_samples = se->stats_blocks.length - se->no_mos_count;
int mos_samples = se->mos_samples;
if (mos_samples < 1) mos_samples = 1;
ng_stats_ssrc_mos_entry_dict_avg(parser, ent, "average MOS", &se->average_mos, mos_samples);
ng_stats_ssrc_mos_entry_dict(parser, ent, "lowest MOS", se->lowest_mos);

@ -516,9 +516,8 @@ void ssrc_receiver_report(struct call_media *m, stream_fd *sfd, const struct ssr
other_e->highest_mos = ssb;
// running tally
if (!ssb->mos) { // when we do not have the RTT for both legs, we have no MOS
other_e->no_mos_count++;
} else {
if (ssb->mos) { // when we do not have the RTT for both legs, we have no MOS
other_e->mos_samples++;
other_e->average_mos.jitter += ssb->jitter;
other_e->average_mos.mos += ssb->mos;
other_e->average_mos.rtt += ssb->rtt;

@ -74,7 +74,7 @@ struct ssrc_entry_call {
struct ssrc_stats_block *lowest_mos,
*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
unsigned int mos_samples; // for average_mos math
unsigned int last_rtt; // last calculated raw rtt without rtt from opposide side
unsigned int last_rtt_xr; // last rtt for both legs retrieved from RTCP-XR BT-7

Loading…
Cancel
Save