mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Add logging for the CLAP stream extension
This commit is contained in:
@@ -220,6 +220,24 @@ bool ClapLogger::log_request(bool is_host_plugin,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ClapLogger::log_request(bool is_host_plugin,
|
||||||
|
const clap::ext::state::plugin::Save& request) {
|
||||||
|
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||||
|
message << request.instance_id
|
||||||
|
<< ": clap_plugin_state::save(clap_ostream_t*)";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ClapLogger::log_request(bool is_host_plugin,
|
||||||
|
const clap::ext::state::plugin::Load& request) {
|
||||||
|
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||||
|
message
|
||||||
|
<< request.instance_id
|
||||||
|
<< ": clap_plugin_state::load(stream = <clap_istream_t* containing "
|
||||||
|
<< request.stream.size() << " bytes>)";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
bool ClapLogger::log_request(bool is_host_plugin,
|
bool ClapLogger::log_request(bool is_host_plugin,
|
||||||
const clap::plugin::StartProcessing& request) {
|
const clap::plugin::StartProcessing& request) {
|
||||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||||
@@ -354,6 +372,14 @@ bool ClapLogger::log_request(bool is_host_plugin,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ClapLogger::log_request(bool is_host_plugin,
|
||||||
|
const clap::ext::state::host::MarkDirty& request) {
|
||||||
|
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||||
|
message << request.owner_instance_id
|
||||||
|
<< ": clap_host_state::mark_dirty()";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
bool ClapLogger::log_request(bool is_host_plugin,
|
bool ClapLogger::log_request(bool is_host_plugin,
|
||||||
const clap::ext::tail::host::Changed& request) {
|
const clap::ext::tail::host::Changed& request) {
|
||||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||||
@@ -515,6 +541,19 @@ void ClapLogger::log_response(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClapLogger::log_response(
|
||||||
|
bool is_host_plugin,
|
||||||
|
const clap::ext::state::plugin::SaveResponse& response) {
|
||||||
|
return log_response_base(is_host_plugin, [&](auto& message) {
|
||||||
|
if (response.result) {
|
||||||
|
message << "true, <clap_ostream_t* containing "
|
||||||
|
<< response.result->size() << " bytes>";
|
||||||
|
} else {
|
||||||
|
message << "false";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void ClapLogger::log_response(bool is_host_plugin, const Configuration&) {
|
void ClapLogger::log_response(bool is_host_plugin, const Configuration&) {
|
||||||
log_response_base(is_host_plugin,
|
log_response_base(is_host_plugin,
|
||||||
[&](auto& message) { message << "<Configuration>"; });
|
[&](auto& message) { message << "<Configuration>"; });
|
||||||
|
|||||||
@@ -98,6 +98,10 @@ class ClapLogger {
|
|||||||
const clap::ext::params::plugin::TextToValue&);
|
const clap::ext::params::plugin::TextToValue&);
|
||||||
bool log_request(bool is_host_plugin,
|
bool log_request(bool is_host_plugin,
|
||||||
const clap::ext::latency::plugin::Get&);
|
const clap::ext::latency::plugin::Get&);
|
||||||
|
bool log_request(bool is_host_plugin,
|
||||||
|
const clap::ext::state::plugin::Save&);
|
||||||
|
bool log_request(bool is_host_plugin,
|
||||||
|
const clap::ext::state::plugin::Load&);
|
||||||
|
|
||||||
// Audio thread control messages
|
// Audio thread control messages
|
||||||
bool log_request(bool is_host_plugin, const clap::plugin::StartProcessing&);
|
bool log_request(bool is_host_plugin, const clap::plugin::StartProcessing&);
|
||||||
@@ -128,6 +132,8 @@ class ClapLogger {
|
|||||||
const clap::ext::params::host::RequestFlush&);
|
const clap::ext::params::host::RequestFlush&);
|
||||||
bool log_request(bool is_host_plugin,
|
bool log_request(bool is_host_plugin,
|
||||||
const clap::ext::latency::host::Changed&);
|
const clap::ext::latency::host::Changed&);
|
||||||
|
bool log_request(bool is_host_plugin,
|
||||||
|
const clap::ext::state::host::MarkDirty&);
|
||||||
|
|
||||||
// Audio thread callbacks
|
// Audio thread callbacks
|
||||||
bool log_request(bool is_host_plugin,
|
bool log_request(bool is_host_plugin,
|
||||||
@@ -156,6 +162,8 @@ class ClapLogger {
|
|||||||
const clap::ext::params::plugin::TextToValueResponse&);
|
const clap::ext::params::plugin::TextToValueResponse&);
|
||||||
void log_response(bool is_host_plugin,
|
void log_response(bool is_host_plugin,
|
||||||
const clap::ext::params::plugin::FlushResponse&);
|
const clap::ext::params::plugin::FlushResponse&);
|
||||||
|
void log_response(bool is_host_plugin,
|
||||||
|
const clap::ext::state::plugin::SaveResponse&);
|
||||||
|
|
||||||
// Main thread callback responses
|
// Main thread callback responses
|
||||||
void log_response(bool is_host_plugin, const Configuration&);
|
void log_response(bool is_host_plugin, const Configuration&);
|
||||||
|
|||||||
Reference in New Issue
Block a user