From f0088de5312946116addf14f1b1da352bfb2c3c2 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Fri, 9 Feb 2024 07:43:48 -0500 Subject: [PATCH] Upgrade clap-info to use CLAP 1.2.0 And check all the present extensions consistently --- libs/clap | 2 +- src/clap-info/main.cpp | 48 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/libs/clap b/libs/clap index 41964fa..df8f16c 160000 --- a/libs/clap +++ b/libs/clap @@ -1 +1 @@ -Subproject commit 41964fa3f44fdbf6feb20df528a9cdf2cc3b05ba +Subproject commit df8f16c69ba1c1a15fb105f0c5a2e5b9ac6be742 diff --git a/src/clap-info/main.cpp b/src/clap-info/main.cpp index 91899aa..0d409f2 100644 --- a/src/clap-info/main.cpp +++ b/src/clap-info/main.cpp @@ -13,6 +13,8 @@ #include #include +#include "clap/all.h" + #include "clap-info-host.h" #include "clap-scanner/scanner.h" #include "clap/factory/plugin-factory.h" @@ -21,6 +23,7 @@ #include "CLI11/CLI11.hpp" + struct CLAPInfoJsonRoot { Json::Value root; @@ -393,10 +396,47 @@ int main(int argc, char **argv) extensions[CLAP_EXT_AUDIO_PORTS_CONFIG] = clap_info_host::createAudioPortsConfigJson(inst); - // Some 'is implemented' only ones - for (auto ext : {CLAP_EXT_TIMER_SUPPORT, CLAP_EXT_POSIX_FD_SUPPORT, - CLAP_EXT_THREAD_POOL, CLAP_EXT_THREAD_CHECK, CLAP_EXT_RENDER, - CLAP_EXT_LOG, CLAP_EXT_RENDER, CLAP_EXT_VOICE_INFO}) + // Some 'is implemented' only ones. This is the + // entire 1.2.0 list generated with + // grep -r CLAP_EXT libs/clap/include | grep static | awk '{print $5}' | sed -e 's/\[\]/,/' + // and then remove the ones handled above by hand + for (auto ext : { + CLAP_EXT_AMBISONIC, + CLAP_EXT_AMBISONIC_COMPAT, + CLAP_EXT_AUDIO_PORTS_ACTIVATION, + CLAP_EXT_AUDIO_PORTS_ACTIVATION_COMPAT, + CLAP_EXT_AUDIO_PORTS_CONFIG_INFO, + CLAP_EXT_AUDIO_PORTS_CONFIG_INFO_COMPAT, + CLAP_EXT_CONFIGURABLE_AUDIO_PORTS, + CLAP_EXT_CONFIGURABLE_AUDIO_PORTS_COMPAT, + CLAP_EXT_CONTEXT_MENU, + CLAP_EXT_CONTEXT_MENU_COMPAT, + CLAP_EXT_EVENT_REGISTRY, + CLAP_EXT_EXTENSIBLE_AUDIO_PORTS, + CLAP_EXT_LOG, + CLAP_EXT_PARAM_INDICATION, + CLAP_EXT_PARAM_INDICATION_COMPAT, + CLAP_EXT_POSIX_FD_SUPPORT, + CLAP_EXT_PRESET_LOAD, + CLAP_EXT_PRESET_LOAD_COMPAT, + CLAP_EXT_REMOTE_CONTROLS, + CLAP_EXT_REMOTE_CONTROLS_COMPAT, + CLAP_EXT_RENDER, + CLAP_EXT_RESOURCE_DIRECTORY, + CLAP_EXT_STATE_CONTEXT, + CLAP_EXT_SURROUND, + CLAP_EXT_SURROUND_COMPAT, + CLAP_EXT_THREAD_CHECK, + CLAP_EXT_THREAD_POOL, + CLAP_EXT_TIMER_SUPPORT, + CLAP_EXT_TRACK_INFO, + CLAP_EXT_TRACK_INFO_COMPAT, + CLAP_EXT_TRANSPORT_CONTROL, + CLAP_EXT_TRIGGERS, + CLAP_EXT_TUNING, + CLAP_EXT_VOICE_INFO, + + }) { auto exf = inst->get_extension(inst, ext); Json::Value r;