FreeCalypso > hg > themwi-rtp-lib
comparison 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 |
comparison
equal
deleted
inserted
replaced
14:073b8c7b361f | 15:355de6301404 |
---|---|
127 struct twrtp_jibuf_stats stats; | 127 struct twrtp_jibuf_stats stats; |
128 }; | 128 }; |
129 | 129 |
130 /* twjit module API functions */ | 130 /* twjit module API functions */ |
131 | 131 |
132 struct twrtp_jibuf_inst *twrtp_jibuf_create(void *ctx, uint16_t quantum_ms, | 132 struct twrtp_jibuf_inst * |
133 uint16_t clock_khz, | 133 twrtp_jibuf_create(void *ctx, struct twrtp_jibuf_config *config); |
134 struct twrtp_jibuf_config *config); | 134 |
135 /* | |
136 * The default timescale is 8 kHz (8000 samples per second), | |
137 * and the default quantum duration (packetization interval) is 20 ms. | |
138 * The following function can be used to change these fundamental | |
139 * parameters; it may be called only right after twrtp_jibuf_create(), | |
140 * before any packets are fed to twrtp_jibuf_input(). | |
141 */ | |
142 void twrtp_jibuf_set_ts_quant(struct twrtp_jibuf_inst *twjit, | |
143 uint16_t clock_khz, uint16_t quantum_ms); | |
135 | 144 |
136 void twrtp_jibuf_destroy(struct twrtp_jibuf_inst *twjit); | 145 void twrtp_jibuf_destroy(struct twrtp_jibuf_inst *twjit); |
137 | 146 |
138 struct msgb; | 147 struct msgb; |
139 | 148 |