aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp/mgcp_network.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-07 21:12:32 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-07 21:50:47 +0100
commit2c8dfd8b7ca8546d063cbed7f3881f863f1f0a65 (patch)
tree646f5e3221f6bf5893034394f7568766adec1a32 /openbsc/src/libmgcp/mgcp_network.c
parent51273157fa18034349d6ac1395c6d43e80cc07c0 (diff)
mgcp: Move the transcoding routines into a struct
We will have the NOOP implementation (e.g. used by the NAT), the SW implementation (using software codecs), a HW assisted one that will use a DSP to do transcoding and in theory the RTP based one (but I will remove that code).
Diffstat (limited to 'openbsc/src/libmgcp/mgcp_network.c')
-rw-r--r--openbsc/src/libmgcp/mgcp_network.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c
index abce6e49d..e4f5f7d5c 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -584,6 +584,7 @@ int mgcp_send(struct mgcp_endpoint *endp, int dest, int is_rtp,
struct sockaddr_in *addr, char *buf, int rc)
{
struct mgcp_trunk_config *tcfg = endp->tcfg;
+ const struct mgcp_transcoding *trans = tcfg->transcoder;
struct mgcp_rtp_end *rtp_end;
struct mgcp_rtp_state *rtp_state;
int tap_idx;
@@ -613,7 +614,7 @@ int mgcp_send(struct mgcp_endpoint *endp, int dest, int is_rtp,
int nbytes = 0;
int len = rc;
do {
- cont = endp->cfg->rtp_processing_cb(endp, rtp_end,
+ cont = trans->processing_cb(endp, rtp_end,
buf, &len, RTP_BUF_SIZE);
if (cont < 0)
break;