summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicewebrtc.h
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2023-09-12 15:17:08 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-02-08 18:34:01 -0800
commitfa313bab6348117f03b30dc4a5813b5058df57f7 (patch)
treed199958cd164d7553a7b7a7f61180f21bcd02fb0 /indra/newview/llvoicewebrtc.h
parentce01e3184ef88a5470a0f5c9f277dacc484020c0 (diff)
do some thread safety to prevent webrtc threads from conflicting with viewer threads.
Diffstat (limited to 'indra/newview/llvoicewebrtc.h')
-rw-r--r--indra/newview/llvoicewebrtc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h
index 22c022ffdb..061e00581e 100644
--- a/indra/newview/llvoicewebrtc.h
+++ b/indra/newview/llvoicewebrtc.h
@@ -252,6 +252,7 @@ public:
void OnIceGatheringState(IceGatheringState state) override;
void OnIceCandidate(const llwebrtc::LLWebRTCIceCandidate &candidate) override;
void OnOfferAvailable(const std::string &sdp) override;
+ void OnRenegotiationNeeded() override;
void OnAudioEstablished(llwebrtc::LLWebRTCAudioInterface *audio_interface) override;
//@}
@@ -651,7 +652,19 @@ private:
//---
void voiceControlCoro();
void voiceControlStateMachine();
+
int mVoiceControlState;
+ LLMutex mVoiceStateMutex;
+ void setVoiceControlState(int new_voice_control_state)
+ {
+ LLMutexLock lock(&mVoiceStateMutex);
+ mVoiceControlState = new_voice_control_state;
+ }
+ int getVoiceControlState()
+ {
+ LLMutexLock lock(&mVoiceStateMutex);
+ return mVoiceControlState;
+ }
bool endAndDisconnectSession();