From bb532146618d216e054d661808604c7e356bfe14 Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Mon, 6 Jan 2025 18:19:08 +0100 Subject: [PATCH] Audaspace: Enforce minimal pipewire library version While I implemented pipewire support I forgot that some of the functions I use is not available in older pipewire versions. This adds proper library version sanity checks for pipewire. Pull Request: https://projects.blender.org/blender/blender/pulls/131610 --- build_files/cmake/platform/platform_unix.cmake | 2 +- extern/audaspace/CMakeLists.txt | 2 +- extern/audaspace/plugins/pipewire/PipeWireLibrary.cpp | 2 +- extern/audaspace/plugins/pipewire/PipeWireSymbols.h | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index e0a9094d8fd..9eeb4d77c90 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -724,7 +724,7 @@ endif() # PipeWire is intended to use the system library. if(WITH_PIPEWIRE) find_package(PkgConfig) - pkg_check_modules(PIPEWIRE libpipewire-0.3) + pkg_check_modules(PIPEWIRE libpipewire-0.3>=1.1.0) set_and_warn_library_found("PipeWire" PIPEWIRE_FOUND WITH_PIPEWIRE) endif() diff --git a/extern/audaspace/CMakeLists.txt b/extern/audaspace/CMakeLists.txt index 2abfd339a58..98ec816f52c 100644 --- a/extern/audaspace/CMakeLists.txt +++ b/extern/audaspace/CMakeLists.txt @@ -727,7 +727,7 @@ endif() if(WITH_PIPEWIRE) if(AUDASPACE_STANDALONE) find_package(PkgConfig) - pkg_check_modules(PIPEWIRE ${PACKAGE_OPTION} libpipewire-0.3) + pkg_check_modules(PIPEWIRE ${PACKAGE_OPTION} libpipewire-0.3>=1.1.0) endif() if(PIPEWIRE_FOUND) diff --git a/extern/audaspace/plugins/pipewire/PipeWireLibrary.cpp b/extern/audaspace/plugins/pipewire/PipeWireLibrary.cpp index e532c5b434a..9c32fc7e842 100644 --- a/extern/audaspace/plugins/pipewire/PipeWireLibrary.cpp +++ b/extern/audaspace/plugins/pipewire/PipeWireLibrary.cpp @@ -53,7 +53,7 @@ bool loadPipeWire() #undef PIPEWIRE_SYMBOL - return AUD_pw_init != nullptr; + return AUD_pw_check_library_version != nullptr && AUD_pw_check_library_version(1,1,0); } AUD_NAMESPACE_END diff --git a/extern/audaspace/plugins/pipewire/PipeWireSymbols.h b/extern/audaspace/plugins/pipewire/PipeWireSymbols.h index 3244abd32b2..7f980797a77 100644 --- a/extern/audaspace/plugins/pipewire/PipeWireSymbols.h +++ b/extern/audaspace/plugins/pipewire/PipeWireSymbols.h @@ -38,3 +38,4 @@ PIPEWIRE_SYMBOL(pw_thread_loop_new); PIPEWIRE_SYMBOL(pw_thread_loop_start); PIPEWIRE_SYMBOL(pw_thread_loop_stop); +PIPEWIRE_SYMBOL(pw_check_library_version);