summaryrefslogtreecommitdiff
path: root/indra/media_plugins
diff options
context:
space:
mode:
authorMaki <maki@hotmilk.space>2024-04-18 02:58:08 -0400
committerMaki <maki@hotmilk.space>2024-04-18 02:58:08 -0400
commit09b0244f0e623dad43f579c9c7ba42ad0d53ed25 (patch)
treeff78eb93c37ffc2e76ee9ecb4cc7a6211106cde6 /indra/media_plugins
parent4f8f04497c57d2ce65a1f4dffe6856ac18b59fb6 (diff)
Use Pulse for volume catching and add CMake variable for PipeWire
Diffstat (limited to 'indra/media_plugins')
-rw-r--r--indra/media_plugins/cef/CMakeLists.txt36
1 files changed, 21 insertions, 15 deletions
diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt
index 9e129f2185..4ef2b0957e 100644
--- a/indra/media_plugins/cef/CMakeLists.txt
+++ b/indra/media_plugins/cef/CMakeLists.txt
@@ -24,21 +24,27 @@ set(media_plugin_cef_HEADER_FILES
# Select which VolumeCatcher implementation to use
if (LINUX)
- # foreach( PULSE_FILE pulse/introspect.h pulse/context.h pulse/subscribe.h pulse/glib-mainloop.h )
- # find_path( PULSE_FILE_${PULSE_FILE}_FOUND ${PULSE_FILE} NO_CACHE)
- # if( NOT PULSE_FILE_${PULSE_FILE}_FOUND )
- # message( "Looking for ${PULSE_FILE} ... not found")
- # message( FATAL_ERROR "Pulse header not found" )
- # else()
- # message( "Looking for ${PULSE_FILE} ... found")
- # endif()
- # endforeach()
-
- include(FindPipeWire)
- include_directories(SYSTEM ${PIPEWIRE_INCLUDE_DIRS} ${SPA_INCLUDE_DIRS})
-
- message( "Building with Linux volume catcher using PipeWire" )
- set(LINUX_VOLUME_CATCHER linux_volume_catcher_pw.cpp)
+ # off by default. we should keep using pulse for now
+ set(USE_VOLUME_CATCHER_PW OFF CACHE BOOL "Use PipeWire for CEF volume catching")
+
+ if (USE_VOLUME_CATCHER_PW)
+ include(FindPipeWire)
+ include_directories(SYSTEM ${PIPEWIRE_INCLUDE_DIRS} ${SPA_INCLUDE_DIRS})
+ message( "Building with Linux volume catcher using PipeWire" )
+ set(LINUX_VOLUME_CATCHER linux_volume_catcher_pw.cpp)
+ else (USE_VOLUME_CATCHER_PW)
+ foreach( PULSE_FILE pulse/introspect.h pulse/context.h pulse/subscribe.h pulse/glib-mainloop.h )
+ find_path( PULSE_FILE_${PULSE_FILE}_FOUND ${PULSE_FILE} NO_CACHE)
+ if( NOT PULSE_FILE_${PULSE_FILE}_FOUND )
+ message( "Looking for ${PULSE_FILE} ... not found")
+ message( FATAL_ERROR "Pulse header not found" )
+ else()
+ message( "Looking for ${PULSE_FILE} ... found")
+ endif()
+ endforeach()
+ message( "Building with Linux volume catcher using PulseAudio" )
+ set(LINUX_VOLUME_CATCHER linux_volume_catcher_pa.cpp)
+ endif (USE_VOLUME_CATCHER_PW)
list(APPEND media_plugin_cef_SOURCE_FILES ${LINUX_VOLUME_CATCHER})
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id -Wl,-rpath,'$ORIGIN:$ORIGIN/../../lib'")