| Index: webrtc/voice_engine/channel_proxy.cc
|
| diff --git a/webrtc/voice_engine/channel_proxy.cc b/webrtc/voice_engine/channel_proxy.cc
|
| index ac96fe98d38e738480c21252ea33e70cc5c05f34..7c9243601e8ad5317c7767f04c760585c84b7071 100644
|
| --- a/webrtc/voice_engine/channel_proxy.cc
|
| +++ b/webrtc/voice_engine/channel_proxy.cc
|
| @@ -36,6 +36,12 @@ bool ChannelProxy::SetEncoder(int payload_type,
|
| return channel()->SetEncoder(payload_type, std::move(encoder));
|
| }
|
|
|
| +void ChannelProxy::ModifyEncoder(
|
| + rtc::FunctionView<void(std::unique_ptr<AudioEncoder>*)> modifier) {
|
| + RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
| + channel()->ModifyEncoder(modifier);
|
| +}
|
| +
|
| void ChannelProxy::SetRTCPStatus(bool enable) {
|
| RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
| channel()->SetRTCPStatus(enable);
|
| @@ -235,24 +241,6 @@ void ChannelProxy::SetRtcEventLog(RtcEventLog* event_log) {
|
| channel()->SetRtcEventLog(event_log);
|
| }
|
|
|
| -void ChannelProxy::EnableAudioNetworkAdaptor(const std::string& config_string) {
|
| - RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
| - bool ret = channel()->EnableAudioNetworkAdaptor(config_string);
|
| - RTC_DCHECK(ret);
|
| -;}
|
| -
|
| -void ChannelProxy::DisableAudioNetworkAdaptor() {
|
| - RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
| - channel()->DisableAudioNetworkAdaptor();
|
| -}
|
| -
|
| -void ChannelProxy::SetReceiverFrameLengthRange(int min_frame_length_ms,
|
| - int max_frame_length_ms) {
|
| - RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
| - channel()->SetReceiverFrameLengthRange(min_frame_length_ms,
|
| - max_frame_length_ms);
|
| -}
|
| -
|
| AudioMixer::Source::AudioFrameInfo ChannelProxy::GetAudioFrameWithInfo(
|
| int sample_rate_hz,
|
| AudioFrame* audio_frame) {
|
| @@ -319,69 +307,6 @@ bool ChannelProxy::GetRecCodec(CodecInst* codec_inst) const {
|
| return channel()->GetRecCodec(*codec_inst) == 0;
|
| }
|
|
|
| -bool ChannelProxy::GetSendCodec(CodecInst* codec_inst) const {
|
| - RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
| - return channel()->GetSendCodec(*codec_inst) == 0;
|
| -}
|
| -
|
| -bool ChannelProxy::SetVADStatus(bool enable) {
|
| - RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
| - return channel()->SetVADStatus(enable, VADNormal, false) == 0;
|
| -}
|
| -
|
| -bool ChannelProxy::SetCodecFECStatus(bool enable) {
|
| - RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
| - return channel()->SetCodecFECStatus(enable) == 0;
|
| -}
|
| -
|
| -bool ChannelProxy::SetOpusDtx(bool enable) {
|
| - RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
| - return channel()->SetOpusDtx(enable) == 0;
|
| -}
|
| -
|
| -bool ChannelProxy::SetOpusMaxPlaybackRate(int frequency_hz) {
|
| - RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
| - return channel()->SetOpusMaxPlaybackRate(frequency_hz) == 0;
|
| -}
|
| -
|
| -bool ChannelProxy::SetSendCodec(const CodecInst& codec_inst) {
|
| - RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
| - // Validation code copied from VoECodecImpl::SetSendCodec().
|
| - if ((STR_CASE_CMP(codec_inst.plname, "L16") == 0) &&
|
| - (codec_inst.pacsize >= 960)) {
|
| - return false;
|
| - }
|
| - if (!STR_CASE_CMP(codec_inst.plname, "CN") ||
|
| - !STR_CASE_CMP(codec_inst.plname, "TELEPHONE-EVENT") ||
|
| - !STR_CASE_CMP(codec_inst.plname, "RED")) {
|
| - return false;
|
| - }
|
| - if ((codec_inst.channels != 1) && (codec_inst.channels != 2)) {
|
| - return false;
|
| - }
|
| - if (!AudioCodingModule::IsCodecValid(codec_inst)) {
|
| - return false;
|
| - }
|
| - return channel()->SetSendCodec(codec_inst) == 0;
|
| -}
|
| -
|
| -bool ChannelProxy::SetSendCNPayloadType(int type,
|
| - PayloadFrequencies frequency) {
|
| - RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
| - // Validation code copied from VoECodecImpl::SetSendCNPayloadType().
|
| - if (type < 96 || type > 127) {
|
| - // Only allow dynamic range: 96 to 127
|
| - return false;
|
| - }
|
| - if ((frequency != kFreq16000Hz) && (frequency != kFreq32000Hz)) {
|
| - // It is not possible to modify the payload type for CN/8000.
|
| - // We only allow modification of the CN payload type for CN/16000
|
| - // and CN/32000.
|
| - return false;
|
| - }
|
| - return channel()->SetSendCNPayloadType(type, frequency) == 0;
|
| -}
|
| -
|
| void ChannelProxy::OnTwccBasedUplinkPacketLossRate(float packet_loss_rate) {
|
| // TODO(elad.alon): This fails in UT; fix and uncomment.
|
| // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=7405
|
|
|