diff options
Diffstat (limited to 'indra/newview/llvoicewebrtc.h')
-rw-r--r-- | indra/newview/llvoicewebrtc.h | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index b26bea27ce..21fc79420b 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; @@ -585,7 +588,6 @@ class LLVoiceWebRTCConnection : void OnOfferAvailable(const std::string &sdp) override; void OnRenegotiationNeeded() override; void OnAudioEstablished(llwebrtc::LLWebRTCAudioInterface *audio_interface) override; - void OnPeerConnectionShutdown() override; //@} ///////////////////////// @@ -596,6 +598,8 @@ class LLVoiceWebRTCConnection : void OnDataChannelReady(llwebrtc::LLWebRTCDataInterface *data_interface) override; //@} + void OnDataReceivedImpl(const std::string &data, bool binary); + void sendJoin(); void sendData(const std::string &data); @@ -618,12 +622,10 @@ class LLVoiceWebRTCConnection : void shutDown() { - LLMutexLock lock(&mVoiceStateMutex); mShutDown = true; } void OnVoiceConnectionRequestSuccess(const LLSD &body); - void OnVoiceConnectionRequestFailure(std::string url, int retries, LLSD body, const LLSD &result); protected: typedef enum e_voice_connection_state @@ -644,11 +646,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,19 +667,13 @@ class LLVoiceWebRTCConnection : } EVoiceConnectionState getVoiceConnectionState() { - if (mVoiceStateMutex.isLocked()) - { - LL_WARNS("Voice") << "LOCKED." << LL_ENDL; - } - LLMutexLock lock(&mVoiceStateMutex); return mVoiceConnectionState; } - virtual bool requestVoiceConnection() = 0; + virtual void requestVoiceConnection() = 0; + void requestVoiceConnectionCoro() { requestVoiceConnection(); } - bool breakVoiceConnection(bool wait); - void OnVoiceDisconnectionRequestSuccess(const LLSD &body); - void OnVoiceDisconnectionRequestFailure(std::string url, int retries, LLSD body, const LLSD &result); + void breakVoiceConnection(); LLUUID mRegionID; LLUUID mViewerSession; @@ -725,7 +720,7 @@ class LLVoiceWebRTCSpatialConnection : protected: - bool requestVoiceConnection() override; + void requestVoiceConnection() override; S32 mParcelLocalID; }; @@ -740,7 +735,7 @@ class LLVoiceWebRTCAdHocConnection : public LLVoiceWebRTCConnection bool isSpatial() override { return false; } protected: - bool requestVoiceConnection() override; + void requestVoiceConnection() override; std::string mCredentials; }; |