summaryrefslogtreecommitdiff
path: root/indra/llwebrtc
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwebrtc')
-rw-r--r--indra/llwebrtc/CMakeLists.txt25
-rw-r--r--indra/llwebrtc/llwebrtc.cpp8
-rw-r--r--indra/llwebrtc/llwebrtc_impl.h6
3 files changed, 23 insertions, 16 deletions
diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt
index 9f050daa77..a64a3e4dac 100644
--- a/indra/llwebrtc/CMakeLists.txt
+++ b/indra/llwebrtc/CMakeLists.txt
@@ -28,9 +28,7 @@ list(APPEND llwebrtc_SOURCE_FILES ${llwebrtc_HEADER_FILES})
add_library (llwebrtc SHARED ${llwebrtc_SOURCE_FILES})
-if (NOT USESYSTEMLIBS)
-set_target_properties(llwebrtc PROPERTIES PUBLIC_HEADER llwebrtc.h)
-endif (NOT USESYSTEMLIBS)
+#set_target_properties(llwebrtc PROPERTIES PUBLIC_HEADER llwebrtc.h)
if (WINDOWS)
cmake_policy(SET CMP0091 NEW)
@@ -58,7 +56,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)
@@ -80,12 +78,17 @@ endif (LL_TESTS)
if (INSTALL)
if (DARWIN)
set(_LIB ../Frameworks)
- elseif (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu)
+ elseif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu))
set(_LIB lib/${ARCH}-linux-gnu)
- elseif (EXISTS /lib64)
- set(_LIB lib64)
- else (DARWIN)
+ 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 (DARWIN)
- install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB})
-endif (INSTALL)
+ 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 9b3dde4d0f..2ee6d912c1 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -432,9 +432,7 @@ void ll_set_device_module_capture_device(rtc::scoped_refptr<webrtc::AudioDeviceM
// has it at 0
device_module->SetRecordingDevice(device + 1);
#endif
- device_module->SetStereoRecording(false);
device_module->InitMicrophone();
- device_module->InitRecording();
}
void LLWebRTCImpl::setCaptureDevice(const std::string &id)
@@ -475,6 +473,8 @@ void LLWebRTCImpl::setCaptureDevice(const std::string &id)
ll_set_device_module_capture_device(mPeerDeviceModule, recordingDevice);
if (recording)
{
+ mPeerDeviceModule->SetStereoRecording(false);
+ mPeerDeviceModule->InitRecording();
mPeerDeviceModule->StartRecording();
}
});
@@ -496,9 +496,7 @@ void ll_set_device_module_render_device(rtc::scoped_refptr<webrtc::AudioDeviceMo
#else
device_module->SetPlayoutDevice(device + 1);
#endif
- device_module->SetStereoPlayout(true);
device_module->InitSpeaker();
- device_module->InitPlayout();
}
void LLWebRTCImpl::setRenderDevice(const std::string &id)
@@ -542,6 +540,8 @@ void LLWebRTCImpl::setRenderDevice(const std::string &id)
ll_set_device_module_render_device(mPeerDeviceModule, playoutDevice);
if (playing)
{
+ mPeerDeviceModule->SetStereoPlayout(true);
+ mPeerDeviceModule->InitPlayout();
mPeerDeviceModule->StartPlayout();
}
});
diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h
index 7dd6154d75..99accb2c20 100644
--- a/indra/llwebrtc/llwebrtc_impl.h
+++ b/indra/llwebrtc/llwebrtc_impl.h
@@ -41,6 +41,7 @@
#include "llwebrtc.h"
// WebRTC Includes
#ifdef WEBRTC_WIN
+#pragma warning(push)
#pragma warning(disable : 4996) // ignore 'deprecated.' We don't use the functions marked
// deprecated in the webrtc headers, but msvc complains anyway.
// Clang doesn't, and that's generally what webrtc uses.
@@ -63,7 +64,6 @@
#include "api/task_queue/default_task_queue_factory.h"
#include "modules/audio_device/include/audio_device_defines.h"
-
namespace llwebrtc
{
@@ -442,4 +442,8 @@ class LLWebRTCPeerConnectionImpl : public LLWebRTCPeerConnectionInterface,
}
+#if WEBRTC_WIN
+#pragma warning(pop)
+#endif
+
#endif // LLWEBRTC_IMPL_H