comparison src/twjit.c @ 16:58e9719d1a84

twjit: add reset function
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 06 Jul 2024 22:00:06 +0000
parents 355de6301404
children
comparison
equal deleted inserted replaced
15:355de6301404 16:58e9719d1a84
59 twjit->quanta_per_sec = 1000 / quantum_ms; 59 twjit->quanta_per_sec = 1000 / quantum_ms;
60 twjit->ts_units_per_ms = clock_khz; 60 twjit->ts_units_per_ms = clock_khz;
61 twjit->ts_units_per_sec = (uint32_t) clock_khz * 1000; 61 twjit->ts_units_per_sec = (uint32_t) clock_khz * 1000;
62 twjit->ns_to_ts_units = 1000000 / clock_khz; 62 twjit->ns_to_ts_units = 1000000 / clock_khz;
63 } 63 }
64
65 void twrtp_jibuf_reset(struct twrtp_jibuf_inst *twjit)
66 {
67 msgb_queue_free(&twjit->sb[0].queue);
68 msgb_queue_free(&twjit->sb[1].queue);
69 twjit->state = TWJIT_STATE_EMPTY;
70 twjit->sb[0].depth = 0;
71 twjit->sb[1].depth = 0;
72 twjit->got_first_packet = false;
73 memset(&twjit->stats, 0, sizeof(struct twrtp_jibuf_stats));
74 }