From 16ecc9d734341618299327c7699168274341a864 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 16 Sep 2024 16:38:28 +0800 Subject: 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. --- indra/llwebrtc/CMakeLists.txt | 6 ++---- indra/llwebrtc/llwebrtc.cpp | 2 +- indra/llwebrtc/llwebrtc_impl.h | 13 +++++++------ 3 files changed, 10 insertions(+), 11 deletions(-) (limited to 'indra/llwebrtc') 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 -- cgit v1.2.3