use osmo_ortp in POLLING mode instead of select loop integration
This solves a lot of the problems we've been seeing in the context of large jitter (uRTP) or classic RTP with SID frames
This commit is contained in:
parent
42f80bc7af
commit
5355ead9d9
|
@ -1264,7 +1264,8 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg)
|
|||
}
|
||||
/* FIXME: select default value depending on speech_mode */
|
||||
//if (!payload_type)
|
||||
lchan->abis_ip.rtp_socket = osmo_rtp_socket_create(lchan->ts->trx);
|
||||
lchan->abis_ip.rtp_socket = osmo_rtp_socket_create(lchan->ts->trx,
|
||||
OSMO_RTP_F_POLL);
|
||||
if (!lchan->abis_ip.rtp_socket) {
|
||||
LOGP(DRSL, LOGL_ERROR,
|
||||
"%s IPAC Failed to create RTP/RTCP sockets\n",
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#include <osmocom/gsm/gsm_utils.h>
|
||||
#include <osmocom/gsm/lapdm.h>
|
||||
|
||||
#include <osmocom/trau/osmo_ortp.h>
|
||||
|
||||
#include <osmo-bts/logging.h>
|
||||
#include <osmo-bts/bts.h>
|
||||
#include <osmo-bts/oml.h>
|
||||
|
@ -215,7 +217,6 @@ get_lapdm_chan_by_hl2(struct gsm_bts_trx *trx, uint32_t hLayer2)
|
|||
return &lchan->lapdm_ch;
|
||||
}
|
||||
|
||||
|
||||
static const uint8_t fill_frame[GSM_MACBLOCK_LEN] = {
|
||||
0x01, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B,
|
||||
0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B,
|
||||
|
@ -258,10 +259,28 @@ static int handle_ph_readytosend_ind(struct femtol1_hdl *fl1,
|
|||
if (!lchan)
|
||||
break;
|
||||
|
||||
if (lchan->abis_ip.rtp_socket) {
|
||||
osmo_rtp_socket_poll(lchan->abis_ip.rtp_socket);
|
||||
/* FIXME: we _assume_ that we never miss TDMA
|
||||
* frames and that we always get to this point
|
||||
* for every to-be-transmitted voice frame. A
|
||||
* better solution would be to compute
|
||||
* rx_user_ts based on how many TDMA frames have
|
||||
* elapsed since the last call */
|
||||
lchan->abis_ip.rtp_socket->rx_user_ts += GSM_RTP_DURATION;
|
||||
}
|
||||
/* get a msgb from the dl_tx_queue */
|
||||
resp_msg = msgb_dequeue(&lchan->dl_tch_queue);
|
||||
if (!resp_msg)
|
||||
break;
|
||||
/* if there is none, try to generate empty TCH frame
|
||||
* like AMR SID_BAD */
|
||||
if (!resp_msg) {
|
||||
LOGP(DL1C, LOGL_NOTICE, "%s DL TCH Tx queue underrun\n",
|
||||
gsm_lchan_name(lchan));
|
||||
resp_msg = gen_empty_tch_msg(lchan);
|
||||
/* if there really is none, break here and send empty */
|
||||
if (!resp_msg)
|
||||
break;
|
||||
}
|
||||
|
||||
/* fill header */
|
||||
data_req_from_rts_ind(msgb_l1prim(resp_msg), rts_ind);
|
||||
|
|
Loading…
Reference in New Issue