diff options
Diffstat (limited to 'indra/llwebrtc')
-rw-r--r-- | indra/llwebrtc/CMakeLists.txt | 25 | ||||
-rw-r--r-- | indra/llwebrtc/llwebrtc.cpp | 8 |
2 files changed, 18 insertions, 15 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(); } }); |