summaryrefslogtreecommitdiff
path: root/indra/llwebrtc
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-10-21 23:19:52 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-10-22 22:43:57 +0300
commitbb26aa3c2cb8ff961668cf0ad8180d3e9c57f941 (patch)
tree5234aecd40591493a5d18c450e90b21b57868614 /indra/llwebrtc
parent6a5d4e0e3de5448835b58177ce7a64119facbd28 (diff)
#4652 Improve switching of webrtc devices
Diffstat (limited to 'indra/llwebrtc')
-rw-r--r--indra/llwebrtc/llwebrtc.cpp7
-rw-r--r--indra/llwebrtc/llwebrtc.h1
-rw-r--r--indra/llwebrtc/llwebrtc_impl.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index b9f126e511..699e6b94a8 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -582,6 +582,13 @@ void LLWebRTCImpl::setRenderDevice(const std::string &id)
deployDevices();
}
+void LLWebRTCImpl::setDevices(const std::string& capture_id, const std::string& render_id)
+{
+ mRecordingDevice = capture_id;
+ mPlayoutDevice = render_id;
+ deployDevices();
+}
+
// updateDevices needs to happen on the worker thread.
void LLWebRTCImpl::updateDevices()
{
diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h
index 7d06b7d2b4..69dec8b2ce 100644
--- a/indra/llwebrtc/llwebrtc.h
+++ b/indra/llwebrtc/llwebrtc.h
@@ -150,6 +150,7 @@ class LLWebRTCDeviceInterface
// set the capture and render devices using the unique identifier for the device
virtual void setCaptureDevice(const std::string& id) = 0;
virtual void setRenderDevice(const std::string& id) = 0;
+ virtual void setDevices(const std::string& caprure_id, const std::string& render_id) = 0;
// Device observers for device change callbacks.
virtual void setDevicesObserver(LLWebRTCDevicesObserver *observer) = 0;
diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h
index 01cfb17ced..5e0885fda1 100644
--- a/indra/llwebrtc/llwebrtc_impl.h
+++ b/indra/llwebrtc/llwebrtc_impl.h
@@ -443,6 +443,7 @@ class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceO
void setCaptureDevice(const std::string& id) override;
void setRenderDevice(const std::string& id) override;
+ void setDevices(const std::string& caprure_id, const std::string& render_id) override;
void setTuningMode(bool enable) override;
float getTuningAudioLevel() override;