Chromium Code Reviews| Index: webrtc/audio/audio_send_stream.cc |
| diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc |
| index fbed0f12af09281f57adc8620a3de708d1bb5a63..b321369ec1c17b34413532915423a395ac205f08 100644 |
| --- a/webrtc/audio/audio_send_stream.cc |
| +++ b/webrtc/audio/audio_send_stream.cc |
| @@ -387,6 +387,24 @@ bool AudioSendStream::SetupSendCodec() { |
| return false; |
| } |
| } |
| + |
| + if (config_.audio_network_adaptor_config) { |
|
the sun
2016/10/25 09:25:46
Is the invariant that max/min_ptime_ms must be set
minyue-webrtc
2016/10/27 14:33:10
They are parsed from SDP. This is checked down in
|
| + // Audio network adaptor is only allowed for Opus currently. |
| + // |SetReceiverFrameLengthRange| needs to be called before |
| + // |EnableAudioNetworkAdaptor|. |
| + channel_proxy_->SetReceiverFrameLengthRange(send_codec_spec.min_ptime_ms, |
| + send_codec_spec.max_ptime_ms); |
| + if (!channel_proxy_->EnableAudioNetworkAdaptor( |
| + *config_.audio_network_adaptor_config)) { |
| + LOG(LS_ERROR) << "Audio network adaptor cannot be enabled on SSRC " |
| + << config_.rtp.ssrc; |
| + return false; |
| + } |
| + LOG(LS_INFO) << "Audio network adaptor enabled on SSRC " |
| + << config_.rtp.ssrc; |
| + } else { |
| + channel_proxy_->DisableAudioNetworkAdaptor(); |
| + } |
| } |
| // Set the CN payloadtype and the VAD status. |