Revert of AcmReceiver: Look up last decoder in NetEq's table of decoders (patchset #1 id:100001 of https://codereview.webrtc.org/2339953002/ )

Reason for revert:
Seems to have broken Chromium tests.

Original issue's description:
> AcmReceiver: Look up last decoder in NetEq's table of decoders
>
> AcmReceiver::decoders_ is now one step closer to being unused.
>
> BUG=webrtc:5801
>
> Committed: https://crrev.com/1e4d8b574cde64d93b98d89c7b817fb93185a307
> Cr-Commit-Position: refs/heads/master@{#14274}

TBR=ossu@webrtc.org,henrik.lundin@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2348123002
Cr-Commit-Position: refs/heads/master@{#14279}
This commit is contained in:
kwiberg
2016-09-18 05:35:52 -07:00
committed by Commit bot
parent bfb78d1293
commit 7a0f2c55f5
6 changed files with 66 additions and 65 deletions

View File

@ -431,27 +431,6 @@ int NetEqImpl::last_output_sample_rate_hz() const {
return last_output_sample_rate_hz_;
}
rtc::Optional<CodecInst> NetEqImpl::GetDecoder(int payload_type) const {
rtc::CritScope lock(&crit_sect_);
const DecoderDatabase::DecoderInfo* di =
decoder_database_->GetDecoderInfo(payload_type);
if (!di) {
return rtc::Optional<CodecInst>();
}
// Create a CodecInst with some fields set. The remaining fields are zeroed,
// but we tell MSan to consider them uninitialized.
CodecInst ci = {0};
rtc::MsanMarkUninitialized(rtc::MakeArrayView(&ci, 1));
ci.pltype = payload_type;
std::strncpy(ci.plname, di->name.c_str(), sizeof(ci.plname));
ci.plname[sizeof(ci.plname) - 1] = '\0';
ci.plfreq = di->IsRed() || di->IsDtmf() ? 8000 : di->SampleRateHz();
AudioDecoder* const decoder = di->GetDecoder();
ci.channels = decoder ? decoder->Channels() : 1;
return rtc::Optional<CodecInst>(ci);
}
int NetEqImpl::SetTargetNumberOfChannels() {
return kNotImplemented;
}