mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Add logging for CLAP note ports extension structs
This commit is contained in:
@@ -149,6 +149,27 @@ bool ClapLogger::log_request(
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(
|
||||
bool is_host_plugin,
|
||||
const clap::ext::note_ports::plugin::Count& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
message << request.instance_id
|
||||
<< ": clap_plugin_note_ports::count(is_input = "
|
||||
<< (request.is_input ? "true" : "false") << ")";
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(
|
||||
bool is_host_plugin,
|
||||
const clap::ext::note_ports::plugin::Get& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
message << request.instance_id
|
||||
<< ": clap_plugin_note_ports::get(index = " << request.index
|
||||
<< "is_input = " << (request.is_input ? "true" : "false")
|
||||
<< ", *info)";
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(bool is_host_plugin,
|
||||
const clap::plugin::StartProcessing& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
@@ -212,6 +233,25 @@ bool ClapLogger::log_request(
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(
|
||||
bool is_host_plugin,
|
||||
const clap::ext::note_ports::host::SupportedDialects& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
message << request.owner_instance_id
|
||||
<< ": clap_host_note_ports::supported_dialects()";
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(
|
||||
bool is_host_plugin,
|
||||
const clap::ext::note_ports::host::Rescan& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
message << request.owner_instance_id
|
||||
<< ": clap_host_note_ports::rescan(flag = "
|
||||
<< std::bitset<sizeof(request.flags) * 8>(request.flags) << ")";
|
||||
});
|
||||
}
|
||||
|
||||
void ClapLogger::log_response(bool is_host_plugin, const Ack&) {
|
||||
log_response_base(is_host_plugin, [&](auto& message) { message << "ACK"; });
|
||||
}
|
||||
@@ -297,6 +337,19 @@ void ClapLogger::log_response(
|
||||
});
|
||||
}
|
||||
|
||||
void ClapLogger::log_response(
|
||||
bool is_host_plugin,
|
||||
const clap::ext::note_ports::plugin::GetResponse& response) {
|
||||
return log_response_base(is_host_plugin, [&](auto& message) {
|
||||
if (response.result) {
|
||||
message << "true, <note_port_info_t* for \""
|
||||
<< response.result->name << "\">";
|
||||
} else {
|
||||
message << "false";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void ClapLogger::log_response(bool is_host_plugin, const Configuration&) {
|
||||
log_response_base(is_host_plugin,
|
||||
[&](auto& message) { message << "<Configuration>"; });
|
||||
|
||||
@@ -81,6 +81,10 @@ class ClapLogger {
|
||||
const clap::ext::audio_ports::plugin::Count&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const clap::ext::audio_ports::plugin::Get&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const clap::ext::note_ports::plugin::Count&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const clap::ext::note_ports::plugin::Get&);
|
||||
|
||||
bool log_request(bool is_host_plugin, const clap::plugin::StartProcessing&);
|
||||
bool log_request(bool is_host_plugin, const clap::plugin::StopProcessing&);
|
||||
@@ -94,6 +98,10 @@ class ClapLogger {
|
||||
const clap::ext::audio_ports::host::IsRescanFlagSupported&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const clap::ext::audio_ports::host::Rescan&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const clap::ext::note_ports::host::SupportedDialects&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const clap::ext::note_ports::host::Rescan&);
|
||||
|
||||
void log_response(bool is_host_plugin, const Ack&);
|
||||
void log_response(bool is_host_plugin,
|
||||
@@ -105,6 +113,8 @@ class ClapLogger {
|
||||
const clap::plugin::ActivateResponse&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const clap::ext::audio_ports::plugin::GetResponse&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const clap::ext::note_ports::plugin::GetResponse&);
|
||||
|
||||
void log_response(bool is_host_plugin, const Configuration&);
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "../bitsery/ext/message-reference.h"
|
||||
#include "../utils.h"
|
||||
#include "clap/ext/audio-ports.h"
|
||||
#include "clap/ext/note-ports.h"
|
||||
#include "clap/host.h"
|
||||
#include "clap/plugin-factory.h"
|
||||
#include "common.h"
|
||||
|
||||
Reference in New Issue
Block a user