2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published
4 * by the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful, but
8 * WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * General Public License for more details.
12 * You should have received a copy of the GNU General Public
13 * License along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 #ifndef __PLUGINLV2CLIENT_H__
20 #define __PLUGINLV2CLIENT_H__
22 #include "condition.inc"
24 #include "pluginaclient.h"
26 #include "pluginlv2.h"
27 #include "pluginlv2config.h"
28 #include "pluginlv2client.inc"
29 #include "pluginlv2gui.h"
30 #include "pluginlv2ui.inc"
31 #include "samples.inc"
33 class PluginLV2UIs : public ArrayList<PluginLV2ParentUI *>, public Mutex
40 PluginLV2ParentUI *del_ui(PluginLV2Client *client);
41 PluginLV2ParentUI *del_ui(PluginLV2ClientWindow *gui);
42 PluginLV2ParentUI *add_ui(PluginLV2ParentUI *ui, PluginLV2Client *client);
43 PluginLV2ParentUI *search_ui(int plugin_id);
44 PluginLV2ParentUI *find_ui(int plugin_id);
45 PluginLV2ParentUI *get_ui(PluginLV2Client *client);
49 class PluginLV2ParentUI : public ForkParent
52 PluginLV2ParentUI(int plugin_id);
54 ForkChild* new_fork();
55 void start_parent(PluginLV2Client *client);
58 Condition *output_bfr;
59 PluginLV2Client *client;
60 PluginLV2ClientWindow *gui;
67 static PluginLV2UIs plugin_lv2;
70 class PluginLV2BlackList : public ArrayList<const char *>
73 PluginLV2BlackList(const char *path);
74 ~PluginLV2BlackList();
76 int is_badboy(const char *uri);
79 class PluginLV2Client : public PluginAClient, public PluginLV2
82 PluginLV2Client(PluginServer *server);
85 int process_realtime(int64_t size,
86 Samples **input_ptr, Samples **output_ptr, int chs);
87 int process_realtime(int64_t size,
88 Samples *input_ptr, Samples *output_ptr);
89 int process_realtime(int64_t size,
90 Samples **input_ptr, Samples **output_ptr);
91 // Update output pointers as well
93 int is_multichannel();
96 char* to_string(char *string, const char *input);
97 void save_data(KeyFrame *keyframe);
98 void read_data(KeyFrame *keyframe);
99 void load_buffer(int samples, Samples **input, int ich);
100 int unload_buffer(int samples, Samples **output, int och);
101 void process_buffer(int size);
103 void update_lv2(int token);
105 PluginLV2ParentUI *find_ui();
106 PluginLV2ParentUI *get_ui();
108 PLUGIN_CLASS_MEMBERS(PluginLV2ClientConfig)
109 char title[BCSTRLEN];