Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Unified Diff: webrtc/audio/audio_send_stream.cc

Issue 2397573006: Using AudioOption to enable audio network adaptor. (Closed)
Patch Set: fixing some problems Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698