Tizen 2.0 Release
[framework/multimedia/gst-plugins-good0.10.git] / gst / interleave / deinterleave.h
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., 59 Temple Place - Suite 330,
23  * Boston, MA 02111-1307, 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/multichannel.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   gint channels;
55   GstAudioChannelPosition *pos;
56   gboolean keep_positions;
57
58   GstPad *sink;
59
60   gint width;
61   GstDeinterleaveFunc func;
62
63   GList *pending_events;
64 };
65
66 struct _GstDeinterleaveClass
67 {
68   GstElementClass parent_class;
69 };
70
71 GType gst_deinterleave_get_type (void);
72
73 G_END_DECLS
74
75 #endif /* __DEINTERLEAVE_H__ */