# HG changeset patch # User Mychaela Falconia # Date 1720377564 0 # Node ID a0b89c02805365e03ea91b09a9582339f29b5f41 # Parent f71efdd08c33775a9a3ce1ac73e76c45cbd0fd7e RTP Tx: implement skip operation diff -r f71efdd08c33 -r a0b89c028053 include/endp.h --- a/include/endp.h Sun Jul 07 18:30:44 2024 +0000 +++ b/include/endp.h Sun Jul 07 18:39:24 2024 +0000 @@ -68,3 +68,4 @@ int twrtp_endp_tx_quantum(struct twrtp_endp *endp, const uint8_t *payload, unsigned payload_len, uint8_t payload_type, bool marker, bool auto_marker, bool send_rtcp); +void twrtp_endp_tx_skip(struct twrtp_endp *endp); diff -r f71efdd08c33 -r a0b89c028053 src/rtp_tx.c --- a/src/rtp_tx.c Sun Jul 07 18:30:44 2024 +0000 +++ b/src/rtp_tx.c Sun Jul 07 18:39:24 2024 +0000 @@ -43,8 +43,10 @@ return -EINVAL; msg = msgb_alloc_c(endp, sizeof(struct rtp_basic_hdr) + payload_len, "ThemWi-RTP-Tx"); - if (!msg) + if (!msg) { + twrtp_endp_tx_skip(endp); return -ENOMEM; + } /* timestamp generation is where we do some trickery */ osmo_clock_gettime(CLOCK_REALTIME, &now); @@ -94,3 +96,10 @@ return 0; } + +void twrtp_endp_tx_skip(struct twrtp_endp *endp) +{ + if (!endp->tx.started || endp->tx.restart) + return; + endp->tx.ts += endp->twjit->ts_quantum; +}