summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llwebrtc/llwebrtc.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index a73962f3d6..ced90d0130 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -246,10 +246,10 @@ void LLWebRTCImpl::init()
apm_config.gain_controller1.enabled = false;
apm_config.gain_controller1.mode = webrtc::AudioProcessing::Config::GainController1::kAdaptiveAnalog;
apm_config.gain_controller2.enabled = false;
- apm_config.high_pass_filter.enabled = true;
+ apm_config.high_pass_filter.enabled = false;
apm_config.noise_suppression.enabled = true;
apm_config.noise_suppression.level = webrtc::AudioProcessing::Config::NoiseSuppression::kVeryHigh;
- apm_config.transient_suppression.enabled = true;
+ apm_config.transient_suppression.enabled = false;
apm_config.pipeline.multi_channel_render = true;
apm_config.pipeline.multi_channel_capture = false;
@@ -366,11 +366,10 @@ void LLWebRTCImpl::setAudioConfig(LLWebRTCDeviceInterface::AudioConfig config)
apm_config.gain_controller1.enabled = config.mAGC;
apm_config.gain_controller1.mode = webrtc::AudioProcessing::Config::GainController1::kAdaptiveAnalog;
apm_config.gain_controller2.enabled = false;
- apm_config.high_pass_filter.enabled = true;
- apm_config.transient_suppression.enabled = true;
+ apm_config.high_pass_filter.enabled = false;
+ apm_config.transient_suppression.enabled = false;
apm_config.pipeline.multi_channel_render = true;
apm_config.pipeline.multi_channel_capture = true;
- apm_config.pipeline.multi_channel_capture = true;
switch (config.mNoiseSuppressionLevel)
{
@@ -750,7 +749,7 @@ void LLWebRTCPeerConnectionImpl::init(LLWebRTCImpl * webrtc_impl)
}
void LLWebRTCPeerConnectionImpl::terminate()
{
- mWebRTCImpl->SignalingBlockingCall(
+ mWebRTCImpl->PostSignalingTask(
[this]()
{
if (mPeerConnection)
@@ -875,6 +874,13 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection(const LLWebRTCPeerConnecti
codecparam.parameters["stereo"] = "1";
codecparam.parameters["sprop-stereo"] = "1";
params.codecs.push_back(codecparam);
+
+ // Fixed bitrates result in lower CPU cost
+ for (auto&& encoding : params.encodings)
+ {
+ encoding.max_bitrate_bps = 64000;
+ encoding.min_bitrate_bps = 64000;
+ }
sender->SetParameters(params);
}
@@ -959,7 +965,7 @@ void LLWebRTCPeerConnectionImpl::setMute(bool mute)
mMute = mute;
mute |= mWebRTCImpl->isCaptureNoDevice();
mWebRTCImpl->PostSignalingTask(
- [&]()
+ [this, mute]()
{
if (mPeerConnection)
{
@@ -1231,7 +1237,7 @@ void LLWebRTCPeerConnectionImpl::OnSuccess(webrtc::SessionDescriptionInterface *
else if (sdp_line.find("a=fmtp:" + opus_payload) == 0)
{
sdp_mangled_stream << sdp_line << "a=fmtp:" << opus_payload
- << " minptime=10;useinbandfec=1;stereo=1;sprop-stereo=1;maxplaybackrate=48000;sprop-maxplaybackrate=48000;sprop-maxcapturerate=48000\n";
+ << " minptime=10;useinbandfec=1;stereo=1;sprop-stereo=1;maxplaybackrate=48000;sprop-maxplaybackrate=48000;sprop-maxcapturerate=48000;complexity=1\n";
}
else
{