Extend RTP RX callback parameters
While debugging low-level RTP issues it is handy to be able to match exact RTP packet with the payload available to higher-level functions. Having Sequence number and Timestamp RTP fields as parameter to receiving callback is the easiest way to do so. Change-Id: I0c9b08d247d7342d6139badca77ce64fda0cf274
This commit is contained in:
parent
7a228ebc60
commit
02ceea8342
|
@ -1,3 +1,4 @@
|
|||
#library what description / commit summary line
|
||||
libosmo-abis API change major: add parameter to rx_cb() callack in osmo_ortp.h
|
||||
libosmo-abis API change major: add parameter to struct input_signal_data
|
||||
libosmo-abis API change major: add parameters to rx_cb() callack in osmo_ortp.h
|
||||
|
|
|
@ -55,7 +55,8 @@ struct osmo_rtp_socket {
|
|||
|
||||
/*! \brief callback for incoming data */
|
||||
void (*rx_cb)(struct osmo_rtp_socket *rs, const uint8_t *payload,
|
||||
unsigned int payload_len, bool marker);
|
||||
unsigned int payload_len, uint16_t seq_number,
|
||||
uint32_t timestamp, bool marker);
|
||||
|
||||
/*! \brief Receive user timestamp, to be incremented by user */
|
||||
uint32_t rx_user_ts;
|
||||
|
|
|
@ -161,6 +161,8 @@ int osmo_rtp_socket_poll(struct osmo_rtp_socket *rs)
|
|||
if (rs->rx_cb)
|
||||
rs->rx_cb(rs, mblk->b_rptr,
|
||||
mblk->b_wptr - mblk->b_rptr,
|
||||
rtp_get_seqnumber(mblk),
|
||||
rtp_get_timestamp(mblk),
|
||||
rtp_get_markbit(mblk));
|
||||
//rs->rx_user_ts += 160;
|
||||
freemsg(mblk);
|
||||
|
@ -192,6 +194,8 @@ static int osmo_rtp_fd_cb(struct osmo_fd *fd, unsigned int what)
|
|||
if (rs->rx_cb)
|
||||
rs->rx_cb(rs, mblk->b_rptr,
|
||||
mblk->b_wptr - mblk->b_rptr,
|
||||
rtp_get_seqnumber(mblk),
|
||||
rtp_get_timestamp(mblk),
|
||||
rtp_get_markbit(mblk));
|
||||
freemsg(mblk);
|
||||
} else
|
||||
|
|
Loading…
Reference in New Issue