red: add red closer to opus in the SDP

this makes the association between opus and red a bit more obvious.
Also it allows access to the opus payload type which might be
used in the fmtp line in a future CL

BUG=webrtc:11640

Change-Id: I04e0648aedf049d103e3c3481c8712dfc9b79538
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178800
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31868}
This commit is contained in:
Philipp Hancke 2020-07-06 22:30:16 +02:00 committed by Commit Bot
parent 9dcab80617
commit 1126a186f6

View File

@ -722,6 +722,11 @@ std::vector<AudioCodec> WebRtcVoiceEngine::CollectCodecs(
}
out.push_back(codec);
if (codec.name == kOpusCodecName &&
IsAudioRedForOpusFieldTrialEnabled()) {
map_format({kRedCodecName, 48000, 2}, &out);
}
}
}
@ -732,11 +737,6 @@ std::vector<AudioCodec> WebRtcVoiceEngine::CollectCodecs(
}
}
// Add red codec.
if (IsAudioRedForOpusFieldTrialEnabled()) {
map_format({kRedCodecName, 48000, 2}, &out);
}
// Add telephone-event codecs last.
for (const auto& dtmf : generate_dtmf) {
if (dtmf.second) {