1d1ef233f4dc8b96cc6bf638e216257058da82c7
[platform/upstream/gstreamer.git] / gst / removesilence / gstremovesilence.h
1 /* GStreamer
2  * Copyright (C) 2011 Tiago Katcipis <tiagokatcipis@gmail.com>
3  * Copyright (C) 2011 Paulo Pizarro  <paulo.pizarro@gmail.com>
4  * Copyright (C) 2012-2016 Nicola Murino  <nicola.murino@gmail.com>
5  *
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22
23 #ifndef __GST_REMOVE_SILENCE_H__
24 #define __GST_REMOVE_SILENCE_H__
25
26 #include <gst/gst.h>
27 #include <gst/base/gstbasetransform.h>
28 #include "vad_private.h"
29
30 G_BEGIN_DECLS
31
32 #define GST_TYPE_REMOVE_SILENCE \
33   (gst_remove_silence_get_type())
34 #define GST_REMOVE_SILENCE(obj) \
35   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REMOVE_SILENCE,GstRemoveSilence))
36 #define GST_REMOVE_SILENCE_CLASS(klass) \
37   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_REMOVE_SILENCE,GstRemoveSilenceClass))
38 #define GST_IS_REMOVESILENCE(obj) \
39   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_REMOVE_SILENCE))
40 #define GST_IS_REMOVESILENCE_CLASS(klass) \
41   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_REMOVE_SILENCE))
42
43 typedef struct _GstRemoveSilence {
44   GstBaseTransform parent;
45   VADFilter* vad;
46   gboolean remove;
47   gboolean squash;
48   guint64 ts_offset;
49   gboolean silence_detected;
50 } GstRemoveSilence;
51
52 typedef struct _GstRemoveSilenceClass {
53   GstBaseTransformClass parent_class;
54 } GstRemoveSilenceClass;
55
56 GType gst_remove_silence_get_type (void);
57
58 G_END_DECLS
59
60 #endif /* __GST_REMOVE_SILENCE_H__ */