From 1ff30757bc3ccc4b2ac26f04bdc2ca99f25d694d Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Fri, 16 Aug 2024 13:16:39 -0700 Subject: [PATCH 01/10] Log WebRTC devices on webrtc initialization. --- indra/newview/llvoicewebrtc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 093b16eaad..387016f9af 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -269,6 +269,7 @@ void LLWebRTCVoiceClient::init(LLPumpIO* pump) mWebRTCDeviceInterface = llwebrtc::getDeviceInterface(); mWebRTCDeviceInterface->setDevicesObserver(this); mMainQueue = LL::WorkQueue::getInstance("mainloop"); + refreshDeviceLists(); } void LLWebRTCVoiceClient::terminate() @@ -637,7 +638,7 @@ void LLWebRTCVoiceClient::clearCaptureDevices() void LLWebRTCVoiceClient::addCaptureDevice(const LLVoiceDevice& device) { - LL_DEBUGS("Voice") << "display: '" << device.display_name << "' device: '" << device.full_name << "'" << LL_ENDL; + LL_INFOS("Voice") << "Voice Capture Device: '" << device.display_name << "' (" << device.full_name << ")" << LL_ENDL; mCaptureDevices.push_back(device); } @@ -706,7 +707,7 @@ void LLWebRTCVoiceClient::clearRenderDevices() void LLWebRTCVoiceClient::addRenderDevice(const LLVoiceDevice& device) { - LL_DEBUGS("Voice") << "display: '" << device.display_name << "' device: '" << device.full_name << "'" << LL_ENDL; + LL_INFOS("Voice") << "Voice Render Device: '" << device.display_name << "' (" << device.full_name << ")" << LL_ENDL; mRenderDevices.push_back(device); } From 2efad2182a5f6b8404afd9ea363b3a9088de3207 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Sat, 17 Aug 2024 00:21:27 -0700 Subject: [PATCH 02/10] Fixes to managing device start/stop playout/recording. Fixes prevent attempting to start playout/recording before the devices are set up, to prevent restarting playout/recording, to prevent attempts to stop when not playing/recording, and so on... This should address the case where audio device changes can cause an assert. It should also address the case where audio was unnecessarily played or transmitted when connecting. And, when voice is disabled, the audio devices are not set up to play/record so there should be no disruption of bluetooth music from other apps. --- indra/llwebrtc/llwebrtc.cpp | 58 ++++++++++++++++++++++++++++------ indra/llwebrtc/llwebrtc_impl.h | 2 ++ 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index 2c890acbdb..d154bfb8eb 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -251,8 +251,7 @@ void LLWebRTCImpl::init() apm_config.noise_suppression.level = webrtc::AudioProcessing::Config::NoiseSuppression::kVeryHigh; apm_config.transient_suppression.enabled = true; apm_config.pipeline.multi_channel_render = true; - apm_config.pipeline.multi_channel_capture = true; - apm_config.pipeline.multi_channel_capture = true; + apm_config.pipeline.multi_channel_capture = false; webrtc::ProcessingConfig processing_config; processing_config.input_stream().set_num_channels(2); @@ -279,7 +278,6 @@ void LLWebRTCImpl::init() nullptr /* audio_mixer */, mAudioProcessingModule); - mWorkerThread->BlockingCall([this]() { mPeerDeviceModule->StartPlayout(); }); } void LLWebRTCImpl::terminate() @@ -340,6 +338,22 @@ void LLWebRTCImpl::setRecording(bool recording) }); } +void LLWebRTCImpl::setPlayout(bool playing) +{ + mWorkerThread->PostTask( + [this, playing]() + { + if (playing) + { + mPeerDeviceModule->StartPlayout(); + } + else + { + mPeerDeviceModule->StopPlayout(); + } + }); +} + void LLWebRTCImpl::setAudioConfig(LLWebRTCDeviceInterface::AudioConfig config) { webrtc::AudioProcessing::Config apm_config; @@ -402,7 +416,6 @@ void LLWebRTCImpl::unsetDevicesObserver(LLWebRTCDevicesObserver *observer) void ll_set_device_module_capture_device(rtc::scoped_refptr device_module, int16_t device) { - device_module->StopRecording(); #if WEBRTC_WIN if (device < 0) { @@ -420,7 +433,6 @@ void ll_set_device_module_capture_device(rtc::scoped_refptrInitMicrophone(); device_module->InitRecording(); device_module->SetStereoRecording(false); - device_module->StartRecording(); } void LLWebRTCImpl::setCaptureDevice(const std::string &id) @@ -444,18 +456,32 @@ void LLWebRTCImpl::setCaptureDevice(const std::string &id) mRecordingDevice = recordingDevice; if (mTuningMode) { - mWorkerThread->PostTask([this, recordingDevice]() { ll_set_device_module_capture_device(mTuningDeviceModule, recordingDevice); }); + mWorkerThread->PostTask([this, recordingDevice]() + { + ll_set_device_module_capture_device(mTuningDeviceModule, recordingDevice); + }); } else { - mWorkerThread->PostTask([this, recordingDevice]() { ll_set_device_module_capture_device(mPeerDeviceModule, recordingDevice); }); + mWorkerThread->PostTask([this, recordingDevice]() + { + bool recording = mPeerDeviceModule->Recording(); + if (recording) + { + mPeerDeviceModule->StopRecording(); + } + ll_set_device_module_capture_device(mPeerDeviceModule, recordingDevice); + if (recording) + { + mPeerDeviceModule->StartRecording(); + } + }); } } void ll_set_device_module_render_device(rtc::scoped_refptr device_module, int16_t device) { - device_module->StopPlayout(); #if WEBRTC_WIN if (device < 0) { @@ -506,8 +532,16 @@ void LLWebRTCImpl::setRenderDevice(const std::string &id) mWorkerThread->PostTask( [this, playoutDevice]() { + bool playing = mPeerDeviceModule->Playing(); + if (playing) + { + mPeerDeviceModule->StopPlayout(); + } ll_set_device_module_render_device(mPeerDeviceModule, playoutDevice); - mPeerDeviceModule->StartPlayout(); + if (playing) + { + mPeerDeviceModule->StartPlayout(); + } }); } } @@ -633,6 +667,11 @@ LLWebRTCPeerConnectionInterface *LLWebRTCImpl::newPeerConnection() rtc::scoped_refptr peerConnection = rtc::scoped_refptr(new rtc::RefCountedObject()); peerConnection->init(this); + if (mPeerConnections.empty()) + { + setRecording(true); + setPlayout(true); + } mPeerConnections.emplace_back(peerConnection); peerConnection->enableSenderTracks(!mMute); return peerConnection.get(); @@ -649,6 +688,7 @@ void LLWebRTCImpl::freePeerConnection(LLWebRTCPeerConnectionInterface* peer_conn if (mPeerConnections.empty()) { setRecording(false); + setPlayout(false); } } diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h index c5b32123eb..f8a7873af8 100644 --- a/indra/llwebrtc/llwebrtc_impl.h +++ b/indra/llwebrtc/llwebrtc_impl.h @@ -278,6 +278,8 @@ class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceS // enables/disables capture via the capture device void setRecording(bool recording); + void setPlayout(bool playing); + protected: LLWebRTCLogSink* mLogSink; From 63d17b395b8b4c4ca32a09d64754a99b13abedb1 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Sat, 17 Aug 2024 20:11:46 -0700 Subject: [PATCH 03/10] Microphone was being prematurely enabled on login for a short period. The microphone issue was causing a short moment of sound, and was causing bluetooth headsets to switch to hands-free/one channel mode which is disruptive. Also, update webrtc to deal with issue where airpods were garbled after coming out of hands-free mode. --- autobuild.xml | 82 ++++++++++++++++++------------------- indra/llwebrtc/llwebrtc.cpp | 40 +++++++++--------- 2 files changed, 62 insertions(+), 60 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index c2d063763d..3d34c78c01 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -745,18 +745,6 @@ glm - canonical_repo - https://github.com/secondlife/3p-glm - copyright - Copyright (c) 2005 - G-Truc Creation - description - OpenGL Mathematics - license - MIT - license_file - LICENSES/glm_license.txt - name - glm platforms common @@ -774,16 +762,28 @@ common - source_type - git + license + MIT + license_file + LICENSES/glm_license.txt + copyright + Copyright (c) 2005 - G-Truc Creation + version + v1.0.1 + name + glm vcs_branch refs/tags/v1.0.1-r1 vcs_revision 399cd5ba57a9267a560ce07e50a0f8c5fe3dc66f vcs_url git://github.com/secondlife/3p-glm.git - version - v1.0.1 + canonical_repo + https://github.com/secondlife/3p-glm + description + OpenGL Mathematics + source_type + git gstreamer @@ -1418,14 +1418,6 @@ llphysicsextensions_source - copyright - Copyright (c) 2010, Linden Research, Inc. - license - internal - license_file - LICENSES/llphysicsextensions.txt - name - llphysicsextensions_source platforms darwin64 @@ -1477,8 +1469,16 @@ windows64 + license + internal + license_file + LICENSES/llphysicsextensions.txt + copyright + Copyright (c) 2010, Linden Research, Inc. version 1.0.b8b1f73 + name + llphysicsextensions_source llphysicsextensions_stub @@ -2008,16 +2008,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors openal - copyright - Copyright (C) 1999-2007 by authors. - description - OpenAL Soft is a software implementation of the OpenAL 3D audio API. - license - LGPL2 - license_file - LICENSES/openal-soft.txt - name - openal platforms darwin64 @@ -2063,8 +2053,18 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors windows64 + license + LGPL2 + license_file + LICENSES/openal-soft.txt + copyright + Copyright (C) 1999-2007 by authors. version 1.23.1 + name + openal + description + OpenAL Soft is a software implementation of the OpenAL 3D audio API. openjpeg @@ -2793,11 +2793,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 194b4f5957c9f003c46e61a434e23a7c3d1180d6 + 8987b409ab7254ed22dab6dfbaefa059e7ab000e hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.70-debug/webrtc-m114.5735.08.70-debug.10377605436-darwin64-10377605436.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.71-debug/webrtc-m114.5735.08.71-debug.10436964656-darwin64-10436964656.tar.zst name darwin64 @@ -2807,11 +2807,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 38e0c7d30b4c40eb04e60ab199440b847cc7c6cf + 153a220a138f9abe0e35fd63ea7f114b1117b4d6 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.70-debug/webrtc-m114.5735.08.70-debug.10377605436-linux64-10377605436.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.71-debug/webrtc-m114.5735.08.71-debug.10436964656-linux64-10436964656.tar.zst name linux64 @@ -2821,11 +2821,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 053fb5c873df9192e34cddcf2db1c5fdcff76ba1 + 709f23421d9de07fddd37ac4fd2cc4bb723bb4d7 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.70-debug/webrtc-m114.5735.08.70-debug.10377605436-windows64-10377605436.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.71-debug/webrtc-m114.5735.08.71-debug.10436964656-windows64-10436964656.tar.zst name windows64 @@ -2838,7 +2838,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors copyright Copyright (c) 2011, The WebRTC project authors. All rights reserved. version - m114.5735.08.70-debug.10377605436 + m114.5735.08.71-debug.10436964656 name webrtc vcs_branch diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index d154bfb8eb..dd7883f973 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -206,10 +206,10 @@ void LLWebRTCImpl::init() mTuningDeviceModule->SetAudioDeviceSink(this); mTuningDeviceModule->InitMicrophone(); mTuningDeviceModule->InitSpeaker(); + mTuningDeviceModule->SetStereoRecording(false); + mTuningDeviceModule->SetStereoPlayout(true); mTuningDeviceModule->InitRecording(); mTuningDeviceModule->InitPlayout(); - mTuningDeviceModule->SetStereoRecording(true); - mTuningDeviceModule->SetStereoPlayout(true); updateDevices(); }); @@ -227,10 +227,6 @@ void LLWebRTCImpl::init() mPeerDeviceModule->EnableBuiltInAEC(false); mPeerDeviceModule->InitMicrophone(); mPeerDeviceModule->InitSpeaker(); - mPeerDeviceModule->InitRecording(); - mPeerDeviceModule->InitPlayout(); - mPeerDeviceModule->SetStereoRecording(true); - mPeerDeviceModule->SetStereoPlayout(true); }); // The custom processor allows us to retrieve audio data (and levels) @@ -253,6 +249,8 @@ void LLWebRTCImpl::init() apm_config.pipeline.multi_channel_render = true; apm_config.pipeline.multi_channel_capture = false; + mAudioProcessingModule->ApplyConfig(apm_config); + webrtc::ProcessingConfig processing_config; processing_config.input_stream().set_num_channels(2); processing_config.input_stream().set_sample_rate_hz(48000); @@ -263,10 +261,8 @@ void LLWebRTCImpl::init() processing_config.reverse_output_stream().set_num_channels(2); processing_config.reverse_output_stream().set_sample_rate_hz(48000); - mAudioProcessingModule->ApplyConfig(apm_config); mAudioProcessingModule->Initialize(processing_config); - mPeerConnectionFactory = webrtc::CreatePeerConnectionFactory(mNetworkThread.get(), mWorkerThread.get(), mSignalingThread.get(), @@ -329,6 +325,8 @@ void LLWebRTCImpl::setRecording(bool recording) { if (recording) { + mPeerDeviceModule->SetStereoRecording(false); + mPeerDeviceModule->InitRecording(); mPeerDeviceModule->StartRecording(); } else @@ -345,6 +343,8 @@ void LLWebRTCImpl::setPlayout(bool playing) { if (playing) { + mPeerDeviceModule->SetStereoPlayout(true); + mPeerDeviceModule->InitPlayout(); mPeerDeviceModule->StartPlayout(); } else @@ -430,9 +430,9 @@ void ll_set_device_module_capture_device(rtc::scoped_refptrSetRecordingDevice(device + 1); #endif + device_module->SetStereoRecording(false); device_module->InitMicrophone(); device_module->InitRecording(); - device_module->SetStereoRecording(false); } void LLWebRTCImpl::setCaptureDevice(const std::string &id) @@ -494,9 +494,9 @@ void ll_set_device_module_render_device(rtc::scoped_refptrSetPlayoutDevice(device + 1); #endif + device_module->SetStereoPlayout(true); device_module->InitSpeaker(); device_module->InitPlayout(); - device_module->SetStereoPlayout(true); } void LLWebRTCImpl::setRenderDevice(const std::string &id) @@ -626,6 +626,8 @@ void LLWebRTCImpl::setTuningMode(bool enable) //mTuningDeviceModule->StopPlayout(); ll_set_device_module_render_device(mPeerDeviceModule, mPlayoutDevice); ll_set_device_module_capture_device(mPeerDeviceModule, mRecordingDevice); + mPeerDeviceModule->SetStereoPlayout(true); + mPeerDeviceModule->SetStereoRecording(false); mPeerDeviceModule->InitPlayout(); mPeerDeviceModule->InitRecording(); mPeerDeviceModule->StartPlayout(); @@ -667,13 +669,13 @@ LLWebRTCPeerConnectionInterface *LLWebRTCImpl::newPeerConnection() rtc::scoped_refptr peerConnection = rtc::scoped_refptr(new rtc::RefCountedObject()); peerConnection->init(this); + mPeerConnections.emplace_back(peerConnection); + peerConnection->enableSenderTracks(!mMute); if (mPeerConnections.empty()) { setRecording(true); setPlayout(true); } - mPeerConnections.emplace_back(peerConnection); - peerConnection->enableSenderTracks(!mMute); return peerConnection.get(); } @@ -702,7 +704,7 @@ void LLWebRTCImpl::freePeerConnection(LLWebRTCPeerConnectionInterface* peer_conn LLWebRTCPeerConnectionImpl::LLWebRTCPeerConnectionImpl() : mWebRTCImpl(nullptr), mPeerConnection(nullptr), - mMute(false), + mMute(true), mAnswerReceived(false) { } @@ -724,8 +726,8 @@ void LLWebRTCPeerConnectionImpl::init(LLWebRTCImpl * webrtc_impl) } void LLWebRTCPeerConnectionImpl::terminate() { - mWebRTCImpl->PostSignalingTask( - [=]() + mWebRTCImpl->SignalingBlockingCall( + [this]() { if (mPeerConnection) { @@ -847,7 +849,7 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection(const LLWebRTCPeerConnecti codecparam.clock_rate = 48000; codecparam.num_channels = 2; codecparam.parameters["stereo"] = "1"; - codecparam.parameters["sprop-stereo"] = "1"; + codecparam.parameters["sprop-stereo"] = "0"; params.codecs.push_back(codecparam); sender->SetParameters(params); } @@ -862,7 +864,7 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection(const LLWebRTCPeerConnecti codecparam.clock_rate = 48000; codecparam.num_channels = 2; codecparam.parameters["stereo"] = "1"; - codecparam.parameters["sprop-stereo"] = "1"; + codecparam.parameters["sprop-stereo"] = "0"; params.codecs.push_back(codecparam); receiver->SetParameters(params); } @@ -1009,7 +1011,7 @@ void LLWebRTCPeerConnectionImpl::OnAddTrack(rtc::scoped_refptrSetParameters(params); } @@ -1200,7 +1202,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=0;maxplaybackrate=48000;sprop-maxplaybackrate=48000;sprop-maxcapturerate=48000\n"; } else { From 28fdd6e78658f9935eeb2b122265e05aecb548ed Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Sun, 18 Aug 2024 00:30:16 -0700 Subject: [PATCH 04/10] Update webrtc to fix loss of stereo in bluetooth issue. When transitioning from mic-on hands-free mode to mic off, it's expected that the audio stream would return to stereo. Inproper logic in the mac device code in webrtc was preventing that. --- autobuild.xml | 14 +++++++------- indra/llwebrtc/llwebrtc.cpp | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 3d34c78c01..5720cc8c0f 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2793,11 +2793,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 8987b409ab7254ed22dab6dfbaefa059e7ab000e + cbf9fae6cdc6983456eec601a596ce27c961f05f hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.71-debug/webrtc-m114.5735.08.71-debug.10436964656-darwin64-10436964656.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.72-debug/webrtc-m114.5735.08.72-debug.10438479298-darwin64-10438479298.tar.zst name darwin64 @@ -2807,11 +2807,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 153a220a138f9abe0e35fd63ea7f114b1117b4d6 + 8a874c6bd96cdcce8b6fe744f235dc60f1bb4279 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.71-debug/webrtc-m114.5735.08.71-debug.10436964656-linux64-10436964656.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.72-debug/webrtc-m114.5735.08.72-debug.10438479298-linux64-10438479298.tar.zst name linux64 @@ -2821,11 +2821,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 709f23421d9de07fddd37ac4fd2cc4bb723bb4d7 + 379e29faa67a826729179f7228146e2812a6088a hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.71-debug/webrtc-m114.5735.08.71-debug.10436964656-windows64-10436964656.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.72-debug/webrtc-m114.5735.08.72-debug.10438479298-windows64-10438479298.tar.zst name windows64 @@ -2838,7 +2838,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors copyright Copyright (c) 2011, The WebRTC project authors. All rights reserved. version - m114.5735.08.71-debug.10436964656 + m114.5735.08.72-debug.10438479298 name webrtc vcs_branch diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index dd7883f973..0daa767766 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -849,7 +849,7 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection(const LLWebRTCPeerConnecti codecparam.clock_rate = 48000; codecparam.num_channels = 2; codecparam.parameters["stereo"] = "1"; - codecparam.parameters["sprop-stereo"] = "0"; + codecparam.parameters["sprop-stereo"] = "1"; params.codecs.push_back(codecparam); sender->SetParameters(params); } @@ -864,7 +864,7 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection(const LLWebRTCPeerConnecti codecparam.clock_rate = 48000; codecparam.num_channels = 2; codecparam.parameters["stereo"] = "1"; - codecparam.parameters["sprop-stereo"] = "0"; + codecparam.parameters["sprop-stereo"] = "1"; params.codecs.push_back(codecparam); receiver->SetParameters(params); } @@ -1011,7 +1011,7 @@ void LLWebRTCPeerConnectionImpl::OnAddTrack(rtc::scoped_refptrSetParameters(params); } @@ -1202,7 +1202,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=0;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\n"; } else { From 7cc3ff55b97b94a3b52daebfe072eb22192c710b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 16 Aug 2024 19:27:48 +0300 Subject: [PATCH 05/10] viewer#2296 Don't show 'are you sure you want to leave the call' when shutting down --- indra/llui/llfloater.cpp | 8 ++++++++ indra/llui/llfloater.h | 1 + indra/newview/llfloaterimcontainer.cpp | 6 +++--- indra/newview/llfloaterimcontainer.h | 2 +- indra/newview/llfloaterimsession.cpp | 8 +++++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index e6ecf3c283..f29f9286c9 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1926,6 +1926,14 @@ void LLFloater::onClickClose( LLFloater* self ) self->onClickCloseBtn(); } +// static +void LLFloater::onClickClose(LLFloater* self, bool app_quitting) +{ + if (!self) + return; + self->onClickCloseBtn(app_quitting); +} + void LLFloater::onClickCloseBtn(bool app_quitting) { closeFloater(false); diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 3d75c42f60..9be2240f6f 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -363,6 +363,7 @@ public: // } static void onClickClose(LLFloater* floater); + static void onClickClose(LLFloater* floater, bool app_quitting); static void onClickMinimize(LLFloater* floater); static void onClickTearOff(LLFloater* floater); static void onClickDock(LLFloater* floater); diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 08e13276b3..cf66507a66 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -2432,7 +2432,7 @@ void LLFloaterIMContainer::closeHostedFloater() onClickCloseBtn(); } -void LLFloaterIMContainer::closeAllConversations() +void LLFloaterIMContainer::closeAllConversations(bool app_quitting) { std::vector ids; for (conversations_items_map::iterator it_session = mConversationsItems.begin(); it_session != mConversationsItems.end(); it_session++) @@ -2447,7 +2447,7 @@ void LLFloaterIMContainer::closeAllConversations() for (std::vector::const_iterator it = ids.begin(); it != ids.end(); ++it) { LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(*it); - LLFloater::onClickClose(conversationFloater); + LLFloater::onClickClose(conversationFloater, app_quitting); } } @@ -2470,7 +2470,7 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { if(app_quitting) { - closeAllConversations(); + closeAllConversations(app_quitting); onClickCloseBtn(app_quitting); } else diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index e11445d779..d1cfd3442c 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -117,7 +117,7 @@ public: void assignResizeLimits(); virtual bool handleKeyHere(KEY key, MASK mask ); /*virtual*/ void closeFloater(bool app_quitting = false); - void closeAllConversations(); + void closeAllConversations(bool app_quitting); void closeSelectedConversations(const uuid_vec_t& ids); /*virtual*/ bool isFrontmost(); diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index a2a3dac442..557b3f27c5 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -138,8 +138,14 @@ void LLFloaterIMSession::onTearOffClicked() } // virtual -void LLFloaterIMSession::onClickCloseBtn(bool) +void LLFloaterIMSession::onClickCloseBtn(bool app_qutting) { + if (app_qutting) + { + LLFloaterIMSessionTab::onClickCloseBtn(); + return; + } + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSessionID); if (session != NULL) From 226f7bc5b78bbaf13485f2e94b4e185ccd1c5608 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Sun, 18 Aug 2024 23:07:29 -0700 Subject: [PATCH 06/10] Use the release build of webrtc to avoid pedantic asserts which are handled properly anyway. --- autobuild.xml | 82 +++++++++++++++++------------------ indra/llwebrtc/CMakeLists.txt | 6 ++- 2 files changed, 46 insertions(+), 42 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index c2d063763d..fafa141e92 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -745,18 +745,6 @@ glm - canonical_repo - https://github.com/secondlife/3p-glm - copyright - Copyright (c) 2005 - G-Truc Creation - description - OpenGL Mathematics - license - MIT - license_file - LICENSES/glm_license.txt - name - glm platforms common @@ -774,16 +762,28 @@ common - source_type - git + license + MIT + license_file + LICENSES/glm_license.txt + copyright + Copyright (c) 2005 - G-Truc Creation + version + v1.0.1 + name + glm vcs_branch refs/tags/v1.0.1-r1 vcs_revision 399cd5ba57a9267a560ce07e50a0f8c5fe3dc66f vcs_url git://github.com/secondlife/3p-glm.git - version - v1.0.1 + canonical_repo + https://github.com/secondlife/3p-glm + description + OpenGL Mathematics + source_type + git gstreamer @@ -1418,14 +1418,6 @@ llphysicsextensions_source - copyright - Copyright (c) 2010, Linden Research, Inc. - license - internal - license_file - LICENSES/llphysicsextensions.txt - name - llphysicsextensions_source platforms darwin64 @@ -1477,8 +1469,16 @@ windows64 + license + internal + license_file + LICENSES/llphysicsextensions.txt + copyright + Copyright (c) 2010, Linden Research, Inc. version 1.0.b8b1f73 + name + llphysicsextensions_source llphysicsextensions_stub @@ -2008,16 +2008,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors openal - copyright - Copyright (C) 1999-2007 by authors. - description - OpenAL Soft is a software implementation of the OpenAL 3D audio API. - license - LGPL2 - license_file - LICENSES/openal-soft.txt - name - openal platforms darwin64 @@ -2063,8 +2053,18 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors windows64 + license + LGPL2 + license_file + LICENSES/openal-soft.txt + copyright + Copyright (C) 1999-2007 by authors. version 1.23.1 + name + openal + description + OpenAL Soft is a software implementation of the OpenAL 3D audio API. openjpeg @@ -2793,11 +2793,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 194b4f5957c9f003c46e61a434e23a7c3d1180d6 + f8a58d9b5d18810189c5b09ca5c5d7227346ac8d hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.70-debug/webrtc-m114.5735.08.70-debug.10377605436-darwin64-10377605436.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.72/webrtc-m114.5735.08.72.10447328796-darwin64-10447328796.tar.zst name darwin64 @@ -2807,11 +2807,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 38e0c7d30b4c40eb04e60ab199440b847cc7c6cf + 0037f70b29f6c85eb7ee2f030f466d774793bf41 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.70-debug/webrtc-m114.5735.08.70-debug.10377605436-linux64-10377605436.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.72/webrtc-m114.5735.08.72.10447328796-linux64-10447328796.tar.zst name linux64 @@ -2821,11 +2821,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 053fb5c873df9192e34cddcf2db1c5fdcff76ba1 + 744ca0f034f73a10fc40182f6c099a5952cb42a6 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.70-debug/webrtc-m114.5735.08.70-debug.10377605436-windows64-10377605436.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.72/webrtc-m114.5735.08.72.10447328796-windows64-10447328796.tar.zst name windows64 @@ -2838,7 +2838,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors copyright Copyright (c) 2011, The WebRTC project authors. All rights reserved. version - m114.5735.08.70-debug.10377605436 + m114.5735.08.72.10447328796 name webrtc vcs_branch diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt index 30aaec1265..a18b716003 100644 --- a/indra/llwebrtc/CMakeLists.txt +++ b/indra/llwebrtc/CMakeLists.txt @@ -31,6 +31,7 @@ add_library (llwebrtc SHARED ${llwebrtc_SOURCE_FILES}) set_target_properties(llwebrtc PROPERTIES PUBLIC_HEADER llwebrtc.h) if (WINDOWS) + cmake_policy(SET CMP0091 NEW) set_target_properties(llwebrtc PROPERTIES LINK_FLAGS "/debug /LARGEADDRESSAWARE" @@ -42,7 +43,10 @@ if (WINDOWS) wmcodecdspuuid msdmo strmiids - iphlpapi) + iphlpapi + libcmt) + # as the webrtc libraries are release, build this binary as release as well. + target_compile_options(llwebrtc PRIVATE "/MT") if (USE_BUGSPLAT) set_target_properties(llwebrtc PROPERTIES PDB_OUTPUT_DIRECTORY "${SYMBOLS_STAGING_DIR}") endif (USE_BUGSPLAT) From 2dae5a880de2e8b24ad0b36cc4d634187b97979b Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Sun, 18 Aug 2024 23:12:03 -0700 Subject: [PATCH 07/10] update webrtc again. --- autobuild.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 5720cc8c0f..37a04862da 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2793,11 +2793,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - cbf9fae6cdc6983456eec601a596ce27c961f05f + 3570b6442d472cd97bad8622c2ec2571d72218a0 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.72-debug/webrtc-m114.5735.08.72-debug.10438479298-darwin64-10438479298.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.72-test/webrtc-m114.5735.08.72-test.10444682919-darwin64-10444682919.tar.zst name darwin64 @@ -2807,11 +2807,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 8a874c6bd96cdcce8b6fe744f235dc60f1bb4279 + eadf6aa99313940ded11801d42c11375669f1628 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.72-debug/webrtc-m114.5735.08.72-debug.10438479298-linux64-10438479298.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.72-test/webrtc-m114.5735.08.72-test.10444682919-linux64-10444682919.tar.zst name linux64 @@ -2821,11 +2821,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 379e29faa67a826729179f7228146e2812a6088a + 0081fd35290adbc8e66dd366535fb6cd8a966f1e hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.72-debug/webrtc-m114.5735.08.72-debug.10438479298-windows64-10438479298.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.72-test/webrtc-m114.5735.08.72-test.10444682919-windows64-10444682919.tar.zst name windows64 @@ -2838,7 +2838,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors copyright Copyright (c) 2011, The WebRTC project authors. All rights reserved. version - m114.5735.08.72-debug.10438479298 + m114.5735.08.72-test.10444682919 name webrtc vcs_branch From b5754c881648ab75a9c6cabc116e2d55eed7620a Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Mon, 19 Aug 2024 14:37:08 -0700 Subject: [PATCH 08/10] #2345 Disable mirrors from the feature table regardless of quality level. (#2352) --- indra/newview/featuretable.txt | 6 +++--- indra/newview/featuretable_mac.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 03849a0326..e11b406094 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -252,7 +252,7 @@ RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 RenderScreenSpaceReflections 1 0 RenderReflectionProbeLevel 1 3 -RenderMirrors 1 1 +RenderMirrors 1 0 RenderHeroProbeResolution 1 512 RenderHeroProbeDistance 1 8 RenderHeroProbeUpdateRate 1 2 @@ -288,7 +288,7 @@ RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 RenderScreenSpaceReflections 1 0 RenderReflectionProbeLevel 1 3 -RenderMirrors 1 1 +RenderMirrors 1 0 RenderHeroProbeResolution 1 1024 RenderHeroProbeDistance 1 16 RenderHeroProbeUpdateRate 1 1 @@ -324,7 +324,7 @@ RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 RenderScreenSpaceReflections 1 0 RenderReflectionProbeLevel 1 3 -RenderMirrors 1 1 +RenderMirrors 1 0 RenderHeroProbeResolution 1 2048 RenderHeroProbeDistance 1 16 RenderHeroProbeUpdateRate 1 1 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 7aa8504eaa..b984ed217f 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -286,7 +286,7 @@ RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 RenderScreenSpaceReflections 1 0 RenderReflectionProbeLevel 1 2 -RenderMirrors 1 1 +RenderMirrors 1 0 RenderHeroProbeResolution 1 512 RenderHeroProbeDistance 1 16 RenderHeroProbeUpdateRate 1 1 @@ -322,7 +322,7 @@ RenderReflectionsEnabled 1 1 RenderReflectionProbeDetail 1 1 RenderScreenSpaceReflections 1 0 RenderReflectionProbeLevel 1 3 -RenderMirrors 1 1 +RenderMirrors 1 0 RenderHeroProbeResolution 1 1024 RenderHeroProbeDistance 1 16 RenderHeroProbeUpdateRate 1 1 From 1d017b76292cf8c7afad34ec54d7401e2f1795e5 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Aug 2024 08:28:35 -0400 Subject: [PATCH 09/10] Trim trailing blank line. --- indra/llmessage/message_string_table.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/llmessage/message_string_table.cpp b/indra/llmessage/message_string_table.cpp index 6d2157eec9..084c373265 100644 --- a/indra/llmessage/message_string_table.cpp +++ b/indra/llmessage/message_string_table.cpp @@ -88,4 +88,3 @@ char* LLMessageStringTable::getString(const char *str) } return mString[hash_value]; } - From 56e16876805c80f63a70024e00b5dfcc5e4e45d7 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Tue, 20 Aug 2024 14:05:40 -0700 Subject: [PATCH 10/10] #2345 Fix for mirrors not being disabled from previous viewer versions. --- indra/newview/featuretable.txt | 2 +- indra/newview/featuretable_linux.txt | 42 ++++++++++++++++++++++++++++ indra/newview/featuretable_mac.txt | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index e11b406094..3b2a298647 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -1,4 +1,4 @@ -version 60 +version 61 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 4bcefc1546..4b617fd7f4 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -67,6 +67,7 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 2 RenderFSAASamples 1 16 RenderMaxTextureIndex 1 16 +RenderMirrors 1 1 // // Low Graphics Settings (fixed function) @@ -97,6 +98,12 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 +RenderMirrors 1 0 +RenderHeroProbeResolution 1 256 +RenderHeroProbeDistance 1 4 +RenderHeroProbeUpdateRate 1 6 +RenderHeroProbeConservativeUpdateMultiplier 1 16 + // // Low Graphics Settings @@ -127,6 +134,11 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 +RenderMirrors 1 0 +RenderHeroProbeResolution 1 256 +RenderHeroProbeDistance 1 4 +RenderHeroProbeUpdateRate 1 6 +RenderHeroProbeConservativeUpdateMultiplier 1 16 // // Medium Low Graphics Settings @@ -156,6 +168,11 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 +RenderMirrors 1 0 +RenderHeroProbeResolution 1 256 +RenderHeroProbeDistance 1 6 +RenderHeroProbeUpdateRate 1 3 +RenderHeroProbeConservativeUpdateMultiplier 1 16 // // Medium Graphics Settings (standard) @@ -185,6 +202,11 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 2 +RenderMirrors 1 0 +RenderHeroProbeResolution 1 512 +RenderHeroProbeDistance 1 6 +RenderHeroProbeUpdateRate 1 3 +RenderHeroProbeConservativeUpdateMultiplier 1 16 // // Medium High Graphics Settings (deferred enabled) @@ -214,6 +236,11 @@ RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 2 +RenderMirrors 1 0 +RenderHeroProbeResolution 1 512 +RenderHeroProbeDistance 1 6 +RenderHeroProbeUpdateRate 1 2 +RenderHeroProbeConservativeUpdateMultiplier 1 8 // // High Graphics Settings (deferred + SSAO) @@ -243,6 +270,11 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 2 +RenderMirrors 1 0 +RenderHeroProbeResolution 1 512 +RenderHeroProbeDistance 1 8 +RenderHeroProbeUpdateRate 1 2 +RenderHeroProbeConservativeUpdateMultiplier 1 8 // // High Ultra Graphics Settings (deferred + SSAO + shadows) @@ -272,6 +304,11 @@ RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 2 WLSkyDetail 1 48 RenderFSAASamples 1 2 +RenderMirrors 1 0 +RenderHeroProbeResolution 1 512 +RenderHeroProbeDistance 1 16 +RenderHeroProbeUpdateRate 1 1 +RenderHeroProbeConservativeUpdateMultiplier 1 4 // // Ultra graphics (REALLY PURTY!) @@ -300,6 +337,11 @@ RenderDeferredSSAO 1 1 RenderUseAdvancedAtmospherics 1 0 RenderShadowDetail 1 2 RenderFSAASamples 1 2 +RenderMirrors 1 0 +RenderHeroProbeResolution 1 1024 +RenderHeroProbeDistance 1 16 +RenderHeroProbeUpdateRate 1 1 +RenderHeroProbeConservativeUpdateMultiplier 1 4 // // Class Unknown Hardware (unknown) diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index b984ed217f..f4d24459fc 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -1,4 +1,4 @@ -version 57 +version 58 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended