From b746e78c78eaba3460b0f49208dc8b864c376d34 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 18 Jul 2024 10:01:15 +0300 Subject: Fix trailing whitespaces in webrtc code to pass pre-commit --- indra/llwebrtc/llwebrtc.cpp | 6 +++--- indra/llwebrtc/llwebrtc.h | 4 ++-- indra/llwebrtc/llwebrtc_impl.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index d5bd913315..6dc632aba4 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -458,7 +458,7 @@ void ll_set_device_module_render_device(rtc::scoped_refptrSetPlayoutDevice(webrtc::AudioDeviceModule::kDefaultDevice); } - else + else { device_module->SetPlayoutDevice(device); } @@ -656,7 +656,7 @@ void LLWebRTCImpl::freePeerConnection(LLWebRTCPeerConnectionInterface* peer_conn // Most peer connection (signaling) happens on // the signaling thread. -LLWebRTCPeerConnectionImpl::LLWebRTCPeerConnectionImpl() : +LLWebRTCPeerConnectionImpl::LLWebRTCPeerConnectionImpl() : mWebRTCImpl(nullptr), mPeerConnection(nullptr), mMute(false), @@ -1171,7 +1171,7 @@ void LLWebRTCPeerConnectionImpl::OnSuccess(webrtc::SessionDescriptionInterface * { observer->OnOfferAvailable(mangled_sdp); } - + mPeerConnection->SetLocalDescription(std::unique_ptr( webrtc::CreateSessionDescription(webrtc::SdpType::kOffer, mangled_sdp)), rtc::scoped_refptr(this)); diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h index f447ea990a..54eefc8554 100644 --- a/indra/llwebrtc/llwebrtc.h +++ b/indra/llwebrtc/llwebrtc.h @@ -129,7 +129,7 @@ class LLWebRTCDeviceInterface }; virtual void setAudioConfig(AudioConfig config) = 0; - + // instructs webrtc to refresh the device list. virtual void refreshDevices() = 0; @@ -231,7 +231,7 @@ class LLWebRTCSignalingObserver class LLWebRTCPeerConnectionInterface { public: - + struct InitOptions { // equivalent of PeerConnectionInterface::IceServer diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h index 6672f8ce90..2fb5525519 100644 --- a/indra/llwebrtc/llwebrtc_impl.h +++ b/indra/llwebrtc/llwebrtc_impl.h @@ -235,7 +235,7 @@ class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceS // The factory that allows creation of native webrtc PeerConnections. rtc::scoped_refptr mPeerConnectionFactory; - + rtc::scoped_refptr mAudioProcessingModule; // more native webrtc stuff -- cgit v1.2.3 From 7b119c01e0c179bac3dfe8b8c8ee05016099c9aa Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 26 Jul 2024 13:01:13 +0300 Subject: viewer-private#255 p2p outgoing calls did not work correctly Issue: P2P was catching STATUS_LEFT_CHANNEL meant for nearby chat and adopting channel info for itself Solution: - Moved one of notifyStatusObservers calls so that it would have uri data instead of firing with no channel info - Made p2p sessions init with uri data, like it was before webrtc. Which is used to distinguish observer notifications. - Removed mAudioSessionChanged. It was unused yet confusing. --- indra/newview/llvoicechannel.cpp | 13 ++++++++++++- indra/newview/llvoicevivox.cpp | 14 +++++--------- indra/newview/llvoicevivox.h | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 8681411a98..29817ab03a 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -122,7 +122,13 @@ void LLVoiceChannel::onChange(EStatusType type, const LLSD& channelInfo, bool pr { LL_DEBUGS("Voice") << "Incoming channel info: " << channelInfo << LL_ENDL; LL_DEBUGS("Voice") << "Current channel info: " << mChannelInfo << LL_ENDL; - if (mChannelInfo.isUndefined() || (mChannelInfo.isMap() && mChannelInfo.size() == 0)) + if (mChannelInfo.has("channel_uri") + && (!channelInfo.has("channel_uri") || mChannelInfo["channel_uri"] != channelInfo["channel_uri"])) + { + return; + } + if (mChannelInfo.isUndefined() + || (mChannelInfo.isMap() && mChannelInfo.size() <= 1)) // p2p will have uri beforehand { mChannelInfo = channelInfo; } @@ -768,6 +774,11 @@ LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID &session_id, mReceivedCall(FALSE), mOutgoingCallInterface(outgoing_call_interface) { + std::string sip_uri = LLVoiceClient::getInstance()->sipURIFromID(other_user_id); + if (!sip_uri.empty()) + { + mChannelInfo["channel_uri"] = sip_uri; + } } void LLVoiceChannelP2P::handleStatusChange(EStatusType type) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 4694ea92bb..9215160202 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -296,7 +296,6 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() : mDevicesListUpdated(false), mAudioSession(), // TBD - should be NULL - mAudioSessionChanged(false), mNextAudioSession(), mCurrentParcelLocalID(0), @@ -1641,7 +1640,6 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession) LL_INFOS("Voice") << "Adding or joining voice session " << nextSession->mHandle << LL_ENDL; mAudioSession = nextSession; - mAudioSessionChanged = true; if (!mAudioSession || !mAudioSession->mReconnect) { mNextAudioSession.reset(); @@ -1898,9 +1896,8 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait) sessionStatePtr_t oldSession = mAudioSession; + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL); // needs mAudioSession for uri mAudioSession.reset(); - // We just notified status observers about this change. Don't do it again. - mAudioSessionChanged = false; // The old session may now need to be deleted. reapSession(oldSession); @@ -1908,9 +1905,9 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait) else { LL_WARNS("Voice") << "terminateAudioSession(" << wait << ") with NULL mAudioSession" << LL_ENDL; + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL); } - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL); // Always reset the terminate request flag when we get here. // Some slower PCs have a race condition where they can switch to an incoming P2P call faster than the state machine leaves @@ -3832,7 +3829,6 @@ void LLVivoxVoiceClient::joinedAudioSession(const sessionStatePtr_t &session) sessionStatePtr_t oldSession = mAudioSession; mAudioSession = session; - mAudioSessionChanged = true; // The old session may now need to be deleted. reapSession(oldSession); @@ -6147,7 +6143,6 @@ void LLVivoxVoiceClient::deleteSession(const sessionStatePtr_t &session) if(mAudioSession == session) { mAudioSession.reset(); - mAudioSessionChanged = true; } // ditto for the next audio session @@ -6256,9 +6251,10 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta } } + LLSD channel_info = getAudioSessionChannelInfo(); LL_DEBUGS("Voice") << " " << LLVoiceClientStatusObserver::status2string(status) - << ", session channelInfo " << getAudioSessionChannelInfo() + << ", session channelInfo " << channel_info << ", proximal is " << inSpatialChannel() << LL_ENDL; @@ -6273,7 +6269,7 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta ) { LLVoiceClientStatusObserver* observer = *it; - observer->onChange(status, getAudioSessionChannelInfo(), inSpatialChannel()); + observer->onChange(status, channel_info, inSpatialChannel()); // In case onError() deleted an entry. it = mStatusObservers.upper_bound(observer); } diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 55c1fb50d0..12e3d11eef 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -706,7 +706,6 @@ private: std::string mChannelName; // Name of the channel to be looked up sessionStatePtr_t mAudioSession; // Session state for the current audio session - bool mAudioSessionChanged; // set to true when the above pointer gets changed, so observers can be notified. sessionStatePtr_t mNextAudioSession; // Session state for the audio session we're trying to join -- cgit v1.2.3 From f75735d7416b8217a93ffd3ed95c6289f5ff0c68 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 26 Jul 2024 19:28:40 +0300 Subject: viewer-private#255 p2p outgoing calls did not work correctly #2 --- indra/newview/llvoicechannel.cpp | 14 ++------------ indra/newview/llvoiceclient.cpp | 18 +++++++++++++++++- indra/newview/llvoiceclient.h | 6 ++++-- indra/newview/llvoicevivox.cpp | 12 ++++++++++-- indra/newview/llvoicevivox.h | 5 +++-- indra/newview/llvoicewebrtc.cpp | 7 ++++++- indra/newview/llvoicewebrtc.h | 4 +++- 7 files changed, 45 insertions(+), 21 deletions(-) diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 29817ab03a..5a9c0d103f 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -122,13 +122,7 @@ void LLVoiceChannel::onChange(EStatusType type, const LLSD& channelInfo, bool pr { LL_DEBUGS("Voice") << "Incoming channel info: " << channelInfo << LL_ENDL; LL_DEBUGS("Voice") << "Current channel info: " << mChannelInfo << LL_ENDL; - if (mChannelInfo.has("channel_uri") - && (!channelInfo.has("channel_uri") || mChannelInfo["channel_uri"] != channelInfo["channel_uri"])) - { - return; - } - if (mChannelInfo.isUndefined() - || (mChannelInfo.isMap() && mChannelInfo.size() <= 1)) // p2p will have uri beforehand + if (mChannelInfo.isUndefined() || (mChannelInfo.isMap() && mChannelInfo.size() == 0)) { mChannelInfo = channelInfo; } @@ -774,11 +768,7 @@ LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID &session_id, mReceivedCall(FALSE), mOutgoingCallInterface(outgoing_call_interface) { - std::string sip_uri = LLVoiceClient::getInstance()->sipURIFromID(other_user_id); - if (!sip_uri.empty()) - { - mChannelInfo["channel_uri"] = sip_uri; - } + mChannelInfo = LLVoiceClient::getInstance()->getP2PChannelInfoTemplate(other_user_id); } void LLVoiceChannelP2P::handleStatusChange(EStatusType type) diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index c20a5ec749..0cf4a64c3d 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -826,7 +826,7 @@ void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) LLWebRTCVoiceClient::getInstance()->removeObserver(observer); } -std::string LLVoiceClient::sipURIFromID(const LLUUID &id) +std::string LLVoiceClient::sipURIFromID(const LLUUID &id) const { if (mNonSpatialVoiceModule) { @@ -842,6 +842,22 @@ std::string LLVoiceClient::sipURIFromID(const LLUUID &id) } } +LLSD LLVoiceClient::getP2PChannelInfoTemplate(const LLUUID& id) const +{ + if (mNonSpatialVoiceModule) + { + return mNonSpatialVoiceModule->getP2PChannelInfoTemplate(id); + } + else if (mSpatialVoiceModule) + { + return mSpatialVoiceModule->getP2PChannelInfoTemplate(id); + } + else + { + return LLSD(); + } +} + LLVoiceEffectInterface* LLVoiceClient::getVoiceEffectInterface() const { return NULL; diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index d603125759..c8a65378c6 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -281,7 +281,8 @@ public: virtual void removeObserver(LLVoiceClientParticipantObserver* observer)=0; //@} - virtual std::string sipURIFromID(const LLUUID &id)=0; + virtual std::string sipURIFromID(const LLUUID &id) const=0; + virtual LLSD getP2PChannelInfoTemplate(const LLUUID& id) const=0; //@} }; @@ -488,7 +489,8 @@ public: void addObserver(LLVoiceClientParticipantObserver* observer); void removeObserver(LLVoiceClientParticipantObserver* observer); - std::string sipURIFromID(const LLUUID &id); + std::string sipURIFromID(const LLUUID &id) const; + LLSD getP2PChannelInfoTemplate(const LLUUID& id) const; ////////////////////////// /// @name Voice effects diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 9215160202..3392e4de86 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -5138,7 +5138,7 @@ bool LLVivoxVoiceClient::inProximalChannel() return result; } -std::string LLVivoxVoiceClient::sipURIFromID(const LLUUID &id) +std::string LLVivoxVoiceClient::sipURIFromID(const LLUUID &id) const { std::string result; result = "sip:"; @@ -5149,6 +5149,14 @@ std::string LLVivoxVoiceClient::sipURIFromID(const LLUUID &id) return result; } +LLSD LLVivoxVoiceClient::getP2PChannelInfoTemplate(const LLUUID& id) const +{ + LLSD result; + result["channel_uri"] = sipURIFromID(id); + result["voice_server_type"] = VIVOX_VOICE_SERVER_TYPE; + return result; +} + std::string LLVivoxVoiceClient::sipURIFromAvatar(LLVOAvatar *avatar) { std::string result; @@ -5163,7 +5171,7 @@ std::string LLVivoxVoiceClient::sipURIFromAvatar(LLVOAvatar *avatar) return result; } -std::string LLVivoxVoiceClient::nameFromID(const LLUUID &uuid) +std::string LLVivoxVoiceClient::nameFromID(const LLUUID &uuid) const { std::string result; diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 12e3d11eef..64c2c87db6 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -221,7 +221,8 @@ public: void removeObserver(LLVoiceClientParticipantObserver* observer) override; //@} - std::string sipURIFromID(const LLUUID &id) override; + std::string sipURIFromID(const LLUUID &id) const override; + LLSD getP2PChannelInfoTemplate(const LLUUID& id) const override; //@} /// @name LLVoiceEffectInterface virtual implementations @@ -747,7 +748,7 @@ private: bool switchChannel(std::string uri = std::string(), bool spatial = true, bool no_reconnect = false, bool is_p2p = false, std::string hash = ""); void joinSession(const sessionStatePtr_t &session); - std::string nameFromID(const LLUUID &id); + std::string nameFromID(const LLUUID &id) const; bool IDFromName(const std::string name, LLUUID &uuid); std::string sipURIFromAvatar(LLVOAvatar *avatar); std::string sipURIFromName(std::string &name); diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 36e998af89..c6cc2a053a 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -2066,11 +2066,16 @@ void LLWebRTCVoiceClient::avatarNameResolved(const LLUUID &id, const std::string } // Leftover from vivox PTSN -std::string LLWebRTCVoiceClient::sipURIFromID(const LLUUID& id) +std::string LLWebRTCVoiceClient::sipURIFromID(const LLUUID& id) const { return id.asString(); } +LLSD LLWebRTCVoiceClient::getP2PChannelInfoTemplate(const LLUUID& id) const +{ + return LLSD(); +} + ///////////////////////////// // LLVoiceWebRTCConnection diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index 7042bbae00..624b1b9bd2 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -84,7 +84,9 @@ public: // Returns true if WebRTC has successfully logged in and is not in error state bool isVoiceWorking() const override; - std::string sipURIFromID(const LLUUID &id) override; + std::string sipURIFromID(const LLUUID &id) const override; + LLSD getP2PChannelInfoTemplate(const LLUUID& id) const override; + ///////////////////// /// @name Tuning -- cgit v1.2.3 From a7177cc4b679c58fef7959668fc674a48952659a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 30 Jul 2024 13:31:40 +0300 Subject: viewer#2121 Don't update Audio visualizer if voice is blocked --- indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b9a30446a1..b2da992b7c 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2771,7 +2771,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled, const LLVector3 & // Notice the calls to "gAwayTimer.reset()". This resets the timer that determines how long the avatar has been // "away", so that the avatar doesn't lapse into away-mode (and slump over) while the user is still talking. //----------------------------------------------------------------------------------------------------------------- - if (LLVoiceClient::getInstance()->getIsSpeaking( mID )) + if (LLVoiceClient::getInstance()->getIsSpeaking( mID ) && (!isInMuteList() || isSelf())) { if (!mVoiceVisualizer->getCurrentlySpeaking()) { -- cgit v1.2.3 From 2582e4a47a83a201668495a956a766a1dd58967c Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Tue, 30 Jul 2024 16:53:46 -0600 Subject: Use new webrtc lib with crash-on-fatal support --- autobuild.xml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 92bacba33d..31c71066dc 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1776,18 +1776,6 @@ mikktspace - canonical_repo - https://bitbucket.org/lindenlab/3p-mikktspace - copyright - Copyright (C) 2011 by Morten S. Mikkelsen, Copyright (C) 2022 Blender Authors - description - Mikktspace Tangent Generator - license - Apache 2.0 - license_file - mikktspace.txt - name - mikktspace platforms darwin64 @@ -1833,8 +1821,20 @@ windows64 + license + Apache 2.0 + license_file + mikktspace.txt + copyright + Copyright (C) 2011 by Morten S. Mikkelsen, Copyright (C) 2022 Blender Authors version 1 + name + mikktspace + canonical_repo + https://bitbucket.org/lindenlab/3p-mikktspace + description + Mikktspace Tangent Generator minizip-ng @@ -2751,6 +2751,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors LICENSE copyright Copyright (c) 2000-2012, Linden Research, Inc. + version + 3.0-f14b5ec name viewer-manager description @@ -2759,8 +2761,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors https://bitbucket.org/lindenlab/vmp-standalone source_type hg - version - 3.0-f14b5ec vlc-bin @@ -2909,11 +2909,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 0a0a972036f2b2c9c97dead40c91f7443b8ab339 + f7017b791a42948c60e910482d7a8eec4df24418 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.61-debug/webrtc-m114.5735.08.61-debug.9571929057-darwin64-9571929057.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.66-debug/webrtc-m114.5735.08.66-debug.10166105889-darwin64-10166105889.tar.zst name darwin64 @@ -2923,11 +2923,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 8725ad23f33d946bd5a4e5f28e8c8324925c71a7 + 8d379a82dcbf26b6a5ba1530afb8073451e27fba hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.61-debug/webrtc-m114.5735.08.61-debug.9571929057-linux64-9571929057.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.66-debug/webrtc-m114.5735.08.66-debug.10166105889-linux64-10166105889.tar.zst name linux64 @@ -2937,11 +2937,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - db560661807db276a3c7d1e7d9531198c9268f68 + 9dd77b7f0b89b0fc0b0ad9f9e7df81e9ff5590e4 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.61-debug/webrtc-m114.5735.08.61-debug.9571929057-windows64-9571929057.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.66-debug/webrtc-m114.5735.08.66-debug.10166105889-windows64-10166105889.tar.zst name windows64 @@ -2954,7 +2954,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors copyright Copyright (c) 2011, The WebRTC project authors. All rights reserved. version - m114.5735.08.61-debug.9571929057 + m114.5735.08.66-debug.10166105889 name webrtc vcs_branch -- cgit v1.2.3 From b9c222dfaeb4531f91f6e0bb02bb4b0da599d08b Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 31 Jul 2024 21:23:30 -0600 Subject: Implement a Logging Sink for WebRTC WebRTC logs now pass out of the webrtc library into a logging sink, which converts them into SecondLife.log compatable logging calls. This includes fatal errors and asserts, which are now logged into SecondLife.log, and should be available in the crash logger. --- autobuild.xml | 14 +++++----- indra/llwebrtc/llwebrtc.cpp | 9 ++++--- indra/llwebrtc/llwebrtc.h | 16 +++++++++++- indra/llwebrtc/llwebrtc_impl.h | 57 +++++++++++++++++++++++++++++++++++++++-- indra/newview/llvoicewebrtc.cpp | 25 +++++++++++++++++- indra/newview/llvoicewebrtc.h | 9 ++++++- 6 files changed, 115 insertions(+), 15 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 31c71066dc..289da031eb 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2909,11 +2909,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - f7017b791a42948c60e910482d7a8eec4df24418 + baabb11f324be350253b1fb58cf262c1aa19fa70 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.66-debug/webrtc-m114.5735.08.66-debug.10166105889-darwin64-10166105889.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.67-debug/webrtc-m114.5735.08.67-debug.10190042668-darwin64-10190042668.tar.zst name darwin64 @@ -2923,11 +2923,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 8d379a82dcbf26b6a5ba1530afb8073451e27fba + a13776c8f99f8975665be66ff8b51a80ba46c718 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.66-debug/webrtc-m114.5735.08.66-debug.10166105889-linux64-10166105889.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.67-debug/webrtc-m114.5735.08.67-debug.10190042668-linux64-10190042668.tar.zst name linux64 @@ -2937,11 +2937,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 9dd77b7f0b89b0fc0b0ad9f9e7df81e9ff5590e4 + 965ef5d65a14191a52ee9ec6a9a8a1d2ce3f2ffb hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.66-debug/webrtc-m114.5735.08.66-debug.10166105889-windows64-10166105889.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.67-debug/webrtc-m114.5735.08.67-debug.10190042668-windows64-10190042668.tar.zst name windows64 @@ -2954,7 +2954,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors copyright Copyright (c) 2011, The WebRTC project authors. All rights reserved. version - m114.5735.08.66-debug.10166105889 + m114.5735.08.67-debug.10190042668 name webrtc vcs_branch diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index 6dc632aba4..2c890acbdb 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -154,7 +154,8 @@ void LLCustomProcessor::Process(webrtc::AudioBuffer *audio_in) // LLWebRTCImpl implementation // -LLWebRTCImpl::LLWebRTCImpl() : +LLWebRTCImpl::LLWebRTCImpl(LLWebRTCLogCallback* logCallback) : + mLogSink(new LLWebRTCLogSink(logCallback)), mPeerCustomProcessor(nullptr), mMute(true), mTuningMode(false), @@ -173,6 +174,7 @@ void LLWebRTCImpl::init() // Normal logging is rather spammy, so turn it off. rtc::LogMessage::LogToDebug(rtc::LS_NONE); rtc::LogMessage::SetLogToStderr(true); + rtc::LogMessage::AddLogToStream(mLogSink, rtc::LS_VERBOSE); mTaskQueueFactory = webrtc::CreateDefaultTaskQueueFactory(); @@ -312,6 +314,7 @@ void LLWebRTCImpl::terminate() mPeerDeviceModule = nullptr; mTaskQueueFactory = nullptr; }); + rtc::LogMessage::RemoveLogToStream(mLogSink); } // @@ -1327,9 +1330,9 @@ void freePeerConnection(LLWebRTCPeerConnectionInterface* peer_connection) } -void init() +void init(LLWebRTCLogCallback* logCallback) { - gWebRTCImpl = new LLWebRTCImpl(); + gWebRTCImpl = new LLWebRTCImpl(logCallback); gWebRTCImpl->init(); } diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h index 54eefc8554..c6fdb909dd 100644 --- a/indra/llwebrtc/llwebrtc.h +++ b/indra/llwebrtc/llwebrtc.h @@ -56,6 +56,20 @@ namespace llwebrtc { +class LLWebRTCLogCallback +{ +public: + typedef enum { + LOG_LEVEL_VERBOSE = 0, + LOG_LEVEL_INFO, + LOG_LEVEL_WARNING, + LOG_LEVEL_ERROR + } LogLevel; + + virtual void LogMessage(LogLevel level, const std::string& message) = 0; +}; + + // LLWebRTCVoiceDevice is a simple representation of the // components of a device, used to communicate this // information to the viewer. @@ -262,7 +276,7 @@ class LLWebRTCPeerConnectionInterface // exports. // This library must be initialized before use. -LLSYMEXPORT void init(); +LLSYMEXPORT void init(LLWebRTCLogCallback* logSink); // And should be terminated as part of shutdown. LLSYMEXPORT void terminate(); diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h index 2fb5525519..c5b32123eb 100644 --- a/indra/llwebrtc/llwebrtc_impl.h +++ b/indra/llwebrtc/llwebrtc_impl.h @@ -69,6 +69,54 @@ namespace llwebrtc class LLWebRTCPeerConnectionImpl; +class LLWebRTCLogSink : public rtc::LogSink { +public: + LLWebRTCLogSink(LLWebRTCLogCallback* callback) : + mCallback(callback) + { + } + + // Destructor: close the log file + ~LLWebRTCLogSink() override + { + } + + void OnLogMessage(const std::string& msg, + rtc::LoggingSeverity severity) override + { + if (mCallback) + { + switch(severity) + { + case rtc::LS_VERBOSE: + mCallback->LogMessage(LLWebRTCLogCallback::LOG_LEVEL_VERBOSE, msg); + break; + case rtc::LS_INFO: + mCallback->LogMessage(LLWebRTCLogCallback::LOG_LEVEL_VERBOSE, msg); + break; + case rtc::LS_WARNING: + mCallback->LogMessage(LLWebRTCLogCallback::LOG_LEVEL_VERBOSE, msg); + break; + case rtc::LS_ERROR: + mCallback->LogMessage(LLWebRTCLogCallback::LOG_LEVEL_VERBOSE, msg); + break; + default: + break; + } + } + } + + void OnLogMessage(const std::string& message) override + { + if (mCallback) + { + mCallback->LogMessage(LLWebRTCLogCallback::LOG_LEVEL_VERBOSE, message); + } + } + +private: + LLWebRTCLogCallback* mCallback; +}; // Implements a class allowing capture of audio data // to determine audio level of the microphone. @@ -139,8 +187,11 @@ class LLCustomProcessor : public webrtc::CustomProcessing class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceSink { public: - LLWebRTCImpl(); - ~LLWebRTCImpl() {} + LLWebRTCImpl(LLWebRTCLogCallback* logCallback); + ~LLWebRTCImpl() + { + delete mLogSink; + } void init(); void terminate(); @@ -228,6 +279,8 @@ class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceS void setRecording(bool recording); protected: + LLWebRTCLogSink* mLogSink; + // The native webrtc threads std::unique_ptr mNetworkThread; std::unique_ptr mWorkerThread; diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index c6cc2a053a..3164886494 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -250,7 +250,7 @@ LLWebRTCVoiceClient::~LLWebRTCVoiceClient() void LLWebRTCVoiceClient::init(LLPumpIO* pump) { // constructor will set up LLVoiceClient::getInstance() - llwebrtc::init(); + llwebrtc::init(this); mWebRTCDeviceInterface = llwebrtc::getDeviceInterface(); mWebRTCDeviceInterface->setDevicesObserver(this); @@ -281,6 +281,29 @@ void LLWebRTCVoiceClient::cleanUp() LL_DEBUGS("Voice") << "Exiting" << LL_ENDL; } +void LLWebRTCVoiceClient::LogMessage(llwebrtc::LLWebRTCLogCallback::LogLevel level, const std::string& message) +{ + switch (level) + { + case llwebrtc::LLWebRTCLogCallback::LOG_LEVEL_VERBOSE: + LL_DEBUGS("Voice") << message << LL_ENDL; + break; + case llwebrtc::LLWebRTCLogCallback::LOG_LEVEL_INFO: + LL_INFOS("Voice") << message << LL_ENDL; + break; + case llwebrtc::LLWebRTCLogCallback::LOG_LEVEL_WARNING: + LL_WARNS("Voice") << message << LL_ENDL; + break; + case llwebrtc::LLWebRTCLogCallback::LOG_LEVEL_ERROR: + // use WARN so that we don't crash on a webrtc error. + // webrtc will force a crash on a fatal error. + LL_WARNS("Voice") << message << LL_ENDL; + break; + default: + break; + } +} + // -------------------------------------------------- const LLVoiceVersionInfo& LLWebRTCVoiceClient::getVersion() diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index 624b1b9bd2..8a65ef667c 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -62,7 +62,8 @@ extern const std::string WEBRTC_VOICE_SERVER_TYPE; class LLWebRTCVoiceClient : public LLSingleton, virtual public LLVoiceModuleInterface, public llwebrtc::LLWebRTCDevicesObserver, - public LLMuteListObserver + public LLMuteListObserver, + public llwebrtc::LLWebRTCLogCallback { LLSINGLETON_C11(LLWebRTCVoiceClient); LOG_CLASS(LLWebRTCVoiceClient); @@ -88,6 +89,12 @@ public: LLSD getP2PChannelInfoTemplate(const LLUUID& id) const override; + /////////////////// + /// @name Logging + /// @{ + void LogMessage(llwebrtc::LLWebRTCLogCallback::LogLevel level, const std::string& message) override; + //@} + ///////////////////// /// @name Tuning //@{ -- cgit v1.2.3 From 1ebb604236b984c35c52d05f6d87f256b7f49e02 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 2 Aug 2024 20:05:15 +0800 Subject: Disable WebRTC on FreeBSD Vivox even got broken here. But at least this port is still very much alive. WebRTC is not going to kill our FreeBSD port. --- indra/CMakeLists.txt | 2 + indra/newview/CMakeLists.txt | 9 ++- indra/newview/llvoiceclient.cpp | 121 ++++++++++++++++++++++++++++++++++++++-- indra/newview/llvoicevivox.h | 2 + 4 files changed, 128 insertions(+), 6 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 32f62ad681..a1eed8e989 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -58,7 +58,9 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llmessage) add_subdirectory(${LIBS_OPEN_PREFIX}llprimitive) add_subdirectory(${LIBS_OPEN_PREFIX}llrender) add_subdirectory(${LIBS_OPEN_PREFIX}llfilesystem) +if (NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD) add_subdirectory(${LIBS_OPEN_PREFIX}llwebrtc) +endif () add_subdirectory(${LIBS_OPEN_PREFIX}llwindow) add_subdirectory(${LIBS_OPEN_PREFIX}llxml) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b1c1c73786..55dfa83e8a 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -748,6 +748,10 @@ set(viewer_SOURCE_FILES pipeline.cpp ) +if (CMAKE_SYSTEM_NAME MATCHES FreeBSD) + list(REMOVE_ITEM viewer_SOURCE_FILES llvoicewebrtc.cpp) +endif () + set(VIEWER_BINARY_NAME "secondlife-bin" CACHE STRING "The name of the viewer executable to create.") @@ -1962,7 +1966,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} llcorehttp llcommon llmeshoptimizer - llwebrtc ll::ndof lllogin llprimitive @@ -1972,6 +1975,10 @@ target_link_libraries(${VIEWER_BINARY_NAME} ll::tracy ) +if (NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD) + target_link_libraries(${VIEWER_BINARY_NAME} llwebrtc ) +endif () + if (ENABLE_MEDIA_PLUGINS) target_link_libraries(${VIEWER_BINARY_NAME} ll::libvlc ) if (DARWIN OR LINUX) diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 0cf4a64c3d..44bf445522 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -26,7 +26,9 @@ #include "llvoiceclient.h" #include "llvoicevivox.h" +#if !__FreeBSD__ #include "llvoicewebrtc.h" +#endif #include "llviewernetwork.h" #include "llviewercontrol.h" #include "llcommandhandler.h" @@ -120,10 +122,12 @@ LLVoiceModuleInterface *getVoiceModule(const std::string &voice_server_type) { return (LLVoiceModuleInterface *) LLVivoxVoiceClient::getInstance(); } +#if !__FreeBSD__ else if (voice_server_type == WEBRTC_VOICE_SERVER_TYPE) { return (LLVoiceModuleInterface *) LLWebRTCVoiceClient::getInstance(); } +#endif else { LLNotificationsUtil::add("VoiceVersionMismatch"); @@ -165,14 +169,18 @@ void LLVoiceClient::init(LLPumpIO *pump) { // Initialize all of the voice modules m_servicePump = pump; +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->init(pump); +#endif LLVivoxVoiceClient::getInstance()->init(pump); } void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &agentID) { gAgent.addRegionChangedCallback(boost::bind(&LLVoiceClient::onRegionChanged, this)); +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->userAuthorized(user_id, agentID); +#endif LLVivoxVoiceClient::getInstance()->userAuthorized(user_id, agentID); } @@ -324,7 +332,9 @@ void LLVoiceClient::updateSettings() updateMicMuteLogic(); +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->updateSettings(); +#endif LLVivoxVoiceClient::getInstance()->updateSettings(); } @@ -333,34 +343,54 @@ void LLVoiceClient::updateSettings() void LLVoiceClient::tuningStart() { +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->tuningStart(); +#endif LLVivoxVoiceClient::getInstance()->tuningStart(); } void LLVoiceClient::tuningStop() { +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->tuningStop(); +#endif LLVivoxVoiceClient::getInstance()->tuningStop(); } bool LLVoiceClient::inTuningMode() { +#if __FreeBSD__ + return LLVivoxVoiceClient::getInstance()->inTuningMode(); +#else return LLWebRTCVoiceClient::getInstance()->inTuningMode(); +#endif } void LLVoiceClient::tuningSetMicVolume(float volume) { +#if __FreeBSD__ + LLVivoxVoiceClient::getInstance()->tuningSetMicVolume(volume); +#else LLWebRTCVoiceClient::getInstance()->tuningSetMicVolume(volume); +#endif } void LLVoiceClient::tuningSetSpeakerVolume(float volume) { +#if __FreeBSD__ + LLVivoxVoiceClient::getInstance()->tuningSetSpeakerVolume(volume); +#else LLWebRTCVoiceClient::getInstance()->tuningSetSpeakerVolume(volume); +#endif } float LLVoiceClient::tuningGetEnergy(void) { +#if __FreeBSD__ + return LLVivoxVoiceClient::getInstance()->tuningGetEnergy(); +#else return LLWebRTCVoiceClient::getInstance()->tuningGetEnergy(); +#endif } //------------------------------------------------ @@ -368,40 +398,64 @@ float LLVoiceClient::tuningGetEnergy(void) bool LLVoiceClient::deviceSettingsAvailable() { +#if __FreeBSD__ + return LLVivoxVoiceClient::getInstance()->deviceSettingsAvailable(); +#else return LLWebRTCVoiceClient::getInstance()->deviceSettingsAvailable(); +#endif } bool LLVoiceClient::deviceSettingsUpdated() { +#if __FreeBSD__ + return LLVivoxVoiceClient::getInstance()->deviceSettingsUpdated(); +#else return LLWebRTCVoiceClient::getInstance()->deviceSettingsUpdated(); +#endif } void LLVoiceClient::refreshDeviceLists(bool clearCurrentList) { +#if __FreeBSD__ + LLVivoxVoiceClient::getInstance()->refreshDeviceLists(clearCurrentList); +#else LLWebRTCVoiceClient::getInstance()->refreshDeviceLists(clearCurrentList); +#endif } void LLVoiceClient::setCaptureDevice(const std::string& name) { LLVivoxVoiceClient::getInstance()->setCaptureDevice(name); +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->setCaptureDevice(name); +#endif } void LLVoiceClient::setRenderDevice(const std::string& name) { LLVivoxVoiceClient::getInstance()->setRenderDevice(name); +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->setRenderDevice(name); +#endif } const LLVoiceDeviceList& LLVoiceClient::getCaptureDevices() { +#if __FreeBSD__ + return LLVivoxVoiceClient::getInstance()->getCaptureDevices(); +#else return LLWebRTCVoiceClient::getInstance()->getCaptureDevices(); +#endif } const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() { +#if __FreeBSD__ + return LLVivoxVoiceClient::getInstance()->getRenderDevices(); +#else return LLWebRTCVoiceClient::getInstance()->getRenderDevices(); +#endif } @@ -410,13 +464,18 @@ const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() void LLVoiceClient::getParticipantList(std::set &participants) { +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->getParticipantList(participants); +#endif LLVivoxVoiceClient::getInstance()->getParticipantList(participants); } bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) { - return LLWebRTCVoiceClient::getInstance()->isParticipant(speaker_id) || + return +#if !__FreeBSD__ + LLWebRTCVoiceClient::getInstance()->isParticipant(speaker_id) || +#endif LLVivoxVoiceClient::getInstance()->isParticipant(speaker_id); } @@ -509,13 +568,19 @@ void LLVoiceClient::activateSpatialChannel(bool activate) bool LLVoiceClient::isCurrentChannel(const LLSD& channelInfo) { - return LLWebRTCVoiceClient::getInstance()->isCurrentChannel(channelInfo) || + return +#if !__FreeBSD__ + LLWebRTCVoiceClient::getInstance()->isCurrentChannel(channelInfo) || +#endif LLVivoxVoiceClient::getInstance()->isCurrentChannel(channelInfo); } bool LLVoiceClient::compareChannels(const LLSD &channelInfo1, const LLSD &channelInfo2) { - return LLWebRTCVoiceClient::getInstance()->compareChannels(channelInfo1, channelInfo2) || + return +#if !__FreeBSD__ + LLWebRTCVoiceClient::getInstance()->compareChannels(channelInfo1, channelInfo2) || +#endif LLVivoxVoiceClient::getInstance()->compareChannels(channelInfo1, channelInfo2); } @@ -557,13 +622,17 @@ LLVoiceP2POutgoingCallInterface *LLVoiceClient::getOutgoingCallInterface(const L void LLVoiceClient::setVoiceVolume(F32 volume) { +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->setVoiceVolume(volume); +#endif LLVivoxVoiceClient::getInstance()->setVoiceVolume(volume); } void LLVoiceClient::setMicGain(F32 gain) { +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->setMicGain(gain); +#endif LLVivoxVoiceClient::getInstance()->setMicGain(gain); } @@ -610,7 +679,9 @@ bool LLVoiceClient::voiceEnabled() void LLVoiceClient::setVoiceEnabled(bool enabled) { +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->setVoiceEnabled(enabled); +#endif LLVivoxVoiceClient::getInstance()->setVoiceEnabled(enabled); } @@ -630,7 +701,9 @@ void LLVoiceClient::updateMicMuteLogic() // Either of these always overrides any other PTT setting. new_mic_mute = true; } +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->setMuteMic(new_mic_mute); +#endif LLVivoxVoiceClient::getInstance()->setMuteMic(new_mic_mute); } @@ -725,18 +798,26 @@ BOOL LLVoiceClient::getVoiceEnabled(const LLUUID& id) std::string LLVoiceClient::getDisplayName(const LLUUID& id) { +#if __FreeBSD__ + return LLVivoxVoiceClient::getInstance()->getDisplayName(id); +#else std::string result = LLWebRTCVoiceClient::getInstance()->getDisplayName(id); if (result.empty()) { result = LLVivoxVoiceClient::getInstance()->getDisplayName(id); } return result; +#endif } bool LLVoiceClient::isVoiceWorking() const { +#if __FreeBSD__ + return LLVivoxVoiceClient::getInstance()->isVoiceWorking(); +#else return LLVivoxVoiceClient::getInstance()->isVoiceWorking() || LLWebRTCVoiceClient::getInstance()->isVoiceWorking(); +#endif } BOOL LLVoiceClient::isParticipantAvatar(const LLUUID& id) @@ -751,7 +832,10 @@ BOOL LLVoiceClient::isOnlineSIP(const LLUUID& id) BOOL LLVoiceClient::getIsSpeaking(const LLUUID& id) { - return LLWebRTCVoiceClient::getInstance()->getIsSpeaking(id) || + return +#if !__FreeBSD__ + LLWebRTCVoiceClient::getInstance()->getIsSpeaking(id) || +#endif LLVivoxVoiceClient::getInstance()->getIsSpeaking(id); } @@ -759,14 +843,21 @@ BOOL LLVoiceClient::getIsModeratorMuted(const LLUUID& id) { // don't bother worrying about p2p calls, as // p2p calls don't have mute. - return LLWebRTCVoiceClient::getInstance()->getIsModeratorMuted(id) || + return +#if !__FreeBSD__ + LLWebRTCVoiceClient::getInstance()->getIsModeratorMuted(id) || +#endif LLVivoxVoiceClient::getInstance()->getIsModeratorMuted(id); } F32 LLVoiceClient::getCurrentPower(const LLUUID& id) { +#if __FreeBSD__ + return LLVivoxVoiceClient::getInstance()->getCurrentPower(id); +#else return std::fmax(LLVivoxVoiceClient::getInstance()->getCurrentPower(id), LLWebRTCVoiceClient::getInstance()->getCurrentPower(id)); +#endif } BOOL LLVoiceClient::getOnMuteList(const LLUUID& id) @@ -778,12 +869,18 @@ BOOL LLVoiceClient::getOnMuteList(const LLUUID& id) F32 LLVoiceClient::getUserVolume(const LLUUID& id) { +#if __FreeBSD__ + return LLVivoxVoiceClient::getInstance()->getUserVolume(id); +#else return std::fmax(LLVivoxVoiceClient::getInstance()->getUserVolume(id), LLWebRTCVoiceClient::getInstance()->getUserVolume(id)); +#endif } void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) { +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->setUserVolume(id, volume); +#endif LLVivoxVoiceClient::getInstance()->setUserVolume(id, volume); } @@ -793,37 +890,49 @@ void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer) { LLVivoxVoiceClient::getInstance()->addObserver(observer); +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->addObserver(observer); +#endif } void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) { LLVivoxVoiceClient::getInstance()->removeObserver(observer); +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->removeObserver(observer); +#endif } void LLVoiceClient::addObserver(LLFriendObserver* observer) { LLVivoxVoiceClient::getInstance()->addObserver(observer); +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->addObserver(observer); +#endif } void LLVoiceClient::removeObserver(LLFriendObserver* observer) { LLVivoxVoiceClient::getInstance()->removeObserver(observer); +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->removeObserver(observer); +#endif } void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) { LLVivoxVoiceClient::getInstance()->addObserver(observer); +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->addObserver(observer); +#endif } void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) { LLVivoxVoiceClient::getInstance()->removeObserver(observer); +#if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->removeObserver(observer); +#endif } std::string LLVoiceClient::sipURIFromID(const LLUUID &id) const @@ -886,10 +995,12 @@ class LLViewerRequiredVoiceVersion : public LLHTTPNode { voiceModule = (LLVoiceModuleInterface *) LLVivoxVoiceClient::getInstance(); } +#if !__FreeBSD__ else if (voice_server_type == "webrtc") { voiceModule = (LLVoiceModuleInterface *) LLWebRTCVoiceClient::getInstance(); } +#endif else { LL_WARNS("Voice") << "Unknown voice server type " << voice_server_type << LL_ENDL; diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 64c2c87db6..c2981b301d 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -39,6 +39,8 @@ class LLVivoxProtocolParser; #include "llcallingcard.h" // for LLFriendObserver #include "lleventcoro.h" #include "llcoros.h" +#include "llparcel.h" +#include "llmutelist.h" #include #ifdef LL_USESYSTEMLIBS -- cgit v1.2.3 From 4ba836ed2f4a67b976a87923c1deaaf2d3ae4880 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 3 Aug 2024 19:38:12 +0800 Subject: Revert "Build process' set up to link to Boost statically" This reverts commit 9268fdd5b99bb8e426e7c1232916dfd909039f96. --- indra/media_plugins/cef/CMakeLists.txt | 7 +++++++ indra/media_plugins/libvlc/CMakeLists.txt | 7 +++++++ indra/newview/FixBundle.cmake.in | 35 +++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 5f9ab88bd4..39353401e9 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -114,6 +114,13 @@ if (DARWIN) -change "/opt/local/lib/libexpat.1.dylib" "@loader_path/../../Frameworks/libexpat.1.dylib" -change "/opt/local/lib/libjsoncpp.25.dylib" "@loader_path/../../Frameworks/libjsoncpp.25.dylib" -change "/opt/local/lib/libz.1.dylib" "@loader_path/../../Frameworks/libz.1.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_context-mt.dylib" "@loader_path/../../Frameworks/libboost_context-mt.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_fiber-mt.dylib" "@loader_path/../../Frameworks/libboost_fiber-mt.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_filesystem-mt.dylib" "@loader_path/../../Frameworks/libboost_filesystem-mt.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_program_options-mt.dylib" "@loader_path/../../Frameworks/libboost_program_options-mt.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_regex-mt.dylib" "@loader_path/../../Frameworks/libboost_regex-mt.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_system-mt.dylib" "@loader_path/../../Frameworks/libboost_system-mt.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_thread-mt.dylib" "@loader_path/../../Frameworks/libboost_thread-mt.dylib" -change "/opt/local/lib/liburiparser.1.dylib" "@loader_path/../../Frameworks/liburiparser.1.dylib" -change "/opt/local/lib/libnghttp2.14.dylib" "@loader_path/../../Frameworks/libnghttp2.14.dylib" -change "/usr/local/lib/libxmlrpc-epi.0.dylib" "@loader_path/../../Frameworks/libxmlrpc-epi.0.dylib" diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index dd2cbff903..3c499b0cbd 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -60,6 +60,13 @@ if (DARWIN) -change "/opt/local/lib/libexpat.1.dylib" "@loader_path/../../Frameworks/libexpat.1.dylib" -change "/opt/local/lib/libjsoncpp.25.dylib" "@loader_path/../../Frameworks/libjsoncpp.25.dylib" -change "/opt/local/lib/libz.1.dylib" "@loader_path/../../Frameworks/libz.1.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_context-mt.dylib" "@loader_path/../../Frameworks/libboost_context-mt.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_fiber-mt.dylib" "@loader_path/../../Frameworks/libboost_fiber-mt.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_filesystem-mt.dylib" "@loader_path/../../Frameworks/libboost_filesystem-mt.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_program_options-mt.dylib" "@loader_path/../../Frameworks/libboost_program_options-mt.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_regex-mt.dylib" "@loader_path/../../Frameworks/libboost_regex-mt.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_system-mt.dylib" "@loader_path/../../Frameworks/libboost_system-mt.dylib" + -change "/opt/local/libexec/boost/1.76/lib/libboost_thread-mt.dylib" "@loader_path/../../Frameworks/libboost_thread-mt.dylib" -change "/opt/local/lib/liburiparser.1.dylib" "@loader_path/../../Frameworks/liburiparser.1.dylib" -change "/opt/local/lib/libnghttp2.14.dylib" "@loader_path/../../Frameworks/libnghttp2.14.dylib" -change "/usr/local/lib/libxmlrpc-epi.0.dylib" "@loader_path/../../Frameworks/libxmlrpc-epi.0.dylib" diff --git a/indra/newview/FixBundle.cmake.in b/indra/newview/FixBundle.cmake.in index 6841b2ede2..6d343680d9 100644 --- a/indra/newview/FixBundle.cmake.in +++ b/indra/newview/FixBundle.cmake.in @@ -61,6 +61,41 @@ file(CREATE_LINK "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libz.1.dylib" SYMBOLIC ) +file(CREATE_LINK + "../../../../Frameworks/libboost_context-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_context-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_fiber-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_fiber-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_filesystem-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_filesystem-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_program_options-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_program_options-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_regex-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_regex-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_system-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_system-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_thread-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_thread-mt.dylib" + SYMBOLIC + ) file(CREATE_LINK "../../../../Frameworks/liburiparser.1.dylib" "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/liburiparser.1.dylib" -- cgit v1.2.3