]> git.sesse.net Git - mlt/blob - src/modules/jackrack/plugin_desc.h
Add ladspa producer
[mlt] / src / modules / jackrack / plugin_desc.h
1 /*
2  * JACK Rack
3  *
4  * Original:
5  * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net)
6  *
7  * Modification for MLT:
8  * Copyright (C) 2004 Ushodaya Enterprises Limited
9  * Author: Dan Dennedy <dan@dennedy.org>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25
26 #ifndef __JR_PLUGIN_DESC_H__
27 #define __JR_PLUGIN_DESC_H__
28
29 #include <ladspa.h>
30 #include <glib.h>
31
32 typedef struct _plugin_desc plugin_desc_t;
33
34 struct _plugin_desc
35 {
36   char *                   object_file;
37   unsigned long            index;
38   unsigned long            id;
39   char *                   name;
40   char *                   maker;
41   LADSPA_Properties        properties;
42   gboolean                 rt;
43   
44   unsigned long            channels;
45   
46   gboolean                 aux_are_input;
47   unsigned long            aux_channels;
48
49   unsigned long            port_count;
50   LADSPA_PortDescriptor *  port_descriptors;
51   LADSPA_PortRangeHint *   port_range_hints;
52   char **                  port_names;
53   
54   unsigned long *          audio_input_port_indicies;
55   unsigned long *          audio_output_port_indicies;
56   
57   unsigned long *          audio_aux_port_indicies;
58
59   unsigned long            control_port_count;
60   unsigned long *          control_port_indicies;
61
62   gboolean                 has_input;
63 };
64
65 plugin_desc_t * plugin_desc_new ();
66 plugin_desc_t * plugin_desc_new_with_descriptor (const char * object_file,
67                                                  unsigned long index,
68                                                  const LADSPA_Descriptor * descriptor);
69 void            plugin_desc_destroy (plugin_desc_t * pd);
70
71 void plugin_desc_set_object_file (plugin_desc_t * pd, const char * object_file);
72 void plugin_desc_set_index       (plugin_desc_t * pd, unsigned long index);
73 void plugin_desc_set_id          (plugin_desc_t * pd, unsigned long id);
74 void plugin_desc_set_name        (plugin_desc_t * pd, const char * name);
75 void plugin_desc_set_maker       (plugin_desc_t * pd, const char * maker);
76 void plugin_desc_set_properties  (plugin_desc_t * pd, LADSPA_Properties properties);
77
78 struct _plugin * plugin_desc_instantiate (plugin_desc_t * pd);
79
80 LADSPA_Data plugin_desc_get_default_control_value (plugin_desc_t * pd, unsigned long port_index, guint32 sample_rate);
81 LADSPA_Data plugin_desc_change_control_value (plugin_desc_t *, unsigned long, LADSPA_Data, guint32, guint32);
82
83 gint plugin_desc_get_copies (plugin_desc_t * pd, unsigned long rack_channels);
84
85 #endif /* __JR_PLUGIN_DESC_H__ */