summaryrefslogtreecommitdiff
path: root/indra/llwebrtc
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-09-16 16:38:28 +0800
committerErik Kundiman <erik@megapahit.org>2024-09-16 16:38:28 +0800
commit16ecc9d734341618299327c7699168274341a864 (patch)
tree1fcfc018867ca6f96b4e52321cfdae8ad8272278 /indra/llwebrtc
parentb282315fa1429a5b9872cfa773745f7ad65c1e19 (diff)
WebRTC on Fedora & openSUSE without breaking CEF
Thanks to the Linux x86-64 WebRTC binary from Zenichi Amano (crow-misia). https://megapahit.com/show_bug.cgi?id=64 Haven't been tested on openSUSE, but it should work.
Diffstat (limited to 'indra/llwebrtc')
-rw-r--r--indra/llwebrtc/CMakeLists.txt6
-rw-r--r--indra/llwebrtc/llwebrtc.cpp2
-rw-r--r--indra/llwebrtc/llwebrtc_impl.h13
3 files changed, 10 insertions, 11 deletions
diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt
index 21ce222aea..9f050daa77 100644
--- a/indra/llwebrtc/CMakeLists.txt
+++ b/indra/llwebrtc/CMakeLists.txt
@@ -28,11 +28,9 @@ list(APPEND llwebrtc_SOURCE_FILES ${llwebrtc_HEADER_FILES})
add_library (llwebrtc SHARED ${llwebrtc_SOURCE_FILES})
-if (USESYSTEMLIBS)
-target_compile_definitions(llwebrtc INTERFACE LL_WEBRTC=1)
-else (USESYSTEMLIBS)
+if (NOT USESYSTEMLIBS)
set_target_properties(llwebrtc PROPERTIES PUBLIC_HEADER llwebrtc.h)
-endif (USESYSTEMLIBS)
+endif (NOT USESYSTEMLIBS)
if (WINDOWS)
cmake_policy(SET CMP0091 NEW)
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index 83350dd457..9b3dde4d0f 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -203,7 +203,7 @@ void LLWebRTCImpl::init()
mTuningDeviceModule->SetPlayoutDevice(mPlayoutDevice);
mTuningDeviceModule->SetRecordingDevice(mRecordingDevice);
mTuningDeviceModule->EnableBuiltInAEC(false);
-#if __x86_64__ && !__FreeBSD__
+#if !CM_WEBRTC
mTuningDeviceModule->SetAudioDeviceSink(this);
#endif
mTuningDeviceModule->InitMicrophone();
diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h
index 6543b2718c..7dd6154d75 100644
--- a/indra/llwebrtc/llwebrtc_impl.h
+++ b/indra/llwebrtc/llwebrtc_impl.h
@@ -184,9 +184,10 @@ class LLCustomProcessor : public webrtc::CustomProcessing
// Primary singleton implementation for interfacing
// with the native webrtc library.
+#if CM_WEBRTC
class LLWebRTCImpl : public LLWebRTCDeviceInterface
-#if __x86_64__ && !__FreeBSD__
- , public webrtc::AudioDeviceSink
+#else
+class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceSink
#endif
{
public:
@@ -222,11 +223,11 @@ class LLWebRTCImpl : public LLWebRTCDeviceInterface
//
// AudioDeviceSink
//
- void OnDevicesUpdated()
-#if __x86_64__ && !__FreeBSD__
- override
+#if CM_WEBRTC
+ void OnDevicesUpdated();
+#else
+ void OnDevicesUpdated() override;
#endif
- ;
//
// Helpers