Voe::Channel: Turned GetPlayoutFrequency into GetRtpTimestampRateHz.
This gets rid of a bit of codec-specific code in VoE. BUG=webrtc:5805 Review-Url: https://codereview.webrtc.org/2355483003 Cr-Commit-Position: refs/heads/master@{#14614}
This commit is contained in:
@ -98,6 +98,8 @@ int AcmReceiver::InsertPacket(const WebRtcRTPHeader& rtp_header,
|
||||
}
|
||||
} else {
|
||||
last_audio_decoder_ = ci;
|
||||
last_audio_format_ = neteq_->GetDecoderFormat(ci->pltype);
|
||||
RTC_DCHECK(last_audio_format_);
|
||||
last_packet_sample_rate_hz_ = rtc::Optional<int>(ci->plfreq);
|
||||
}
|
||||
|
||||
@ -263,6 +265,7 @@ void AcmReceiver::RemoveAllCodecs() {
|
||||
rtc::CritScope lock(&crit_sect_);
|
||||
neteq_->RemoveAllPayloadTypes();
|
||||
last_audio_decoder_ = rtc::Optional<CodecInst>();
|
||||
last_audio_format_ = rtc::Optional<SdpAudioFormat>();
|
||||
last_packet_sample_rate_hz_ = rtc::Optional<int>();
|
||||
}
|
||||
|
||||
@ -275,6 +278,7 @@ int AcmReceiver::RemoveCodec(uint8_t payload_type) {
|
||||
}
|
||||
if (last_audio_decoder_ && payload_type == last_audio_decoder_->pltype) {
|
||||
last_audio_decoder_ = rtc::Optional<CodecInst>();
|
||||
last_audio_format_ = rtc::Optional<SdpAudioFormat>();
|
||||
last_packet_sample_rate_hz_ = rtc::Optional<int>();
|
||||
}
|
||||
return 0;
|
||||
@ -297,6 +301,11 @@ int AcmReceiver::LastAudioCodec(CodecInst* codec) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
rtc::Optional<SdpAudioFormat> AcmReceiver::LastAudioFormat() const {
|
||||
rtc::CritScope lock(&crit_sect_);
|
||||
return last_audio_format_;
|
||||
}
|
||||
|
||||
void AcmReceiver::GetNetworkStatistics(NetworkStatistics* acm_stat) {
|
||||
NetEqNetworkStatistics neteq_stat;
|
||||
// NetEq function always returns zero, so we don't check the return value.
|
||||
|
||||
Reference in New Issue
Block a user