summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-09-02 12:15:37 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-09-02 12:16:22 +0200
commit0454e32861b7e5b5d00b721d5dd8df3df46eb097 (patch)
tree2989088606dcf79215c7942a2bf5aa499d7266b6
parent5f4ef321a62a3a6aadc6a815f7f25d167a197911 (diff)
mgcp: Use l16 in the test
G729 might not be available, so execute the test with codecs that are always available.
-rw-r--r--openbsc/tests/mgcp/mgcp_transcoding_test.c14
-rw-r--r--openbsc/tests/mgcp/mgcp_transcoding_test.ok2
2 files changed, 8 insertions, 8 deletions
diff --git a/openbsc/tests/mgcp/mgcp_transcoding_test.c b/openbsc/tests/mgcp/mgcp_transcoding_test.c
index cf679b356..1dbdb51f9 100644
--- a/openbsc/tests/mgcp/mgcp_transcoding_test.c
+++ b/openbsc/tests/mgcp/mgcp_transcoding_test.c
@@ -449,17 +449,17 @@ static void test_transcode_change(void)
{
/* from GSM to PCMA and same ptime */
- printf("Testing Initial G729->GSM, PCMA->GSM\n");
- given_configured_endpoint(160, 0, "g729", "gsm", &ctx, &endp);
+ printf("Testing Initial L16->GSM, PCMA->GSM\n");
+ given_configured_endpoint(160, 0, "l16", "gsm", &ctx, &endp);
endp->net_end.alt_codec = endp->net_end.codec;
endp->net_end.alt_codec.payload_type = audio_name_to_type("pcma");
state = endp->bts_end.rtp_process_data;
/* initial transcoding work */
- OSMO_ASSERT(state->src_fmt == AF_G729);
+ OSMO_ASSERT(state->src_fmt == AF_L16);
OSMO_ASSERT(state->dst_fmt == AF_GSM);
OSMO_ASSERT(endp->net_end.alt_codec.payload_type == 8);
- OSMO_ASSERT(endp->net_end.codec.payload_type == 18);
+ OSMO_ASSERT(endp->net_end.codec.payload_type == 11);
/* result */
len = audio_packets_pcma[0].len;
@@ -469,7 +469,7 @@ static void test_transcode_change(void)
OSMO_ASSERT(state->sample_cnt == 0);
OSMO_ASSERT(state->src_fmt == AF_PCMA);
OSMO_ASSERT(state->dst_fmt == AF_GSM);
- OSMO_ASSERT(endp->net_end.alt_codec.payload_type == 18);
+ OSMO_ASSERT(endp->net_end.alt_codec.payload_type == 11);
OSMO_ASSERT(endp->net_end.codec.payload_type == 8);
len = res;
@@ -481,12 +481,12 @@ static void test_transcode_change(void)
len = audio_packets_pcma[1].len;
memcpy(buf, audio_packets_pcma[1].data, len);
hdr = (struct rtp_hdr *) buf;
- hdr->payload_type = 11;
+ hdr->payload_type = 12;
res = mgcp_transcoding_process_rtp(endp, &endp->bts_end, buf, &len, ARRAY_SIZE(buf));
OSMO_ASSERT(state->sample_cnt == 80);
OSMO_ASSERT(state->src_fmt == AF_PCMA);
OSMO_ASSERT(state->dst_fmt == AF_GSM);
- OSMO_ASSERT(endp->net_end.alt_codec.payload_type == 18);
+ OSMO_ASSERT(endp->net_end.alt_codec.payload_type == 11);
OSMO_ASSERT(endp->net_end.codec.payload_type == 8);
talloc_free(ctx);
diff --git a/openbsc/tests/mgcp/mgcp_transcoding_test.ok b/openbsc/tests/mgcp/mgcp_transcoding_test.ok
index 5cfc2897e..387cfd275 100644
--- a/openbsc/tests/mgcp/mgcp_transcoding_test.ok
+++ b/openbsc/tests/mgcp/mgcp_transcoding_test.ok
@@ -536,4 +536,4 @@ got 1 pcma output frames (80 octets) count=12
generating 160 pcma input samples
got 1 pcma output frames (80 octets) count=12
got 1 pcma output frames (80 octets) count=12
-Testing Initial G729->GSM, PCMA->GSM
+Testing Initial L16->GSM, PCMA->GSM