Skip to content

Commit

Permalink
Upgrade clap-info to use CLAP 1.2.0 (#37)
Browse files Browse the repository at this point in the history
And check all the present extensions consistently
  • Loading branch information
baconpaul authored Feb 9, 2024
1 parent 79fc46c commit bf08a89
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libs/clap
Submodule clap updated 50 files
+10 −1 .github/workflows/cmake.yml
+11 −0 CMakeLists.txt
+30 −0 CMakePresets.json
+92 −1 ChangeLog.md
+35 −18 README.md
+32 −0 conventions/extension-id.md
+12 −0 include/clap/all.h
+12 −19 include/clap/clap.h
+75 −7 include/clap/entry.h
+57 −9 include/clap/events.h
+22 −14 include/clap/ext/ambisonic.h
+12 −3 include/clap/ext/audio-ports-activation.h
+13 −5 include/clap/ext/audio-ports-config.h
+4 −4 include/clap/ext/audio-ports.h
+23 −18 include/clap/ext/configurable-audio-ports.h
+13 −4 include/clap/ext/context-menu.h
+0 −32 include/clap/ext/draft/check-for-update.h
+0 −44 include/clap/ext/draft/cv.h
+1 −1 include/clap/ext/draft/extensible-audio-ports.h
+0 −40 include/clap/ext/draft/midi-mappings.h
+2 −2 include/clap/ext/draft/resource-directory.h
+1 −1 include/clap/ext/draft/transport-control.h
+1 −2 include/clap/ext/draft/triggers.h
+2 −1 include/clap/ext/draft/tuning.h
+1 −1 include/clap/ext/event-registry.h
+21 −25 include/clap/ext/gui.h
+2 −3 include/clap/ext/latency.h
+3 −2 include/clap/ext/note-ports.h
+7 −3 include/clap/ext/param-indication.h
+16 −6 include/clap/ext/params.h
+3 −0 include/clap/ext/posix-fd-support.h
+7 −3 include/clap/ext/preset-load.h
+8 −3 include/clap/ext/remote-controls.h
+16 −8 include/clap/ext/state-context.h
+4 −0 include/clap/ext/state.h
+14 −10 include/clap/ext/surround.h
+2 −0 include/clap/ext/timer-support.h
+9 −4 include/clap/ext/track-info.h
+1 −1 include/clap/ext/voice-info.h
+1 −1 include/clap/factory/draft/plugin-invalidation.h
+99 −0 include/clap/factory/draft/plugin-state-converter.h
+24 −37 include/clap/factory/preset-discovery.h
+12 −8 include/clap/plugin.h
+9 −3 include/clap/private/macros.h
+11 −0 include/clap/timestamp.h
+26 −0 include/clap/universal-plugin-id.h
+2 −2 include/clap/version.h
+1 −1 src/main.c
+13 −1 src/main.cc
+77 −4 src/plugin-template.c
48 changes: 44 additions & 4 deletions src/clap-info/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <iostream>
#include <filesystem>

#include "clap/all.h"

#include "clap-info-host.h"
#include "clap-scanner/scanner.h"
#include "clap/factory/plugin-factory.h"
Expand All @@ -21,6 +23,7 @@

#include "CLI11/CLI11.hpp"


struct CLAPInfoJsonRoot
{
Json::Value root;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit bf08a89

Please sign in to comment.