mgcp: Add a testcase for 160->80 ptime handling
This commit is contained in:
parent
c8b29083d2
commit
4c18d79475
|
@ -342,6 +342,25 @@ static void test_transcode_result(void)
|
|||
talloc_free(ctx);
|
||||
}
|
||||
|
||||
{
|
||||
/* from GSM to PCMA and same ptime */
|
||||
given_configured_endpoint(160, 160, "gsm", "pcma", &ctx, &endp);
|
||||
state = endp->bts_end.rtp_process_data;
|
||||
|
||||
/* result */
|
||||
len = audio_packets_gsm[0].len;
|
||||
memcpy(buf, audio_packets_gsm[0].data, len);
|
||||
res = mgcp_transcoding_process_rtp(endp, &endp->bts_end, buf, &len, ARRAY_SIZE(buf));
|
||||
OSMO_ASSERT(res == sizeof(struct rtp_hdr));
|
||||
OSMO_ASSERT(state->sample_cnt == 0);
|
||||
|
||||
len = res;
|
||||
res = mgcp_transcoding_process_rtp(endp, &endp->bts_end, buf, &len, ARRAY_SIZE(buf));
|
||||
OSMO_ASSERT(res == -EAGAIN);
|
||||
|
||||
talloc_free(ctx);
|
||||
}
|
||||
|
||||
{
|
||||
/* from PCMA to GSM and wrong different ptime */
|
||||
given_configured_endpoint(80, 160, "pcma", "gsm", &ctx, &endp);
|
||||
|
|
Loading…
Reference in New Issue