mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Update to CLAP 1.1.7
Factories got moved to a new `factory` directory.
This commit is contained in:
@@ -54,14 +54,14 @@ void ClapLogger::log_on_main_thread(size_t instance_id) {
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(bool is_host_plugin,
|
||||
const clap::plugin_factory::List&) {
|
||||
const clap::factory::plugin_factory::List&) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
message << "clap_plugin_factory::list()";
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(bool is_host_plugin,
|
||||
const clap::plugin_factory::Create& request) {
|
||||
const clap::factory::plugin_factory::Create& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
message << "clap_plugin_factory::create(host = <clap_host_t*>, "
|
||||
"plugin_id = \""
|
||||
@@ -769,7 +769,7 @@ void ClapLogger::log_response(bool is_host_plugin, const Ack&) {
|
||||
|
||||
void ClapLogger::log_response(
|
||||
bool is_host_plugin,
|
||||
const clap::plugin_factory::ListResponse& response) {
|
||||
const clap::factory::plugin_factory::ListResponse& response) {
|
||||
log_response_base(is_host_plugin, [&](auto& message) {
|
||||
if (response.descriptors) {
|
||||
message << "<clap_plugin_factory* containing "
|
||||
@@ -782,7 +782,7 @@ void ClapLogger::log_response(
|
||||
|
||||
void ClapLogger::log_response(
|
||||
bool is_host_plugin,
|
||||
const clap::plugin_factory::CreateResponse& response) {
|
||||
const clap::factory::plugin_factory::CreateResponse& response) {
|
||||
log_response_base(is_host_plugin, [&](auto& message) {
|
||||
if (response.instance_id) {
|
||||
message << "<clap_plugin_t* with instance ID "
|
||||
|
||||
@@ -80,8 +80,8 @@ class ClapLogger {
|
||||
// log message for the response together with the request.
|
||||
|
||||
// Main thread control messages
|
||||
bool log_request(bool is_host_plugin, const clap::plugin_factory::List&);
|
||||
bool log_request(bool is_host_plugin, const clap::plugin_factory::Create&);
|
||||
bool log_request(bool is_host_plugin, const clap::factory::plugin_factory::List&);
|
||||
bool log_request(bool is_host_plugin, const clap::factory::plugin_factory::Create&);
|
||||
bool log_request(bool is_host_plugin, const clap::plugin::Init&);
|
||||
bool log_request(bool is_host_plugin, const clap::plugin::Destroy&);
|
||||
bool log_request(bool is_host_plugin, const clap::plugin::Activate&);
|
||||
@@ -207,9 +207,9 @@ class ClapLogger {
|
||||
// Main thread control message responses
|
||||
void log_response(bool is_host_plugin, const Ack&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const clap::plugin_factory::ListResponse&);
|
||||
const clap::factory::plugin_factory::ListResponse&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const clap::plugin_factory::CreateResponse&);
|
||||
const clap::factory::plugin_factory::CreateResponse&);
|
||||
void log_response(bool is_host_plugin, const clap::plugin::InitResponse&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const clap::plugin::ActivateResponse&);
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
#include "clap/ext/state.h"
|
||||
#include "clap/ext/tail.h"
|
||||
#include "clap/ext/voice-info.h"
|
||||
#include "clap/factory/plugin-factory.h"
|
||||
#include "clap/host.h"
|
||||
#include "clap/plugin-factory.h"
|
||||
#include "clap/process.h"
|
||||
#include "common.h"
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
// serialize this without it.
|
||||
using ClapMainThreadControlRequest =
|
||||
std::variant<WantsConfiguration,
|
||||
clap::plugin_factory::List,
|
||||
clap::plugin_factory::Create,
|
||||
clap::factory::plugin_factory::List,
|
||||
clap::factory::plugin_factory::Create,
|
||||
clap::plugin::Init,
|
||||
clap::plugin::Destroy,
|
||||
clap::plugin::Activate,
|
||||
|
||||
+9
-5
@@ -16,17 +16,19 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../common.h"
|
||||
#include "host.h"
|
||||
#include "plugin.h"
|
||||
#include "../../common.h"
|
||||
#include "../host.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
// Serialization messages for `clap/plugin-factory.h`
|
||||
|
||||
namespace clap {
|
||||
namespace factory {
|
||||
namespace plugin_factory {
|
||||
|
||||
/**
|
||||
* The response to the `clap::plugin_factory::List` message defined below.
|
||||
* The response to the `clap::factory::plugin_factory::List` message defined
|
||||
* below.
|
||||
*/
|
||||
struct ListResponse {
|
||||
/**
|
||||
@@ -57,7 +59,8 @@ struct List {
|
||||
};
|
||||
|
||||
/**
|
||||
* The response to the `clap::plugin_factory::Create` message defined below.
|
||||
* The response to the `clap::factory::plugin_factory::Create` message defined
|
||||
* below.
|
||||
*/
|
||||
struct CreateResponse {
|
||||
/**
|
||||
@@ -99,4 +102,5 @@ struct Create {
|
||||
};
|
||||
|
||||
} // namespace plugin_factory
|
||||
} // namespace factory
|
||||
} // namespace clap
|
||||
@@ -76,8 +76,8 @@ clap_plugin_factory_proxy::plugin_factory_create_plugin(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const clap::plugin_factory::CreateResponse response =
|
||||
self->bridge_.send_main_thread_message(clap::plugin_factory::Create{
|
||||
const clap::factory::plugin_factory::CreateResponse response =
|
||||
self->bridge_.send_main_thread_message(clap::factory::plugin_factory::Create{
|
||||
.host = *host, .plugin_id = plugin_id});
|
||||
if (response.instance_id) {
|
||||
// This plugin proxy is tied to the instance ID created on the Wine
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <clap/plugin-factory.h>
|
||||
#include <clap/factory/plugin-factory.h>
|
||||
|
||||
#include "../../common/serialization/clap/plugin.h"
|
||||
|
||||
@@ -44,7 +44,7 @@ class clap_plugin_factory_proxy {
|
||||
|
||||
/**
|
||||
* Construct the plugin factory proxy based on the plugin descriptors
|
||||
* retrieved from a `clap::plugin_factory::ListReponse`.
|
||||
* retrieved from a `clap::factory::plugin_factory::ListReponse`.
|
||||
*/
|
||||
clap_plugin_factory_proxy(
|
||||
ClapPluginBridge& bridge,
|
||||
|
||||
@@ -332,8 +332,8 @@ const void* ClapPluginBridge::get_factory(const char* factory_id) {
|
||||
if (!plugin_factory_) {
|
||||
// If the plugin does not support this factory type, then we'll also
|
||||
// return a null poitner
|
||||
const clap::plugin_factory::ListResponse response =
|
||||
send_main_thread_message(clap::plugin_factory::List{});
|
||||
const clap::factory::plugin_factory::ListResponse response =
|
||||
send_main_thread_message(clap::factory::plugin_factory::List{});
|
||||
if (!response.descriptors) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <asio/steady_timer.hpp>
|
||||
|
||||
#include "../../common/serialization/clap/plugin-factory.h"
|
||||
#include "../../common/serialization/clap/factory/plugin-factory.h"
|
||||
|
||||
// Forward declaration to avoid circular includes
|
||||
class ClapBridge;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <codecvt>
|
||||
#include <locale>
|
||||
|
||||
#include <clap/plugin-factory.h>
|
||||
#include <clap/factory/plugin-factory.h>
|
||||
|
||||
// Generated inside of the build directory
|
||||
#include <version.h>
|
||||
@@ -183,15 +183,15 @@ void ClapBridge::run() {
|
||||
// variant without it.
|
||||
return {};
|
||||
},
|
||||
[&](const clap::plugin_factory::List&)
|
||||
-> clap::plugin_factory::List::Response {
|
||||
[&](const clap::factory::plugin_factory::List&)
|
||||
-> clap::factory::plugin_factory::List::Response {
|
||||
return main_context_
|
||||
.run_in_context([&]() {
|
||||
plugin_factory_ =
|
||||
static_cast<const clap_plugin_factory_t*>(
|
||||
entry_->get_factory(CLAP_PLUGIN_FACTORY_ID));
|
||||
if (!plugin_factory_) {
|
||||
return clap::plugin_factory::ListResponse{
|
||||
return clap::factory::plugin_factory::ListResponse{
|
||||
.descriptors = std::nullopt};
|
||||
}
|
||||
|
||||
@@ -214,13 +214,13 @@ void ClapBridge::run() {
|
||||
descriptors.push_back(*descriptor);
|
||||
}
|
||||
|
||||
return clap::plugin_factory::ListResponse{
|
||||
return clap::factory::plugin_factory::ListResponse{
|
||||
.descriptors = descriptors};
|
||||
})
|
||||
.get();
|
||||
},
|
||||
[&](clap::plugin_factory::Create& request)
|
||||
-> clap::plugin_factory::Create::Response {
|
||||
[&](clap::factory::plugin_factory::Create& request)
|
||||
-> clap::factory::plugin_factory::Create::Response {
|
||||
return main_context_
|
||||
.run_in_context([&]() {
|
||||
// This assertion should never be hit, but you can never
|
||||
@@ -241,10 +241,10 @@ void ClapBridge::run() {
|
||||
if (plugin) {
|
||||
register_plugin_instance(plugin,
|
||||
std::move(host_proxy));
|
||||
return clap::plugin_factory::CreateResponse{
|
||||
return clap::factory::plugin_factory::CreateResponse{
|
||||
.instance_id = instance_id};
|
||||
} else {
|
||||
return clap::plugin_factory::CreateResponse{
|
||||
return clap::factory::plugin_factory::CreateResponse{
|
||||
.instance_id = std::nullopt};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <string>
|
||||
|
||||
#include <clap/entry.h>
|
||||
#include <clap/plugin-factory.h>
|
||||
#include <clap/factory/plugin-factory.h>
|
||||
#include <clap/plugin.h>
|
||||
|
||||
#include "../../common/audio-shm.h"
|
||||
|
||||
Reference in New Issue
Block a user