1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2000 Wim Taymans <wtay@chello.be>
4  *                    2005 Wim Taymans <wim@fluendo.com>
5  *                    2007 Andy Wingo <wingo at pobox.com>
6  *                    2008 Sebastian Dröge <slomo@circular-chaos.org>
7  *
8  * deinterleave.c: deinterleave samples
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Library General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Library General Public License for more details.
19  *
20  * You should have received a copy of the GNU Library General Public
21  * License along with this library; if not, write to the
22  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
23  * Boston, MA 02110-1301, USA.
24  */
25 
26 #ifndef __DEINTERLEAVE_H__
27 #define __DEINTERLEAVE_H__
28 
29 G_BEGIN_DECLS
30 
31 #include <gst/gst.h>
32 #include <gst/audio/audio.h>
33 
34 #define GST_TYPE_DEINTERLEAVE            (gst_deinterleave_get_type())
35 #define GST_DEINTERLEAVE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DEINTERLEAVE,GstDeinterleave))
36 #define GST_DEINTERLEAVE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DEINTERLEAVE,GstDeinterleaveClass))
37 #define GST_DEINTERLEAVE_GET_CLASS(obj) \
38         (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_DEINTERLEAVE,GstDeinterleaveClass))
39 #define GST_IS_DEINTERLEAVE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DEINTERLEAVE))
40 #define GST_IS_DEINTERLEAVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DEINTERLEAVE))
41 
42 typedef struct _GstDeinterleave GstDeinterleave;
43 typedef struct _GstDeinterleaveClass GstDeinterleaveClass;
44 
45 typedef void (*GstDeinterleaveFunc) (gpointer out, gpointer in, guint stride, guint nframes);
46 
47 struct _GstDeinterleave
48 {
49   GstElement element;
50 
51   /*< private > */
52   GList *srcpads;
53   GstCaps *sinkcaps;
54   GstAudioInfo audio_info;
55   gboolean keep_positions;
56 
57   GstPad *sink;
58 
59   GstDeinterleaveFunc func;
60 
61   GList *pending_events;
62 };
63 
64 struct _GstDeinterleaveClass
65 {
66   GstElementClass parent_class;
67 };
68 
69 GType gst_deinterleave_get_type (void);
70 
71 G_END_DECLS
72 
73 #endif /* __DEINTERLEAVE_H__ */
74