From d0b136de735abcd5a7cce83d889adfaf34743375 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 15 Aug 2024 09:35:22 -0400 Subject: [PATCH] MT#55283 add tests for play_media codec-set Change-Id: I14a53d8ad24c7329c57950784fa907475d56f958 --- t/auto-daemon-tests.pl | 215 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 215 insertions(+) diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 11c824586..7541f7cf6 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -82,6 +82,221 @@ sub stun_succ { +if ($extended_tests) { + +($sock_a, $sock_b) = new_call([qw(198.51.100.45 6060)], [qw(198.51.100.45 6062)]); + +($port_a) = offer('AMR play media bit rate control', + { codec => { } }, < { } }, < ft(), blob => $wav_file }); +is $resp->{duration}, 100, 'media duration'; + +# receive mode 3 +($seq, $ts, $ssrc) = rcv($sock_a, $port_b, rtpm(96 | 0x80, -1, -1, -1, "\xf0\x1c\xfc\xce\x67\x32\x83\x15\x62\xbe\x89\x42\xed\xdd\x82\xd4\xb5\x63\x35\x34\x44\x44\x76\x86\xb5\x76\x4c\xd4\x54\x44\x8c\xcd\xce\xc5\x74\x47\x2f\xe8")); + + + + +($sock_a, $sock_b) = new_call([qw(198.51.100.45 6064)], [qw(198.51.100.45 6066)]); + +($port_a) = offer('AMR play media bit rate highest mode', + { codec => { } }, < { } }, < ft(), blob => $wav_file, + codec => { set => [qw,AMR/8000/1/12200 AMR-WB/16000/1/23850,] }, + }); +is $resp->{duration}, 100, 'media duration'; + +# receive mode 8 +($seq, $ts, $ssrc) = rcv($sock_a, $port_b, rtpm(96 | 0x80, -1, -1, -1, "\xf0\x44\xfa\xce\x55\xb2\x8f\x39\x12\xbe\x89\xf0\x00\x44\x6d\xdd\xa2\xf0\x03\x18\x61\x10\x19\xd0\x18\x0a\x0c\x21\xba\x06\xc2\x24\x00\x24\xcc\x10\x8c\xfb\x43\xcf\x01\x39\x5b\x65\x04\x01\x73\x14\x1c\xbc\xd1\x9c\x70\xe5\x6e\x16\x16\x17\xd4\x71\xff\xc0")); + + + + + +($sock_a, $sock_b) = new_call([qw(198.51.100.45 6068)], [qw(198.51.100.45 6066)]); + +($port_a) = offer('AMR play media bit rate lower mode', + { codec => { } }, < { } }, < ft(), blob => $wav_file, + codec => { set => [qw,AMR/8000/1/12200 AMR-WB/16000/1/23850,] }, + }); +is $resp->{duration}, 100, 'media duration'; + +# receive mode 7 +($seq, $ts, $ssrc) = rcv($sock_a, $port_b, rtpm(96 | 0x80, -1, -1, -1, "\xf0\x3c\xfa\xce\x55\xb2\x8f\x39\x12\xbe\x89\x44\x6d\xdd\xa2\xf0\x03\x18\x61\x10\x19\xd0\x18\x0a\x0c\x21\xba\x06\xc2\x24\x00\x24\xcc\x10\x8c\xfb\x43\xcf\x01\x39\x5b\x65\x04\x01\x73\x14\x1c\xbc\xd1\x9c\x70\xe5\x6e\x16\x16\x17\xd4\x71\xff\xc0")); + + +} + + + new_call; offer('mismatched t-e control', { }, <