red: assign payload type 63 to audio/RED for opus
Starting new audio codecs from the top of the lower range
reduces collisions with video codecs which are assigned from
the bottom of the lower range
BUG=webrtc:11640
Change-Id: If6d2b849b8e1de777a1d4352df533e4f1845fde9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220022
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34166}
diff --git a/media/engine/payload_type_mapper.cc b/media/engine/payload_type_mapper.cc
index 4c46975..cbc0a53 100644
--- a/media/engine/payload_type_mapper.cc
+++ b/media/engine/payload_type_mapper.cc
@@ -72,6 +72,8 @@
{{kCodecParamMinPTime, "10"},
{kCodecParamUseInbandFec, kParamValueTrue}}},
111},
+ // RED for opus is assigned in the lower range, starting at the top.
+ {{kRedCodecName, 48000, 2}, 63},
// TODO(solenberg): Remove the hard coded 16k,32k,48k DTMF once we
// assign payload types dynamically for send side as well.
{{kDtmfCodecName, 48000, 1}, 110},
diff --git a/media/engine/payload_type_mapper_unittest.cc b/media/engine/payload_type_mapper_unittest.cc
index 9361f76..9c29827 100644
--- a/media/engine/payload_type_mapper_unittest.cc
+++ b/media/engine/payload_type_mapper_unittest.cc
@@ -58,6 +58,7 @@
48000,
2,
{{"minptime", "10"}, {"useinbandfec", "1"}}}));
+ EXPECT_EQ(63, mapper_.FindMappingFor({kRedCodecName, 48000, 2}));
// TODO(solenberg): Remove 16k, 32k, 48k DTMF checks once these payload types
// are dynamically assigned.
EXPECT_EQ(110, mapper_.FindMappingFor({kDtmfCodecName, 48000, 1}));