From 433a9c3b580692e814f1462aaf1ba51b393ca5c2 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 11 May 2026 21:35:37 +0800 Subject: Ubuntu package pulls Boost 1.90 now on 26.04 --- indra/newview/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 12a0cb971b..e85a05fc47 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2390,7 +2390,7 @@ if (LINUX) CACHE STRING "Debian package dependencies.") endif () else () - set(CPACK_DEBIAN_PACKAGE_DEPENDS "libaprutil1t64, libboost-fiber1.83.0, libboost-filesystem1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libboost-thread1.83.0, libboost-url1.83.0, libexpat1, libfltk1.3t64, libgles-dev, libglu1-mesa, libhunspell-1.7-0, libmeshoptimizer2d, libminizip1t64, libnghttp2-14, libnspr4, libnss3, libsdl2-2.0-0, libvlc5, libvorbisenc2, libvorbisfile3, vlc-plugin-base" + set(CPACK_DEBIAN_PACKAGE_DEPENDS "libaprutil1t64, libboost-fiber1.90.0, libboost-filesystem1.90.0, libboost-program-options1.90.0, libboost-regex1.90.0, libboost-thread1.90.0, libboost-url1.90.0, libexpat1, libfltk1.3t64, libgles-dev, libglu1-mesa, libhunspell-1.7-0, libmeshoptimizer2d, libminizip1t64, libnghttp2-14, libnspr4, libnss3, libsdl2-2.0-0, libvlc5, libvorbisenc2, libvorbisfile3, vlc-plugin-base" CACHE STRING "Debian package dependencies.") endif () elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) -- cgit v1.3 From c4dd7566519fd0213c05fe13e8c34e796ee499e2 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 14 May 2026 17:51:25 +0800 Subject: Update RPM package dependencies for Fedora 44 From SDL2 to sdl2-compat and from openjpeg2 to openjpeg. --- indra/newview/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e85a05fc47..2a07d6de2f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2408,7 +2408,7 @@ if (LINUX) set(CPACK_RPM_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_DESCRIPTION} CACHE STRING "RPM package description.") if (${LINUX_DISTRO} MATCHES fedora) - set(CPACK_RPM_PACKAGE_REQUIRES "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, boost-url, expat, fltk, mesa-libGLU, hunspell, libnghttp2, openjpeg2, SDL2, vlc-libs, vlc-plugins-base, libvorbis" + set(CPACK_RPM_PACKAGE_REQUIRES "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, boost-url, expat, fltk, mesa-libGLU, hunspell, libnghttp2, openjpeg, sdl2-compat, vlc-libs, vlc-plugins-base, libvorbis" CACHE STRING "RPM package requirements.") else () set(CPACK_RPM_PACKAGE_REQUIRES "libapr-util1-0, libboost_fiber1_91_0, libboost_program_options1_91_0, libboost_regex1_91_0, libboost_thread1_91_0, libboost_url1_91_0, libboost_url1_91_0-x86-64-v3, libpng16-16 expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, openjpeg2, libSDL2-2_0-0, libvlc5, libvorbis0" -- cgit v1.3 From e2bbc96a057eaacf8bfbc6614c156634a7697ee0 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 14 May 2026 17:54:33 +0800 Subject: USE_WEBRTC compile def for easily ruling out platforms that can't have WebRTC support yet or have some problem with WebRTC (crashed by it). --- indra/newview/CMakeLists.txt | 1 + indra/newview/llvoiceclient.cpp | 84 ++++++++++++++++++++--------------------- 2 files changed, 43 insertions(+), 42 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 2a07d6de2f..ace6e203e6 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2205,6 +2205,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ) if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64))) + target_compile_definitions(${VIEWER_BINARY_NAME} INTERFACE USE_WEBRTC=1) target_link_libraries(${VIEWER_BINARY_NAME} llwebrtc ) endif () diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 59e8db7752..7f7d9342e0 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -26,7 +26,7 @@ #include "llvoiceclient.h" #include "llvoicevivox.h" -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC #include "llvoicewebrtc.h" #endif #include "llviewernetwork.h" @@ -122,7 +122,7 @@ LLVoiceModuleInterface *getVoiceModule(const std::string &voice_server_type) { return (LLVoiceModuleInterface *) LLVivoxVoiceClient::getInstance(); } -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC else if (voice_server_type == WEBRTC_VOICE_SERVER_TYPE) { return (LLVoiceModuleInterface *) LLWebRTCVoiceClient::getInstance(); @@ -169,7 +169,7 @@ void LLVoiceClient::init(LLPumpIO *pump) { // Initialize all of the voice modules m_servicePump = pump; -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->init(pump); #endif LLVivoxVoiceClient::getInstance()->init(pump); @@ -182,7 +182,7 @@ void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &age mRegionChangedCallbackSlot.disconnect(); } mRegionChangedCallbackSlot = gAgent.addRegionChangedCallback(boost::bind(&LLVoiceClient::onRegionChanged, this)); -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->userAuthorized(user_id, agentID); #endif LLVivoxVoiceClient::getInstance()->userAuthorized(user_id, agentID); @@ -294,7 +294,7 @@ void LLVoiceClient::setNonSpatialVoiceModule(const std::string &voice_server_typ void LLVoiceClient::setHidden(bool hidden) { LL_INFOS("Voice") << "( " << (hidden ? "true" : "false") << " )" << LL_ENDL; -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->setHidden(hidden); #endif LLVivoxVoiceClient::getInstance()->setHidden(hidden); @@ -302,7 +302,7 @@ void LLVoiceClient::setHidden(bool hidden) void LLVoiceClient::terminate() { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC if (LLVivoxVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->terminate(); @@ -346,7 +346,7 @@ void LLVoiceClient::updateSettings() updateMicMuteLogic(); -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->updateSettings(); #endif LLVivoxVoiceClient::getInstance()->updateSettings(); @@ -357,7 +357,7 @@ void LLVoiceClient::updateSettings() void LLVoiceClient::tuningStart() { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->tuningStart(); #endif LLVivoxVoiceClient::getInstance()->tuningStart(); @@ -365,7 +365,7 @@ void LLVoiceClient::tuningStart() void LLVoiceClient::tuningStop() { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->tuningStop(); #endif LLVivoxVoiceClient::getInstance()->tuningStop(); @@ -373,7 +373,7 @@ void LLVoiceClient::tuningStop() bool LLVoiceClient::inTuningMode() { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return LLWebRTCVoiceClient::getInstance()->inTuningMode(); #else return LLVivoxVoiceClient::getInstance()->inTuningMode(); @@ -382,7 +382,7 @@ bool LLVoiceClient::inTuningMode() void LLVoiceClient::tuningSetMicVolume(float volume) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->tuningSetMicVolume(volume); #else LLVivoxVoiceClient::getInstance()->tuningSetMicVolume(volume); @@ -391,7 +391,7 @@ void LLVoiceClient::tuningSetMicVolume(float volume) void LLVoiceClient::tuningSetSpeakerVolume(float volume) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->tuningSetSpeakerVolume(volume); #else LLVivoxVoiceClient::getInstance()->tuningSetSpeakerVolume(volume); @@ -400,7 +400,7 @@ void LLVoiceClient::tuningSetSpeakerVolume(float volume) float LLVoiceClient::tuningGetEnergy(void) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return LLWebRTCVoiceClient::getInstance()->tuningGetEnergy(); #else return LLVivoxVoiceClient::getInstance()->tuningGetEnergy(); @@ -412,7 +412,7 @@ float LLVoiceClient::tuningGetEnergy(void) bool LLVoiceClient::deviceSettingsAvailable() { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return LLWebRTCVoiceClient::getInstance()->deviceSettingsAvailable(); #else return LLVivoxVoiceClient::getInstance()->deviceSettingsAvailable(); @@ -421,7 +421,7 @@ bool LLVoiceClient::deviceSettingsAvailable() bool LLVoiceClient::deviceSettingsUpdated() { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return LLWebRTCVoiceClient::getInstance()->deviceSettingsUpdated(); #else return LLVivoxVoiceClient::getInstance()->deviceSettingsUpdated(); @@ -430,7 +430,7 @@ bool LLVoiceClient::deviceSettingsUpdated() void LLVoiceClient::refreshDeviceLists(bool clearCurrentList) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->refreshDeviceLists(clearCurrentList); #else LLVivoxVoiceClient::getInstance()->refreshDeviceLists(clearCurrentList); @@ -440,7 +440,7 @@ void LLVoiceClient::refreshDeviceLists(bool clearCurrentList) void LLVoiceClient::setCaptureDevice(const std::string& name) { LLVivoxVoiceClient::getInstance()->setCaptureDevice(name); -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->setCaptureDevice(name); #endif } @@ -448,14 +448,14 @@ void LLVoiceClient::setCaptureDevice(const std::string& name) void LLVoiceClient::setRenderDevice(const std::string& name) { LLVivoxVoiceClient::getInstance()->setRenderDevice(name); -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->setRenderDevice(name); #endif } const LLVoiceDeviceList& LLVoiceClient::getCaptureDevices() { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return LLWebRTCVoiceClient::getInstance()->getCaptureDevices(); #else return LLVivoxVoiceClient::getInstance()->getCaptureDevices(); @@ -465,7 +465,7 @@ const LLVoiceDeviceList& LLVoiceClient::getCaptureDevices() const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return LLWebRTCVoiceClient::getInstance()->getRenderDevices(); #else return LLVivoxVoiceClient::getInstance()->getRenderDevices(); @@ -478,7 +478,7 @@ const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() void LLVoiceClient::getParticipantList(std::set &participants) const { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->getParticipantList(participants); #endif LLVivoxVoiceClient::getInstance()->getParticipantList(participants); @@ -486,7 +486,7 @@ void LLVoiceClient::getParticipantList(std::set &participants) const bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) const { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return LLWebRTCVoiceClient::getInstance()->isParticipant(speaker_id) || #else return @@ -583,7 +583,7 @@ void LLVoiceClient::activateSpatialChannel(bool activate) bool LLVoiceClient::isCurrentChannel(const LLSD& channelInfo) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return LLWebRTCVoiceClient::getInstance()->isCurrentChannel(channelInfo) || #else return @@ -593,7 +593,7 @@ bool LLVoiceClient::isCurrentChannel(const LLSD& channelInfo) bool LLVoiceClient::compareChannels(const LLSD &channelInfo1, const LLSD &channelInfo2) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return LLWebRTCVoiceClient::getInstance()->compareChannels(channelInfo1, channelInfo2) || #else return @@ -639,7 +639,7 @@ LLVoiceP2POutgoingCallInterface *LLVoiceClient::getOutgoingCallInterface(const L void LLVoiceClient::setVoiceVolume(F32 volume) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->setVoiceVolume(volume); #endif LLVivoxVoiceClient::getInstance()->setVoiceVolume(volume); @@ -647,7 +647,7 @@ void LLVoiceClient::setVoiceVolume(F32 volume) void LLVoiceClient::setMicGain(F32 gain) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->setMicGain(gain); #endif LLVivoxVoiceClient::getInstance()->setMicGain(gain); @@ -696,7 +696,7 @@ bool LLVoiceClient::voiceEnabled() void LLVoiceClient::setVoiceEnabled(bool enabled) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->setVoiceEnabled(enabled); @@ -724,7 +724,7 @@ void LLVoiceClient::updateMicMuteLogic() // Either of these always overrides any other PTT setting. new_mic_mute = true; } -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->setMuteMic(new_mic_mute); #endif LLVivoxVoiceClient::getInstance()->setMuteMic(new_mic_mute); @@ -821,7 +821,7 @@ bool LLVoiceClient::getVoiceEnabled(const LLUUID& id) const std::string LLVoiceClient::getDisplayName(const LLUUID& id) const { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC std::string result = LLWebRTCVoiceClient::getInstance()->getDisplayName(id); if (result.empty()) { @@ -835,7 +835,7 @@ std::string LLVoiceClient::getDisplayName(const LLUUID& id) const bool LLVoiceClient::isVoiceWorking() const { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return LLVivoxVoiceClient::getInstance()->isVoiceWorking() || LLWebRTCVoiceClient::getInstance()->isVoiceWorking(); #else @@ -855,7 +855,7 @@ bool LLVoiceClient::isOnlineSIP(const LLUUID& id) bool LLVoiceClient::getIsSpeaking(const LLUUID& id) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return LLWebRTCVoiceClient::getInstance()->getIsSpeaking(id) || #else return @@ -867,7 +867,7 @@ bool LLVoiceClient::getIsModeratorMuted(const LLUUID& id) { // don't bother worrying about p2p calls, as // p2p calls don't have mute. -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return LLWebRTCVoiceClient::getInstance()->getIsModeratorMuted(id) || #else return @@ -877,7 +877,7 @@ bool LLVoiceClient::getIsModeratorMuted(const LLUUID& id) F32 LLVoiceClient::getCurrentPower(const LLUUID& id) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return std::fmax(LLVivoxVoiceClient::getInstance()->getCurrentPower(id), LLWebRTCVoiceClient::getInstance()->getCurrentPower(id)); #else @@ -894,7 +894,7 @@ bool LLVoiceClient::getOnMuteList(const LLUUID& id) F32 LLVoiceClient::getUserVolume(const LLUUID& id) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC return std::fmax(LLVivoxVoiceClient::getInstance()->getUserVolume(id), LLWebRTCVoiceClient::getInstance()->getUserVolume(id)); #else return LLVivoxVoiceClient::getInstance()->getUserVolume(id); @@ -903,7 +903,7 @@ F32 LLVoiceClient::getUserVolume(const LLUUID& id) void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) { -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->setUserVolume(id, volume); #endif LLVivoxVoiceClient::getInstance()->setUserVolume(id, volume); @@ -915,7 +915,7 @@ void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer) { LLVivoxVoiceClient::getInstance()->addObserver(observer); -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->addObserver(observer); #endif } @@ -926,7 +926,7 @@ void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) { LLVivoxVoiceClient::getInstance()->removeObserver(observer); } -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->removeObserver(observer); @@ -937,7 +937,7 @@ void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) void LLVoiceClient::addObserver(LLFriendObserver* observer) { LLVivoxVoiceClient::getInstance()->addObserver(observer); -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->addObserver(observer); #endif } @@ -948,7 +948,7 @@ void LLVoiceClient::removeObserver(LLFriendObserver* observer) { LLVivoxVoiceClient::getInstance()->removeObserver(observer); } -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->removeObserver(observer); @@ -959,7 +959,7 @@ void LLVoiceClient::removeObserver(LLFriendObserver* observer) void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) { LLVivoxVoiceClient::getInstance()->addObserver(observer); -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC LLWebRTCVoiceClient::getInstance()->addObserver(observer); #endif } @@ -970,7 +970,7 @@ void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) { LLVivoxVoiceClient::getInstance()->removeObserver(observer); } -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->removeObserver(observer); @@ -1038,7 +1038,7 @@ class LLViewerRequiredVoiceVersion : public LLHTTPNode { voiceModule = (LLVoiceModuleInterface *) LLVivoxVoiceClient::getInstance(); } -#if !__FreeBSD__ && !_M_ARM64 +#if USE_WEBRTC else if (voice_server_type == "webrtc") { voiceModule = (LLVoiceModuleInterface *) LLWebRTCVoiceClient::getInstance(); -- cgit v1.3 From 00a44adfbeac89ed646b517446cbade82da531f8 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 14 May 2026 17:57:38 +0800 Subject: Exclude Gentoo from WebRTC too Similar crash as on Debian arm64. I thought it was because I hadn't had sound working yet on my installation, but after I got sound working, it still crashed with WebRTC on. See commit 8d34bb549736c341e84123760901bc981c46b184 --- indra/CMakeLists.txt | 2 +- indra/cmake/WebRTC.cmake | 2 +- indra/newview/CMakeLists.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 6f3ec1cfff..58e637f290 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -74,7 +74,7 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llphysicsextensionsos) add_subdirectory(${LIBS_OPEN_PREFIX}llprimitive) add_subdirectory(${LIBS_OPEN_PREFIX}llrender) add_subdirectory(${LIBS_OPEN_PREFIX}llfilesystem) -if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64))) +if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES gentoo) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64))) add_subdirectory(${LIBS_OPEN_PREFIX}llwebrtc) endif () add_subdirectory(${LIBS_OPEN_PREFIX}llwindow) diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake index 5fda2f71b9..038ce90b88 100644 --- a/indra/cmake/WebRTC.cmake +++ b/indra/cmake/WebRTC.cmake @@ -8,7 +8,7 @@ add_library( ll::webrtc INTERFACE IMPORTED ) target_include_directories( ll::webrtc SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/webrtc" "${LIBS_PREBUILT_DIR}/include/webrtc/third_party/abseil-cpp") if (DARWIN OR WINDOWS) use_prebuilt_binary(webrtc) -elseif (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64))) +elseif (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES gentoo) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64))) target_compile_definitions(ll::webrtc INTERFACE CM_WEBRTC=1) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/webrtc_installed OR NOT ${webrtc_installed} EQUAL 0) if (DARWIN) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index ace6e203e6..90a62bce79 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -770,7 +770,7 @@ set(viewer_SOURCE_FILES rlvhandler.cpp ) -if (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64)) +if (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES gentoo) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64)) list(REMOVE_ITEM viewer_SOURCE_FILES llvoicewebrtc.cpp) endif () @@ -2204,7 +2204,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ll::openxr ) -if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64))) +if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES gentoo) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64))) target_compile_definitions(${VIEWER_BINARY_NAME} INTERFACE USE_WEBRTC=1) target_link_libraries(${VIEWER_BINARY_NAME} llwebrtc ) endif () -- cgit v1.3 From 5ac3c3881ed82c102a302b87c59b70201ec78a9c Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 14 May 2026 18:00:02 +0800 Subject: LibVLC 4 ready I didn't see a quick way to replace libvlc_MediaPlayerTitleChanged, though, so I guess there's no title notification yet for the platform that uses VLC 4 (Gentoo will, so far). Will do this later. --- indra/media_plugins/libvlc/media_plugin_libvlc.cpp | 50 +++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp index 3fe2c2b193..edf93f359a 100644 --- a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp +++ b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp @@ -191,7 +191,11 @@ void MediaPluginLibVLC::initVLC() // void MediaPluginLibVLC::resetVLC() { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif libvlc_media_player_release(mLibVLCMediaPlayer); libvlc_release(mLibVLC); } @@ -258,7 +262,11 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr) parent->mVlcStatus = STATUS_DONE; break; +#if LIBVLC_VERSION_MAJOR < 4 case libvlc_MediaPlayerEndReached: +#else + case libvlc_MediaPlayerStopping: +#endif parent->mVlcStatus = STATUS_DONE; parent->mCurTime = parent->mDuration; parent->setDurationDirty(); @@ -285,6 +293,7 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr) parent->setDurationDirty(); break; +#if LIBVLC_VERSION_MAJOR < 4 case libvlc_MediaPlayerTitleChanged: { char* title = libvlc_media_get_meta(parent->mLibVLCMedia, libvlc_meta_Title); @@ -294,6 +303,7 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr) } } break; +#endif case libvlc_MediaMetaChanged: auto title = libvlc_media_get_meta(parent->mLibVLCMedia, libvlc_meta_Title); if (title) @@ -331,10 +341,18 @@ void MediaPluginLibVLC::playMedia() // memory. if (mLibVLCMediaPlayer) { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif } +#if LIBVLC_VERSION_MAJOR < 4 mLibVLCMedia = libvlc_media_new_location(mLibVLC, mURL.c_str()); +#else + mLibVLCMedia = libvlc_media_new_location(mURL.c_str()); +#endif if (!mLibVLCMedia) { mLibVLCMediaPlayer = 0; @@ -342,7 +360,11 @@ void MediaPluginLibVLC::playMedia() return; } +#if LIBVLC_VERSION_MAJOR < 4 mLibVLCMediaPlayer = libvlc_media_player_new_from_media(mLibVLCMedia); +#else + mLibVLCMediaPlayer = libvlc_media_player_new_from_media(mLibVLC, mLibVLCMedia); +#endif if (!mLibVLCMediaPlayer) { setStatus(STATUS_ERROR); @@ -357,12 +379,18 @@ void MediaPluginLibVLC::playMedia() libvlc_event_attach(em, libvlc_MediaPlayerPlaying, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerPaused, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerStopped, eventCallbacks, this); +#if LIBVLC_VERSION_MAJOR < 4 libvlc_event_attach(em, libvlc_MediaPlayerEndReached, eventCallbacks, this); +#else + libvlc_event_attach(em, libvlc_MediaPlayerStopping, eventCallbacks, this); +#endif libvlc_event_attach(em, libvlc_MediaPlayerEncounteredError, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerTimeChanged, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerPositionChanged, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerLengthChanged, eventCallbacks, this); +#if LIBVLC_VERSION_MAJOR < 4 libvlc_event_attach(em, libvlc_MediaPlayerTitleChanged, eventCallbacks, this); +#endif } auto event_manager = libvlc_media_event_manager(mLibVLCMedia); if (event_manager) @@ -548,7 +576,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) { if (mPixels == iter->second.mAddress) { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif libvlc_media_player_release(mLibVLCMediaPlayer); mLibVLCMediaPlayer = 0; @@ -612,7 +644,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) if (mLibVLCMediaPlayer) { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_set_time(mLibVLCMediaPlayer, time); +#else + libvlc_media_player_set_time(mLibVLCMediaPlayer, time, true); +#endif time = libvlc_media_player_get_time(mLibVLCMediaPlayer); if (time < 0) { @@ -648,7 +684,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) { if (mLibVLCMediaPlayer) { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif } } else if (message_name == "start") @@ -658,9 +698,13 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) if (mVlcStatus == STATUS_DONE && !libvlc_media_player_is_playing(mLibVLCMediaPlayer)) { // stop or vlc will ignore 'play', it will just - // make an MediaPlayerEndReached event even if + // make an MediaPlayerEndReached/MediaPlayerStopping event even if // seek was used +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif } libvlc_media_player_play(mLibVLCMediaPlayer); } @@ -677,7 +721,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) if (mLibVLCMediaPlayer) { libvlc_time_t time = (libvlc_time_t)(1000.0 * message_in.getValueReal("time")); +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_set_time(mLibVLCMediaPlayer, time); +#else + libvlc_media_player_set_time(mLibVLCMediaPlayer, time, true); +#endif time = libvlc_media_player_get_time(mLibVLCMediaPlayer); if (time < 0) { -- cgit v1.3