Skip to content

Commit b0e91c7

Browse files
committed
Add support for a=extmap-allow-mixed (RFC 8285)
1 parent 9af269c commit b0e91c7

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

src/grammar.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,22 @@ namespace sdptransform
443443
}
444444
},
445445

446+
// a=extmap-allow-mixed
447+
{
448+
// name:
449+
"extmapAllowMixed",
450+
// push:
451+
"",
452+
// reg:
453+
std::regex("^(extmap-allow-mixed)"),
454+
// names:
455+
{ },
456+
// types:
457+
{ 's' },
458+
// format:
459+
"%s"
460+
},
461+
446462
// a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|2^20|1:32
447463
{
448464
// name:

test/data/normal.sdp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ a=rtpmap:0 PCMU/8000
1111
a=rtpmap:96 opus/48000
1212
a=extmap:1 URI-toffset
1313
a=extmap:2/recvonly URI-gps-string
14+
a=extmap-allow-mixed
1415
a=ptime:20
1516
a=sendrecv
1617
a=candidate:0 1 UDP 2113667327 203.0.113.1 54400 typ host

test/parse.test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ SCENARIO("normalSdp", "[parse]")
7070
"uri" : "URI-gps-string"
7171
})"_json
7272
);
73+
REQUIRE(audio.at("extmapAllowMixed") == "extmap-allow-mixed");
7374

7475
auto& video = media[1];
7576
auto videoPayloads = sdptransform::parsePayloads(video.at("payloads"));

0 commit comments

Comments
 (0)