FreeCalypso > hg > themwi-rtp-lib
diff src/twjit_in.c @ 11:4f82b9c07ddb
twjit: update to stats
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 06 Jul 2024 01:57:52 +0000 |
parents | e60df79cbe9f |
children | 323957bebd53 |
line wrap: on
line diff
--- a/src/twjit_in.c Sat Jul 06 00:29:24 2024 +0000 +++ b/src/twjit_in.c Sat Jul 06 01:57:52 2024 +0000 @@ -99,6 +99,8 @@ if (jitter_new < 0) jitter_new = -jitter_new; rri->jitter_accum += jitter_new - ((rri->jitter_accum + 8) >> 4); + if (jitter_new > twjit->stats.jitter_max) + twjit->stats.jitter_max = jitter_new; } /* actual twjit input logic */ @@ -246,6 +248,7 @@ twjit->last_seq = rx_seq; twjit->last_ts = rx_ts; memcpy(&twjit->last_arrival, &now, sizeof(struct timespec)); + twjit->stats.rx_packets++; msg->cb[0] = rx_ts; switch (twjit->state) { @@ -281,7 +284,7 @@ twjit->state = TWJIT_STATE_HANDOVER; twjit->write_sb = !twjit->write_sb; init_subbuf_first_packet(twjit, msg, rx_ssrc, rx_ts); - twjit->stats.handovers++; + twjit->stats.handovers_in++; return; } insert_pkt_write_sb(twjit, msg, rx_ts);