• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * (C) 2011 Collabora Ltd.
3  *  Contact: Youness Alaoui <youness.alaoui@collabora.co.uk>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
18  */
19 
20 #ifndef __GST_SPANDSP_H__
21 #define __GST_SPANDSP_H__
22 
23 #include <gst/gst.h>
24 
25 #include <spandsp.h>
26 
27 G_BEGIN_DECLS
28 
29 #define GST_TYPE_SPAN_PLC (gst_span_plc_get_type())
30 #define GST_SPAN_PLC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SPAN_PLC,GstSpanPlc))
31 #define GST_SPAN_PLC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SPAN_PLC,GstSpanPlcClass))
32 #define GST_IS_SPAN_PLC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SPAN_PLC))
33 #define GST_IS_SPAN_PLC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPAN_PLC))
34 
35 typedef struct _GstSpanPlc GstSpanPlc;
36 typedef struct _GstSpanPlcClass GstSpanPlcClass;
37 
38 struct _GstSpanPlc
39 {
40   GstElement element;
41 
42   GstPad *sinkpad;
43   GstPad *srcpad;
44 
45   /* <private> */
46   plc_state_t *plc_state;
47   gint sample_rate;
48 
49   /* Used to generate the 'stats' property. Protected by object lock */
50   guint64 num_pushed;
51   guint64 num_gap;
52   guint64 plc_num_samples;
53   guint64 plc_duration;
54 };
55 
56 struct _GstSpanPlcClass
57 {
58   GstElementClass parent_class;
59 };
60 
61 GType gst_span_plc_get_type (void);
62 GST_ELEMENT_REGISTER_DECLARE (spanplc);
63 
64 G_END_DECLS
65 
66 #endif
67