This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/3070
osmo_ortp.c: Add osmo_rtp_drop_frame API
Change-Id: Id6099372b6231c0a4b6ea0716f46f5daee7049e1
---
M src/trau/osmo_ortp.c
1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/70/3070/1
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c
index b2ee040..05817aa 100644
--- a/src/trau/osmo_ortp.c
+++ b/src/trau/osmo_ortp.c
@@ -436,6 +436,27 @@
return osmo_rtp_socket_fdreg(rs);
}
+/*! \brief Increment seq and timestamp on a RTP socket without sending any packet
+ * \param[in] rs OsmoRTP socket
+ * \param[in] duration duration in number of RTP clock ticks
+ *
+ * Useful if willing to update the RTP internal clock at a given time but no
+ * audio content is available. From receiver point of view, it will look like
+ * a packet was lost somewhere in the path.
+ *
+ * \returns 0 on success, <0 in case of error.
+ */
+int osmo_rtp_drop_frame(struct osmo_rtp_socket *rs, unsigned int duration)
+{
+ if (rs->flags & OSMO_RTP_F_DISABLED)
+ return 0;
+
+ uint16_t next_seq = rtp_session_get_seq_number(rs->sess) + 1;
+ rtp_session_set_seq_number(rs->sess, next_seq);
+ rs->tx_timestamp += duration;
+ return 0;
+}
+
/*! \brief Send one RTP frame via a RTP socket
* \param[in] rs OsmoRTP socket
* \param[in] payload pointer to buffer with RTP payload data
--
To view, visit https://gerrit.osmocom.org/3070
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6099372b6231c0a4b6ea0716f46f5daee7049e1
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>