red: pass through calls to underlying encoder
BUG=webrtc:11640 Change-Id: I87e6f7c91c80d61e64127574485bbdcaedc8120c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181063 Reviewed-by: Minyue Li <minyue@webrtc.org> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com> Cr-Commit-Position: refs/heads/master@{#33595}
This commit is contained in:

committed by
Commit Bot

parent
eca855197a
commit
883fea1548
@ -182,6 +182,10 @@ bool AudioEncoderCopyRed::SetDtx(bool enable) {
|
||||
return speech_encoder_->SetDtx(enable);
|
||||
}
|
||||
|
||||
bool AudioEncoderCopyRed::GetDtx() const {
|
||||
return speech_encoder_->GetDtx();
|
||||
}
|
||||
|
||||
bool AudioEncoderCopyRed::SetApplication(Application application) {
|
||||
return speech_encoder_->SetApplication(application);
|
||||
}
|
||||
@ -190,9 +194,14 @@ void AudioEncoderCopyRed::SetMaxPlaybackRate(int frequency_hz) {
|
||||
speech_encoder_->SetMaxPlaybackRate(frequency_hz);
|
||||
}
|
||||
|
||||
rtc::ArrayView<std::unique_ptr<AudioEncoder>>
|
||||
AudioEncoderCopyRed::ReclaimContainedEncoders() {
|
||||
return rtc::ArrayView<std::unique_ptr<AudioEncoder>>(&speech_encoder_, 1);
|
||||
bool AudioEncoderCopyRed::EnableAudioNetworkAdaptor(
|
||||
const std::string& config_string,
|
||||
RtcEventLog* event_log) {
|
||||
return speech_encoder_->EnableAudioNetworkAdaptor(config_string, event_log);
|
||||
}
|
||||
|
||||
void AudioEncoderCopyRed::DisableAudioNetworkAdaptor() {
|
||||
speech_encoder_->DisableAudioNetworkAdaptor();
|
||||
}
|
||||
|
||||
void AudioEncoderCopyRed::OnReceivedUplinkPacketLossFraction(
|
||||
@ -208,14 +217,38 @@ void AudioEncoderCopyRed::OnReceivedUplinkBandwidth(
|
||||
bwe_period_ms);
|
||||
}
|
||||
|
||||
void AudioEncoderCopyRed::OnReceivedUplinkAllocation(
|
||||
BitrateAllocationUpdate update) {
|
||||
speech_encoder_->OnReceivedUplinkAllocation(update);
|
||||
}
|
||||
|
||||
absl::optional<std::pair<TimeDelta, TimeDelta>>
|
||||
AudioEncoderCopyRed::GetFrameLengthRange() const {
|
||||
return speech_encoder_->GetFrameLengthRange();
|
||||
}
|
||||
|
||||
void AudioEncoderCopyRed::OnReceivedRtt(int rtt_ms) {
|
||||
speech_encoder_->OnReceivedRtt(rtt_ms);
|
||||
}
|
||||
|
||||
void AudioEncoderCopyRed::OnReceivedOverhead(size_t overhead_bytes_per_packet) {
|
||||
max_packet_length_ = kAudioMaxRtpPacketLen - overhead_bytes_per_packet;
|
||||
return speech_encoder_->OnReceivedOverhead(overhead_bytes_per_packet);
|
||||
}
|
||||
|
||||
void AudioEncoderCopyRed::SetReceiverFrameLengthRange(int min_frame_length_ms,
|
||||
int max_frame_length_ms) {
|
||||
return speech_encoder_->SetReceiverFrameLengthRange(min_frame_length_ms,
|
||||
max_frame_length_ms);
|
||||
}
|
||||
|
||||
ANAStats AudioEncoderCopyRed::GetANAStats() const {
|
||||
return speech_encoder_->GetANAStats();
|
||||
}
|
||||
|
||||
rtc::ArrayView<std::unique_ptr<AudioEncoder>>
|
||||
AudioEncoderCopyRed::ReclaimContainedEncoders() {
|
||||
return rtc::ArrayView<std::unique_ptr<AudioEncoder>>(&speech_encoder_, 1);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
@ -50,21 +50,33 @@ class AudioEncoderCopyRed final : public AudioEncoder {
|
||||
size_t Num10MsFramesInNextPacket() const override;
|
||||
size_t Max10MsFramesInAPacket() const override;
|
||||
int GetTargetBitrate() const override;
|
||||
|
||||
void Reset() override;
|
||||
bool SetFec(bool enable) override;
|
||||
|
||||
bool SetDtx(bool enable) override;
|
||||
bool GetDtx() const override;
|
||||
|
||||
bool SetApplication(Application application) override;
|
||||
void SetMaxPlaybackRate(int frequency_hz) override;
|
||||
rtc::ArrayView<std::unique_ptr<AudioEncoder>> ReclaimContainedEncoders()
|
||||
override;
|
||||
bool EnableAudioNetworkAdaptor(const std::string& config_string,
|
||||
RtcEventLog* event_log) override;
|
||||
void DisableAudioNetworkAdaptor() override;
|
||||
void OnReceivedUplinkPacketLossFraction(
|
||||
float uplink_packet_loss_fraction) override;
|
||||
void OnReceivedUplinkBandwidth(
|
||||
int target_audio_bitrate_bps,
|
||||
absl::optional<int64_t> bwe_period_ms) override;
|
||||
void OnReceivedUplinkAllocation(BitrateAllocationUpdate update) override;
|
||||
void OnReceivedRtt(int rtt_ms) override;
|
||||
void OnReceivedOverhead(size_t overhead_bytes_per_packet) override;
|
||||
void SetReceiverFrameLengthRange(int min_frame_length_ms,
|
||||
int max_frame_length_ms) override;
|
||||
ANAStats GetANAStats() const override;
|
||||
absl::optional<std::pair<TimeDelta, TimeDelta>> GetFrameLengthRange()
|
||||
const override;
|
||||
rtc::ArrayView<std::unique_ptr<AudioEncoder>> ReclaimContainedEncoders()
|
||||
override;
|
||||
|
||||
protected:
|
||||
EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
|
||||
|
Reference in New Issue
Block a user