diff options
author | Brad Linden <brad@lindenlab.com> | 2024-08-15 09:41:54 -0700 |
---|---|---|
committer | Brad Linden <brad@lindenlab.com> | 2024-08-15 09:41:54 -0700 |
commit | 5f26ba801475d1a212b00503197dbc5a77cee1d8 (patch) | |
tree | cf8aa8c3189462ea3ac51866be243e6fd8a70be6 /indra/newview/llvoicechannel.cpp | |
parent | ac330f63fd7ac655bbd06ce5d4ed65430aa2f42a (diff) | |
parent | 3ca4bb6bf7ba1367e06705da3968174ff9448d7d (diff) |
Merge remote-tracking branch 'origin/release/webrtc-voice' into release/2024.06-atlasaurus
# Conflicts:
# indra/newview/llpanelpeople.cpp
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r-- | indra/newview/llvoicechannel.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 5914303e80..eb1cd00940 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -81,10 +81,7 @@ LLVoiceChannel::~LLVoiceChannel() { sCurrentVoiceChannel = NULL; // Must check instance exists here, the singleton MAY have already been destroyed. - if(LLVoiceClient::instanceExists()) - { - LLVoiceClient::getInstance()->removeObserver(this); - } + LLVoiceClient::removeObserver(this); } sVoiceChannelMap.erase(mSessionID); @@ -118,6 +115,12 @@ void LLVoiceChannel::setChannelInfo(const LLSD &channelInfo) } } +void LLVoiceChannel::resetChannelInfo() +{ + mChannelInfo = LLSD(); + mState = STATE_NO_CHANNEL_INFO; +} + void LLVoiceChannel::onChange(EStatusType type, const LLSD& channelInfo, bool proximal) { LL_DEBUGS("Voice") << "Incoming channel info: " << channelInfo << LL_ENDL; @@ -219,7 +222,7 @@ void LLVoiceChannel::deactivate() LLVoiceClient::getInstance()->setUserPTTState(false); } } - LLVoiceClient::getInstance()->removeObserver(this); + LLVoiceClient::removeObserver(this); if (sCurrentVoiceChannel == this) { @@ -259,7 +262,7 @@ void LLVoiceChannel::activate() setState(STATE_CALL_STARTED); } - LLVoiceClient::getInstance()->addObserver(this); + LLVoiceClient::addObserver(this); //do not send earlier, channel should be initialized, should not be in STATE_NO_CHANNEL_INFO state sCurrentVoiceChannelChangedSignal(this->mSessionID); @@ -751,7 +754,7 @@ void LLVoiceChannelProximal::deactivate() { setState(STATE_HUNG_UP); } - LLVoiceClient::getInstance()->removeObserver(this); + LLVoiceClient::removeObserver(this); LLVoiceClient::getInstance()->activateSpatialChannel(false); } @@ -918,6 +921,12 @@ void LLVoiceChannelP2P::setChannelInfo(const LLSD& channel_info) } } +void LLVoiceChannelP2P::resetChannelInfo() +{ + mChannelInfo = LLVoiceClient::getInstance()->getP2PChannelInfoTemplate(mOtherUserID); + mState = STATE_NO_CHANNEL_INFO; // we have template, not full info +} + void LLVoiceChannelP2P::setState(EState state) { LL_INFOS("Voice") << "P2P CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << LL_ENDL; |