diff options
author | Roxie Linden <roxie@lindenlab.com> | 2023-09-19 10:14:29 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-02-08 18:34:01 -0800 |
commit | fd8119c550bea19bbcf26e5426f259010f54c43e (patch) | |
tree | 1a7e9fb0c7fa67a5ff7f16831cbffef86ec5ae24 /indra/newview | |
parent | 976a75ed24f11e3211a98120b1ac57126e625d6c (diff) |
add datachannel support
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llvoicewebrtc.h | 13 |
2 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 66bed5f0b5..9013de67f5 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -361,6 +361,9 @@ void LLWebRTCVoiceClient::init(LLPumpIO *pump) mWebRTCSignalingInterface = llwebrtc::getSignalingInterface(); mWebRTCSignalingInterface->setSignalingObserver(this); + + mWebRTCDataInterface = llwebrtc::getDataInterface(); + mWebRTCDataInterface->setDataObserver(this); } void LLWebRTCVoiceClient::terminate() @@ -2707,6 +2710,12 @@ void LLWebRTCVoiceClient::OnAudioEstablished(llwebrtc::LLWebRTCAudioInterface * setVoiceControlStateUnless(VOICE_STATE_SESSION_ESTABLISHED, VOICE_STATE_SESSION_RETRY); } +void LLWebRTCVoiceClient::OnDataReceived(const std::string& data, bool binary) +{ + +} + + void LLWebRTCVoiceClient::OnRenegotiationNeeded() { LL_INFOS("Voice") << "On Renegotiation Needed." << LL_ENDL; diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index eb3893fe2b..0d6988e1ef 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -59,7 +59,8 @@ class LLWebRTCVoiceClient : public LLSingleton<LLWebRTCVoiceClient>, virtual public LLVoiceModuleInterface, virtual public LLVoiceEffectInterface, public llwebrtc::LLWebRTCDevicesObserver, - public llwebrtc::LLWebRTCSignalingObserver + public llwebrtc::LLWebRTCSignalingObserver, + public llwebrtc::LLWebRTCDataObserver { LLSINGLETON_C11(LLWebRTCVoiceClient); LOG_CLASS(LLWebRTCVoiceClient); @@ -255,6 +256,13 @@ public: void OnRenegotiationNeeded() override; void OnAudioEstablished(llwebrtc::LLWebRTCAudioInterface *audio_interface) override; //@} + + ///////////////////////// + /// @name Data Notification + /// LLWebRTCDataObserver + //@{ + void OnDataReceived(const std::string& data, bool binary) override; + //@} void processIceUpdates(); void onIceUpdateComplete(const LLSD& result); @@ -761,7 +769,8 @@ private: llwebrtc::LLWebRTCDeviceInterface *mWebRTCDeviceInterface; llwebrtc::LLWebRTCSignalInterface *mWebRTCSignalingInterface; - llwebrtc::LLWebRTCAudioInterface *mWebRTCAudioInterface; + llwebrtc::LLWebRTCAudioInterface *mWebRTCAudioInterface; + llwebrtc::LLWebRTCDataInterface *mWebRTCDataInterface; LLVoiceDeviceList mCaptureDevices; LLVoiceDeviceList mRenderDevices; |