Revert of WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType (patchset #13 id:260001 of https://codereview.webrtc.org/2686043006/ )
Reason for revert:
Makes perf and Chromium FYI bots unhappy.
Original issue's description:
> WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType
>
> This removes one more place where we were unable to handle codecs not
> in the built-in set.
>
> BUG=webrtc:5805
>
> Review-Url: https://codereview.webrtc.org/2686043006
> Cr-Commit-Position: refs/heads/master@{#17370}
> Committed: 1724cfbdba
TBR=ossu@webrtc.org,solenberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5805
Review-Url: https://codereview.webrtc.org/2772043002
Cr-Commit-Position: refs/heads/master@{#17374}
This commit is contained in:
@ -123,38 +123,6 @@ void DecoderDatabase::Reset() {
|
||||
active_cng_decoder_type_ = -1;
|
||||
}
|
||||
|
||||
std::vector<int> DecoderDatabase::SetCodecs(
|
||||
const std::map<int, SdpAudioFormat>& codecs) {
|
||||
// First collect all payload types that we'll remove or reassign, then remove
|
||||
// them from the database.
|
||||
std::vector<int> changed_payload_types;
|
||||
for (const std::pair<uint8_t, const DecoderInfo&> kv : decoders_) {
|
||||
auto i = codecs.find(kv.first);
|
||||
if (i == codecs.end() || i->second != kv.second.GetFormat()) {
|
||||
changed_payload_types.push_back(kv.first);
|
||||
}
|
||||
}
|
||||
for (int pl_type : changed_payload_types) {
|
||||
Remove(pl_type);
|
||||
}
|
||||
|
||||
// Enter the new and changed payload type mappings into the database.
|
||||
for (const auto& kv : codecs) {
|
||||
const int& rtp_payload_type = kv.first;
|
||||
const SdpAudioFormat& audio_format = kv.second;
|
||||
RTC_DCHECK_GE(rtp_payload_type, 0);
|
||||
RTC_DCHECK_LE(rtp_payload_type, 0x7f);
|
||||
if (decoders_.count(rtp_payload_type) == 0) {
|
||||
decoders_.insert(std::make_pair(
|
||||
rtp_payload_type, DecoderInfo(audio_format, decoder_factory_.get())));
|
||||
} else {
|
||||
// The mapping for this payload type hasn't changed.
|
||||
}
|
||||
}
|
||||
|
||||
return changed_payload_types;
|
||||
}
|
||||
|
||||
int DecoderDatabase::RegisterPayload(uint8_t rtp_payload_type,
|
||||
NetEqDecoder codec_type,
|
||||
const std::string& name) {
|
||||
|
||||
Reference in New Issue
Block a user