f3556f74d94945ac55e3e31999ac90b7a2c405ec
[platform/upstream/gst-plugins-good.git] / ext / ladspa / gstladspa.h
1 /* GStreamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3  *
4  * gstladspa.h: Header for LADSPA plugin
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22
23 #ifndef __GST_LADSPA_H__
24 #define __GST_LADSPA_H__
25
26
27 #include <gst/gst.h>
28 #include <gst/bytestream/bytestream.h>
29
30 #include "ladspa.h"
31
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif /* __cplusplus */
36
37 typedef struct _ladspa_control_info {
38   gchar *name;
39   gchar *param_name;
40   gfloat lowerbound, upperbound;
41   gfloat def;
42   gboolean lower,upper,samplerate;
43   gboolean toggled, logarithmic, integer, writable;
44 } ladspa_control_info;
45
46 typedef struct _GstLADSPA GstLADSPA;
47 typedef struct _GstLADSPAClass GstLADSPAClass;
48
49 struct _GstLADSPA {
50   GstElement element;
51
52   LADSPA_Descriptor *descriptor;
53   LADSPA_Handle *handle;
54
55   GstDParamManager *dpman;
56
57   gfloat *controls;
58   
59   GstPad **sinkpads, 
60          **srcpads;
61
62   gboolean activated;
63
64   gint samplerate, buffer_frames;
65   gint64 timestamp;
66   gboolean inplace_broken;
67 };
68
69 struct _GstLADSPAClass {
70   GstElementClass parent_class;
71
72   LADSPA_Descriptor *descriptor;
73
74   gint numports,
75        numsinkpads, 
76        numsrcpads, 
77        numcontrols;
78
79   gint *sinkpad_portnums, 
80        *srcpad_portnums, 
81        *control_portnums;
82
83   ladspa_control_info *control_info;
84 };
85
86
87 #ifdef __cplusplus
88 }
89 #endif /* __cplusplus */
90
91
92 #endif /* __GST_LADSPA_H__ */