aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/netif/osmux.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-04-18 19:10:20 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-04-19 18:24:25 +0200
commite259c8ab18ce53bd58d022b2c6a193b4a2ec5b1b (patch)
treecd66c19f91d9b031b454f2cfdca25bc5f739dfa8 /include/osmocom/netif/osmux.h
parent9452adcc33fe3daec6a2be25d4327203e4dee587 (diff)
osmux: Set Marker bit on osmux frame loss detected
Until this patch, we didn't notify in any way to the RTP reader when an Osmux frame was lost. Instead, we updated the seq&timestamp as if there was no lost, and as a result the RTP reader would only see a steady increase of delay every time an osmux frame was lost. As the batch_factor for the lost packet is unknown, we cannot assume any number of amr payloads lost, and thus we cannot simply increment seq and timestamp for a specific amount. Instead, the only viable solution seems to set the M marker bit in the first rtp packet generated after a non-consecutive osmux frame is received. The implementation may act differently with the first generated RTP packet based on the first osmux seq number used for the stream. In case 0 it's used as first osmux seq number, M will be set depending on request from original RTP packet having the M bit set. If it's not 0, the first RTP packer will unconditionally have the M bit. That's not an issue because it's anyway expect for receiver to sync on the first packet. Related: OS#3185 Change-Id: I2efed6d726a1b8e77e686c7a5fe1940d3f4901a7
Diffstat (limited to 'include/osmocom/netif/osmux.h')
-rw-r--r--include/osmocom/netif/osmux.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/netif/osmux.h b/include/osmocom/netif/osmux.h
index e8e2c67..dfed66a 100644
--- a/include/osmocom/netif/osmux.h
+++ b/include/osmocom/netif/osmux.h
@@ -80,6 +80,7 @@ struct osmux_out_handle {
uint16_t rtp_seq;
uint32_t rtp_timestamp;
uint32_t rtp_ssrc;
+ uint8_t osmux_seq_ack; /* Latest received seq num */
struct osmo_timer_list timer;
struct llist_head list;
void (*tx_cb)(struct msgb *msg, void *data); /* Used defined rtp tx callback */