Stopped using the NetEqDecoder enum internally in NetEq.

NetEqDecoder is still used in the external interfaces, but this change
opens up the ability to use SdpAudioFormats directly, once appropriate
interfaces have been added.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2355503002
Cr-Commit-Position: refs/heads/master@{#14368}
This commit is contained in:
ossu
2016-09-23 02:19:43 -07:00
committed by Commit bot
parent 1490f7aa55
commit f1b08da5b4
17 changed files with 149 additions and 179 deletions

View File

@ -45,12 +45,12 @@ uint32_t TimestampScaler::ToInternal(uint32_t external_timestamp,
if (!(info->IsComfortNoise() || info->IsDtmf())) {
// Do not change the timestamp scaling settings for DTMF or CNG.
numerator_ = info->SampleRateHz();
if (info->codec_type == NetEqDecoder::kDecoderArbitrary) {
// We have no format mapping for "arbitrary" external codecs, so we cannot
// support timestamp scaling of them.
if (info->GetFormat().clockrate_hz == 0) {
// If the clockrate is invalid (i.e. with an old-style external codec)
// we cannot do any timestamp scaling.
denominator_ = numerator_;
} else {
denominator_ = info->GetFormat()->clockrate_hz;
denominator_ = info->GetFormat().clockrate_hz;
}
}
if (numerator_ != denominator_) {