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

Unified Diff: webrtc/audio/audio_send_stream.cc

Issue 2397573006: Using AudioOption to enable audio network adaptor. (Closed)
Patch Set: fixing a unittest 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
« no previous file with comments | « webrtc/api/call/audio_send_stream.cc ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/audio_send_stream.cc
diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc
index 5c08c9b8a2ce7cedc52bdd7ddf278b90eba138d1..51f90733432b51068a817eb7696617a59c448ba6 100644
--- a/webrtc/audio/audio_send_stream.cc
+++ b/webrtc/audio/audio_send_stream.cc
@@ -328,6 +328,20 @@ bool AudioSendStream::SetupSendCodec() {
return false;
}
}
+
+ if (config_.audio_network_adaptor_config) {
+ // 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);
+ channel_proxy_->EnableAudioNetworkAdaptor(
+ *config_.audio_network_adaptor_config);
+ LOG(LS_INFO) << "Audio network adaptor enabled on SSRC "
+ << config_.rtp.ssrc;
+ } else {
+ channel_proxy_->DisableAudioNetworkAdaptor();
+ }
}
// Set the CN payloadtype and the VAD status.
« no previous file with comments | « webrtc/api/call/audio_send_stream.cc ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698