Revert of Renaming AudioEncoder::SetTargetBitrate and SetProjectedPacketLossRate. (patchset #5 id:240001 of https://codereview.webrtc.org/2411613002/ )
Reason for revert: internal bot failure Original issue's description: > Renaming AudioEncoder::SetTargetBitrate and SetProjectedPacketLossRate. > > BUG=webrtc:6303 > > Committed: https://crrev.com/84e56d576806635c966093d5421c5d04c9b90746 > Cr-Commit-Position: refs/heads/master@{#15310} TBR=kwiberg@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:6303 Review-Url: https://codereview.webrtc.org/2537243004 Cr-Commit-Position: refs/heads/master@{#15312}
This commit is contained in:
@ -407,6 +407,12 @@ class RawAudioEncoderWrapper final : public AudioEncoder {
|
||||
void SetMaxPlaybackRate(int frequency_hz) override {
|
||||
return enc_->SetMaxPlaybackRate(frequency_hz);
|
||||
}
|
||||
void SetProjectedPacketLossRate(double fraction) override {
|
||||
return enc_->SetProjectedPacketLossRate(fraction);
|
||||
}
|
||||
void SetTargetBitrate(int target_bps) override {
|
||||
return enc_->SetTargetBitrate(target_bps);
|
||||
}
|
||||
|
||||
private:
|
||||
AudioEncoder* enc_;
|
||||
@ -648,7 +654,7 @@ int AudioCodingModuleImpl::SendFrequency() const {
|
||||
void AudioCodingModuleImpl::SetBitRate(int bitrate_bps) {
|
||||
rtc::CritScope lock(&acm_crit_sect_);
|
||||
if (encoder_stack_) {
|
||||
encoder_stack_->OnReceivedTargetAudioBitrate(bitrate_bps);
|
||||
encoder_stack_->SetTargetBitrate(bitrate_bps);
|
||||
}
|
||||
}
|
||||
|
||||
@ -900,7 +906,7 @@ int AudioCodingModuleImpl::SetCodecFEC(bool enable_codec_fec) {
|
||||
int AudioCodingModuleImpl::SetPacketLossRate(int loss_rate) {
|
||||
rtc::CritScope lock(&acm_crit_sect_);
|
||||
if (HaveValidEncoder("SetPacketLossRate")) {
|
||||
encoder_stack_->OnReceivedUplinkPacketLossFraction(loss_rate / 100.0);
|
||||
encoder_stack_->SetProjectedPacketLossRate(loss_rate / 100.0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user