# HG changeset patch # User Mychaela Falconia # Date 1720377044 0 # Node ID f71efdd08c33775a9a3ce1ac73e76c45cbd0fd7e # Parent e67b3bb87d1b7b9ad70e1152974a409edff35460 RTP Tx: add auto_marker mode of operation diff -r e67b3bb87d1b -r f71efdd08c33 include/endp.h --- a/include/endp.h Sun Jul 07 17:41:19 2024 +0000 +++ b/include/endp.h Sun Jul 07 18:30:44 2024 +0000 @@ -67,4 +67,4 @@ int twrtp_endp_tx_quantum(struct twrtp_endp *endp, const uint8_t *payload, unsigned payload_len, uint8_t payload_type, - bool marker, bool send_rtcp); + bool marker, bool auto_marker, bool send_rtcp); diff -r e67b3bb87d1b -r f71efdd08c33 src/rtp_tx.c --- a/src/rtp_tx.c Sun Jul 07 17:41:19 2024 +0000 +++ b/src/rtp_tx.c Sun Jul 07 18:30:44 2024 +0000 @@ -28,7 +28,7 @@ int twrtp_endp_tx_quantum(struct twrtp_endp *endp, const uint8_t *payload, unsigned payload_len, uint8_t payload_type, - bool marker, bool send_rtcp) + bool marker, bool auto_marker, bool send_rtcp) { uint32_t ts_quantum = endp->twjit->ts_quantum; struct msgb *msg; @@ -52,6 +52,8 @@ endp->tx.ts = gen_timestamp(&now, endp->twjit); endp->tx.started = true; endp->tx.restart = false; + if (auto_marker) + marker = true; } else if (endp->tx.restart) { restart_ts = gen_timestamp(&now, endp->twjit); ts_delta = (int32_t)(restart_ts - endp->tx.ts); @@ -64,6 +66,8 @@ endp->tx.ts = restart_ts; } endp->tx.restart = false; + if (auto_marker) + marker = true; } rtph = (struct rtp_basic_hdr *)