TimestampScaler no longer depends on NetEqDecoder to figure out scaling.
This is still a tiny lie, since it checks for kCodecArbitrary to avoid scaling a codec with an external decoder, because of missing information in that case. The main point is still true, though. Once the next CL is in, removing NetEqDecoder usage completely in DecoderDatabase, another workaround will be in place for external decoders until we can fully deprecate them. BUG=webrtc:5805 Review-Url: https://codereview.webrtc.org/2270063006 Cr-Commit-Position: refs/heads/master@{#13952}
This commit is contained in:
@ -59,10 +59,14 @@ class DecoderDatabase {
|
||||
void DropDecoder() const { decoder_.reset(); }
|
||||
|
||||
int SampleRateHz() const {
|
||||
RTC_DCHECK_EQ(1, !!decoder_ + !!external_decoder_ + !!cng_decoder_);
|
||||
return decoder_ ? decoder_->SampleRateHz()
|
||||
: external_decoder_ ? external_decoder_->SampleRateHz()
|
||||
: cng_decoder_->sample_rate_hz;
|
||||
const AudioDecoder* decoder = GetDecoder();
|
||||
RTC_DCHECK_EQ(1, !!decoder + !!cng_decoder_);
|
||||
return decoder ? decoder->SampleRateHz() : cng_decoder_->sample_rate_hz;
|
||||
}
|
||||
|
||||
const SdpAudioFormat& GetFormat() const {
|
||||
RTC_DCHECK(audio_format_);
|
||||
return *audio_format_;
|
||||
}
|
||||
|
||||
// Returns true if |codec_type| is comfort noise.
|
||||
|
||||
Reference in New Issue
Block a user