summaryrefslogtreecommitdiff
path: root/indra/llwebrtc/llwebrtc.cpp
diff options
context:
space:
mode:
authorRoxanne Skelly <roxie@lindenlab.com>2024-08-01 09:33:33 -0700
committerGitHub <noreply@github.com>2024-08-01 09:33:33 -0700
commit5f66a15142083a047ac945da94f167c24c95f49a (patch)
tree1f88fac45393977ec286e2635f2ff08ab608e830 /indra/llwebrtc/llwebrtc.cpp
parent89d5e8bf4fc481be08800a30c1fe14baa170ba7e (diff)
parentb9c222dfaeb4531f91f6e0bb02bb4b0da599d08b (diff)
Merge pull request #2162 from secondlife/roxie/webrtc-voice-crash-detect
[WebRTC] Implement a Logging Sink for WebRTC
Diffstat (limited to 'indra/llwebrtc/llwebrtc.cpp')
-rw-r--r--indra/llwebrtc/llwebrtc.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index 6dc632aba4..2c890acbdb 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -154,7 +154,8 @@ void LLCustomProcessor::Process(webrtc::AudioBuffer *audio_in)
// LLWebRTCImpl implementation
//
-LLWebRTCImpl::LLWebRTCImpl() :
+LLWebRTCImpl::LLWebRTCImpl(LLWebRTCLogCallback* logCallback) :
+ mLogSink(new LLWebRTCLogSink(logCallback)),
mPeerCustomProcessor(nullptr),
mMute(true),
mTuningMode(false),
@@ -173,6 +174,7 @@ void LLWebRTCImpl::init()
// Normal logging is rather spammy, so turn it off.
rtc::LogMessage::LogToDebug(rtc::LS_NONE);
rtc::LogMessage::SetLogToStderr(true);
+ rtc::LogMessage::AddLogToStream(mLogSink, rtc::LS_VERBOSE);
mTaskQueueFactory = webrtc::CreateDefaultTaskQueueFactory();
@@ -312,6 +314,7 @@ void LLWebRTCImpl::terminate()
mPeerDeviceModule = nullptr;
mTaskQueueFactory = nullptr;
});
+ rtc::LogMessage::RemoveLogToStream(mLogSink);
}
//
@@ -1327,9 +1330,9 @@ void freePeerConnection(LLWebRTCPeerConnectionInterface* peer_connection)
}
-void init()
+void init(LLWebRTCLogCallback* logCallback)
{
- gWebRTCImpl = new LLWebRTCImpl();
+ gWebRTCImpl = new LLWebRTCImpl(logCallback);
gWebRTCImpl->init();
}