FreeCalypso > hg > themwi-rtp-lib
diff include/twjit.h @ 15:355de6301404
twjit: simplify create API, factor out clock & quantum config
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 06 Jul 2024 21:31:16 +0000 |
parents | 323957bebd53 |
children | 58e9719d1a84 |
line wrap: on
line diff
--- a/include/twjit.h Sat Jul 06 17:32:26 2024 +0000 +++ b/include/twjit.h Sat Jul 06 21:31:16 2024 +0000 @@ -129,9 +129,18 @@ /* twjit module API functions */ -struct twrtp_jibuf_inst *twrtp_jibuf_create(void *ctx, uint16_t quantum_ms, - uint16_t clock_khz, - struct twrtp_jibuf_config *config); +struct twrtp_jibuf_inst * +twrtp_jibuf_create(void *ctx, struct twrtp_jibuf_config *config); + +/* + * The default timescale is 8 kHz (8000 samples per second), + * and the default quantum duration (packetization interval) is 20 ms. + * The following function can be used to change these fundamental + * parameters; it may be called only right after twrtp_jibuf_create(), + * before any packets are fed to twrtp_jibuf_input(). + */ +void twrtp_jibuf_set_ts_quant(struct twrtp_jibuf_inst *twjit, + uint16_t clock_khz, uint16_t quantum_ms); void twrtp_jibuf_destroy(struct twrtp_jibuf_inst *twjit);