diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-04-27 15:59:19 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-04-16 16:18:40 +0000 |
commit | 093cc765665cae83ce17b0eb452ff3f7b8bfdb14 (patch) | |
tree | 07b097ad20df712c37fa0ea64c06e628f84bc296 /openbsc/include/openbsc | |
parent | dc09470c40ae595806f6b52d60e815cfb2fb9434 (diff) |
nat: Add jitter buffer on the uplink receiver
Default usage values are defined in mgcp node, and can be per-BSC
overriden on each bsc node.
Change-Id: Ibf3932adc07442fb5e9c7a06404853f9d0a20959
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r-- | openbsc/include/openbsc/bsc_nat.h | 10 | ||||
-rw-r--r-- | openbsc/include/openbsc/mgcp.h | 6 | ||||
-rw-r--r-- | openbsc/include/openbsc/mgcp_internal.h | 14 |
3 files changed, 30 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index fad380438..5171c3e0c 100644 --- a/openbsc/include/openbsc/bsc_nat.h +++ b/openbsc/include/openbsc/bsc_nat.h @@ -175,6 +175,16 @@ struct bsc_config { /* Osmux is enabled/disabled per BSC */ int osmux; + + /* Use a jitterbuffer on the bts-side receiver */ + bool bts_use_jibuf; + /* Minimum and maximum buffer size for the jitter buffer, in ms */ + uint32_t bts_jitter_delay_min; + uint32_t bts_jitter_delay_max; + /* Enabled if explicitly configured through VTY: */ + bool bts_use_jibuf_override; + bool bts_jitter_delay_min_override; + bool bts_jitter_delay_max_override; }; struct bsc_lac_entry { diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h index b2262bc8d..4d1c5ef47 100644 --- a/openbsc/include/openbsc/mgcp.h +++ b/openbsc/include/openbsc/mgcp.h @@ -236,6 +236,12 @@ struct mgcp_config { * message. */ uint16_t osmux_dummy; + + /* Use a jitterbuffer on the bts-side receiver */ + bool bts_use_jibuf; + /* Minimum and maximum buffer size for the jitter buffer, in ms */ + uint32_t bts_jitter_delay_min; + uint32_t bts_jitter_delay_max; }; /* config management */ diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h index 7c89d1021..cd6365f98 100644 --- a/openbsc/include/openbsc/mgcp_internal.h +++ b/openbsc/include/openbsc/mgcp_internal.h @@ -25,6 +25,7 @@ #include <string.h> #include <osmocom/core/select.h> +#include <osmocom/netif/jibuf.h> #define CI_UNUSED 0 @@ -205,6 +206,14 @@ struct mgcp_endpoint { uint32_t octets; } stats; } osmux; + + /* Jitter buffer */ + struct osmo_jibuf* bts_jb; + /* Use a jitterbuffer on the bts-side receiver */ + bool bts_use_jibuf; + /* Minimum and maximum buffer size for the jitter buffer, in ms */ + uint32_t bts_jitter_delay_min; + uint32_t bts_jitter_delay_max; }; #define for_each_line(line, save) \ @@ -340,3 +349,8 @@ static inline const char *mgcp_bts_src_addr(struct mgcp_endpoint *endp) return endp->cfg->bts_ports.bind_addr; return endp->cfg->source_addr; } + +/** + * Internal jitter buffer related + */ +void mgcp_dejitter_udp_send(struct msgb *msg, void *data); |