summaryrefslogtreecommitdiff
path: root/indra/llwebrtc
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwebrtc')
-rw-r--r--indra/llwebrtc/CMakeLists.txt22
-rw-r--r--indra/llwebrtc/llwebrtc.cpp16
-rw-r--r--indra/llwebrtc/llwebrtc_impl.h10
3 files changed, 46 insertions, 2 deletions
diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt
index eb10f4eee4..a01d9fc632 100644
--- a/indra/llwebrtc/CMakeLists.txt
+++ b/indra/llwebrtc/CMakeLists.txt
@@ -24,7 +24,7 @@ list(APPEND llwebrtc_SOURCE_FILES ${llwebrtc_HEADER_FILES})
add_library (llwebrtc SHARED ${llwebrtc_SOURCE_FILES})
-set_target_properties(llwebrtc PROPERTIES PUBLIC_HEADER llwebrtc.h)
+#set_target_properties(llwebrtc PROPERTIES PUBLIC_HEADER llwebrtc.h)
if (WINDOWS)
cmake_policy(SET CMP0091 NEW)
@@ -52,7 +52,7 @@ elseif (DARWIN)
set_target_properties(llwebrtc PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym"
XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/dSYMs")
endif (USE_BUGSPLAT)
-elseif (LINUX)
+elseif (NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD)
target_link_libraries(llwebrtc PRIVATE ll::webrtc)
endif (WINDOWS)
@@ -72,3 +72,21 @@ ADD_CUSTOM_COMMAND(TARGET llwebrtc POST_BUILD
# Add tests
if (LL_TESTS)
endif (LL_TESTS)
+
+if (INSTALL)
+ if (DARWIN)
+ set(_LIB ../Frameworks)
+ elseif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu))
+ set(_LIB lib/${ARCH}-linux-gnu)
+ elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR (${LINUX_DISTRO} MATCHES gentoo))
+ set(_LIB lib${ADDRESS_SIZE})
+ else ()
+ set(_LIB lib)
+ endif ()
+
+ if (WINDOWS)
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${PROJECT_NAME}.dll DESTINATION .)
+ else ()
+ install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB})
+ endif ()
+endif ()
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index 161d8d7e91..7c2481a94c 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -39,6 +39,20 @@
#include "modules/audio_mixer/audio_mixer_impl.h"
#include "api/environment/environment_factory.h"
+#if CM_WEBRTC
+
+#include "modules/congestion_controller/goog_cc/loss_based_bwe_v2.h"
+
+webrtc::RtpStreamConfig::Rtx::Rtx()
+{
+}
+
+webrtc::LossBasedBweV2::Config::Config()
+{
+}
+
+#endif
+
namespace llwebrtc
{
#if WEBRTC_WIN
@@ -292,7 +306,9 @@ void LLWebRTCImpl::init()
webrtc::scoped_refptr<webrtc::AudioDeviceModule> realADM =
webrtc::AudioDeviceModule::Create(webrtc::AudioDeviceModule::AudioLayer::kPlatformDefaultAudio, mTaskQueueFactory.get());
mDeviceModule = webrtc::make_ref_counted<LLWebRTCAudioDeviceModule>(realADM);
+#if !CM_WEBRTC
mDeviceModule->SetObserver(this);
+#endif
});
// The custom processor allows us to retrieve audio data (and levels)
diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h
index 01cfb17ced..9d3af985ef 100644
--- a/indra/llwebrtc/llwebrtc_impl.h
+++ b/indra/llwebrtc/llwebrtc_impl.h
@@ -316,9 +316,11 @@ public:
virtual int GetRecordAudioParameters(AudioParameters* params) override { return inner_->GetRecordAudioParameters(params); }
#endif // WEBRTC_IOS
+#if !CM_WEBRTC
virtual int32_t GetPlayoutDevice() const override { return inner_->GetPlayoutDevice(); }
virtual int32_t GetRecordingDevice() const override { return inner_->GetRecordingDevice(); }
virtual int32_t SetObserver(webrtc::AudioDeviceObserver* observer) override { return inner_->SetObserver(observer); }
+#endif
// tuning microphone energy calculations
float GetMicrophoneEnergy() { return audio_transport_.GetMicrophoneEnergy(); }
@@ -415,7 +417,11 @@ protected:
// Primary singleton implementation for interfacing
// with the native webrtc library.
+#if CM_WEBRTC
+class LLWebRTCImpl : public LLWebRTCDeviceInterface
+#else
class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceObserver
+#endif
{
public:
LLWebRTCImpl(LLWebRTCLogCallback* logCallback);
@@ -458,7 +464,11 @@ class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceO
//
// AudioDeviceObserver
//
+#if CM_WEBRTC
+ void OnDevicesUpdated();
+#else
void OnDevicesUpdated() override;
+#endif
//
// Helpers