diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-03-18 17:47:56 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-03-18 17:47:56 -0700 |
commit | e4dee511cab0a98e802e2c0cc12b3d8b9b90a8df (patch) | |
tree | 2f0b76f67e4eca3d03a061ad39b0cdeccd70d2ad /indra/newview/llvoicewebrtc.h | |
parent | 3794e3275c5fd2845d57cf99ae93c9632e9a6d69 (diff) |
Use LL::WorkQueue to handle transitions from llwebrtc threads to the main thread
Diffstat (limited to 'indra/newview/llvoicewebrtc.h')
-rw-r--r-- | indra/newview/llvoicewebrtc.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index b26bea27ce..b0c214dfd5 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -225,7 +225,8 @@ public: void OnDevicesChanged(const llwebrtc::LLWebRTCVoiceDeviceList &render_devices, const llwebrtc::LLWebRTCVoiceDeviceList &capture_devices) override; //@} - + void OnDevicesChangedImpl(const llwebrtc::LLWebRTCVoiceDeviceList &render_devices, + const llwebrtc::LLWebRTCVoiceDeviceList &capture_devices); struct participantState { @@ -445,6 +446,8 @@ private: /// Clean up objects created during a voice session. void cleanUp(); + LL::WorkQueue::weak_t mMainQueue; + bool mTuningMode; F32 mTuningMicGain; int mTuningSpeakerVolume; @@ -588,6 +591,13 @@ class LLVoiceWebRTCConnection : void OnPeerConnectionShutdown() override; //@} + void OnIceGatheringStateImpl(EIceGatheringState state); + void OnIceCandidateImpl(const llwebrtc::LLWebRTCIceCandidate &candidate); + void OnOfferAvailableImpl(const std::string &sdp); + void OnRenegotiationNeededImpl(); + void OnAudioEstablishedImpl(llwebrtc::LLWebRTCAudioInterface *audio_interface); + void OnPeerConnectionShutdownImpl(); + ///////////////////////// /// @name Data Notification /// LLWebRTCDataObserver @@ -596,6 +606,9 @@ class LLVoiceWebRTCConnection : void OnDataChannelReady(llwebrtc::LLWebRTCDataInterface *data_interface) override; //@} + void OnDataReceivedImpl(const std::string &data, bool binary); + void OnDataChannelReadyImpl(llwebrtc::LLWebRTCDataInterface *data_interface); + void sendJoin(); void sendData(const std::string &data); @@ -618,7 +631,6 @@ class LLVoiceWebRTCConnection : void shutDown() { - LLMutexLock lock(&mVoiceStateMutex); mShutDown = true; } @@ -644,11 +656,10 @@ class LLVoiceWebRTCConnection : } EVoiceConnectionState; EVoiceConnectionState mVoiceConnectionState; - LLMutex mVoiceStateMutex; + LL::WorkQueue::weak_t mMainQueue; + void setVoiceConnectionState(EVoiceConnectionState new_voice_connection_state) { - LLMutexLock lock(&mVoiceStateMutex); - if (new_voice_connection_state & VOICE_STATE_SESSION_STOPPING) { // the new state is shutdown or restart. @@ -666,11 +677,6 @@ class LLVoiceWebRTCConnection : } EVoiceConnectionState getVoiceConnectionState() { - if (mVoiceStateMutex.isLocked()) - { - LL_WARNS("Voice") << "LOCKED." << LL_ENDL; - } - LLMutexLock lock(&mVoiceStateMutex); return mVoiceConnectionState; } |