[PATCH] libosmo-abis[master]: Change API to convey marker bit

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/.

Max gerrit-no-reply at lists.osmocom.org
Fri Aug 12 10:30:44 UTC 2016


Review at  https://gerrit.osmocom.org/688

Change API to convey marker bit

Previously RTP receive callback ignored Marker bit from RTP
headers. Extend API to include it explicitly.

Change-Id: I3c2b6365d8a51bf98805614e07344d2639875fde
Related: OS#1750
---
M TODO-RELEASE
M include/osmocom/trau/osmo_ortp.h
M src/trau/osmo_ortp.c
3 files changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/88/688/1

diff --git a/TODO-RELEASE b/TODO-RELEASE
index 43b1e8e..7ea65b6 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -1 +1,2 @@
 #library	what		description / commit summary line
+libosmo-abis	API change	major: add parameter to rx_cb() callack in osmo_ortp.h
diff --git a/include/osmocom/trau/osmo_ortp.h b/include/osmocom/trau/osmo_ortp.h
index 7c2a5cb..1c0b223 100644
--- a/include/osmocom/trau/osmo_ortp.h
+++ b/include/osmocom/trau/osmo_ortp.h
@@ -55,7 +55,7 @@
 
 	/*! \brief callback for incoming data */
 	void (*rx_cb)(struct osmo_rtp_socket *rs, const uint8_t *payload,
-		      unsigned int payload_len);
+		      unsigned int payload_len, bool marker);
 
 	/*! \brief Receive user timestamp, to be incremented by user */
 	uint32_t rx_user_ts;
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c
index eb78212..11b8bc2 100644
--- a/src/trau/osmo_ortp.c
+++ b/src/trau/osmo_ortp.c
@@ -159,7 +159,8 @@
 		/* hand into receiver */
 		if (rs->rx_cb)
 			rs->rx_cb(rs, mblk->b_rptr,
-				  mblk->b_wptr - mblk->b_rptr);
+				  mblk->b_wptr - mblk->b_rptr,
+				  rtp_get_markbit(mblk));
 		//rs->rx_user_ts += 160;
 		freemsg(mblk);
 		return 1;
@@ -189,7 +190,8 @@
 			/* hand into receiver */
 			if (rs->rx_cb)
 				rs->rx_cb(rs, mblk->b_rptr,
-					  mblk->b_wptr - mblk->b_rptr);
+					  mblk->b_wptr - mblk->b_rptr,
+					  rtp_get_markbit(mblk));
 			freemsg(mblk);
 		} else
 			LOGP(DLMIB, LOGL_INFO, "recvm_with_ts(%u): ERROR!\n",

-- 
To view, visit https://gerrit.osmocom.org/688
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c2b6365d8a51bf98805614e07344d2639875fde
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list