1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2000 Wim Taymans <wtay@chello.be>
4  * Copyright (C) 2013 Juan Manuel Borges Caño <juanmabcmail@gmail.com>
5  *
6  * gstladspasink.h: Header for LADSPA sink
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23 
24 #ifndef __GST_LADSPA_SINK_H__
25 #define __GST_LADSPA_SINK_H__
26 
27 #include <gst/gst.h>
28 #include <gst/base/gstbasesink.h>
29 #include "gstladspautils.h"
30 
31 G_BEGIN_DECLS
32 
33 #define GST_TYPE_LADSPA_SINK              (gst_ladspa_sink_get_type())
34 #define GST_LADSPA_SINK(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_LADSPA_SINK,GstLADSPASink))
35 #define GST_LADSPA_SINK_CAST(obj)         ((GstLADSPASink *) (obj))
36 #define GST_LADSPA_SINK_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_LADSPA_SINK,GstLADSPASinkClass))
37 #define GST_LADSPA_SINK_CLASS_CAST(klass) ((GstLADSPASinkClass *) (klass))
38 #define GST_LADSPA_SINK_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_LADSPA_SINK,GstLADSPASinkClass))
39 #define GST_IS_LADSPA_SINK(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_LADSPA_SINK))
40 #define GST_IS_LADSPA_SINK_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_LADSPA_SINK))
41 
42 typedef struct _GstLADSPASink GstLADSPASink;
43 
44 typedef struct _GstLADSPASinkClass GstLADSPASinkClass;
45 
46 struct _GstLADSPASink
47 {
48   GstBaseSink parent;
49 
50   GstLADSPA ladspa;
51 
52   GstAudioInfo info;
53 
54   gint num_buffers;
55   gint num_buffers_left;
56 };
57 
58 struct _GstLADSPASinkClass
59 {
60   GstBaseSinkClass parent_class;
61 
62   GstLADSPAClass ladspa;
63 };
64 
65 GType
66 gst_ladspa_sink_get_type (void);
67 
68 void
69 ladspa_register_sink_element (GstPlugin * plugin, GstStructure *ladspa_meta);
70 
71 void
72 gst_my_base_sink_class_add_pad_template (GstBaseSinkClass * base_class,
73     GstCaps * sinkcaps);
74 
75 G_END_DECLS
76 
77 #endif /* __GST_LADSPA_SINK_H__ */
78