Browse Source

TT#14008 skip duplicate comparison of basic codec params

closes #1276

Change-Id: I82467a0f5ff502e1410bd1ed135b085a10eaca61
pull/1347/head
Richard Fuchs 5 years ago
parent
commit
46a3f7a3ac
2 changed files with 110 additions and 1 deletions
  1. +1
    -1
      lib/rtplib.c
  2. +109
    -0
      t/auto-daemon-tests.pl

+ 1
- 1
lib/rtplib.c View File

@ -161,7 +161,7 @@ int rtp_payload_type_cmp_nf(const struct rtp_payload_type *a, const struct rtp_p
return 1;
if (a->channels != b->channels)
return 1;
if (str_casecmp_str(&a->encoding_with_params, &b->encoding_with_params))
if (str_casecmp_str(&a->encoding, &b->encoding))
return 1;
return 0;
}

+ 109
- 0
t/auto-daemon-tests.pl View File

@ -40,6 +40,58 @@ my ($sock_a, $sock_b, $sock_c, $sock_d, $port_a, $port_b, $ssrc, $ssrc_b, $resp,
new_call;
offer('t/c and implicit number of channels',
{ codec => { transcode => ['opus','PCMA'] } }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 6000 RTP/AVP 0 102
c=IN IP4 198.51.100.20
a=rtpmap:102 opus/48000/1
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0 102 8
c=IN IP4 203.0.113.1
a=rtpmap:0 PCMU/8000
a=rtpmap:102 opus/48000/1
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtcp:PORT
SDP
answer('t/c and implicit number of channels',
{ }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 6002 RTP/AVP 102
c=IN IP4 198.51.100.20
a=rtpmap:102 opus/48000
a=ptime:20
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 102
c=IN IP4 203.0.113.1
a=rtpmap:102 opus/48000
a=sendrecv
a=rtcp:PORT
a=ptime:20
SDP
($sock_a, $sock_b) = new_call([qw(198.51.100.14 6008)], [qw(198.51.100.14 6010)]);
($port_a, undef, $srtp_key_a) = offer('CN passthrough',
@ -3022,6 +3074,63 @@ SDP
if ($amr_tests) {
new_call;
offer('t/c and implicit number of channels',
{ codec => { transcode => ['AMR','PCMA'] } }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 6000 RTP/AVP 0 102
c=IN IP4 198.51.100.20
a=rtpmap:102 AMR/8000/1
a=fmtp:102 mode-change-capability=2;max-red=0
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0 102 8
c=IN IP4 203.0.113.1
a=rtpmap:0 PCMU/8000
a=rtpmap:102 AMR/8000/1
a=fmtp:102 mode-change-capability=2;max-red=0
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtcp:PORT
SDP
answer('t/c and implicit number of channels',
{ }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 6002 RTP/AVP 102
c=IN IP4 198.51.100.20
a=rtpmap:102 AMR/8000
a=fmtp:102 octet-align=0; mode-set=7; max-red=0; mode-change-capability=2
a=ptime:20
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0 102
c=IN IP4 203.0.113.1
a=rtpmap:0 PCMU/8000
a=rtpmap:102 AMR/8000
a=fmtp:102 octet-align=0; mode-set=7; max-red=0; mode-change-capability=2
a=sendrecv
a=rtcp:PORT
a=ptime:20
SDP
# AMR-WB b2b transcoding
($sock_a, $sock_b) = new_call([qw(198.51.100.10 3062)], [qw(198.51.100.10 3064)]);


Loading…
Cancel
Save