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>
8 * interleave.c: interleave samples, mostly based on adder
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.
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.
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.
26 #ifndef __INTERLEAVE_H__
27 #define __INTERLEAVE_H__
30 #include <gst/base/gstcollectpads.h>
34 #define GST_TYPE_INTERLEAVE (gst_interleave_get_type())
35 #define GST_INTERLEAVE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_INTERLEAVE,GstInterleave))
36 #define GST_INTERLEAVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_INTERLEAVE,GstInterleaveClass))
37 #define GST_INTERLEAVE_GET_CLASS(obj) \
38 (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_INTERLEAVE,GstInterleaveClass))
39 #define GST_IS_INTERLEAVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_INTERLEAVE))
40 #define GST_IS_INTERLEAVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_INTERLEAVE))
42 typedef struct _GstInterleave GstInterleave;
43 typedef struct _GstInterleaveClass GstInterleaveClass;
45 typedef void (*GstInterleaveFunc) (gpointer out, gpointer in, guint stride, guint nframes);
52 GstCollectPads *collect;
59 GValueArray *channel_positions;
60 GValueArray *input_channel_positions;
61 gboolean channel_positions_from_input;
64 gint configured_sinkpads_counter;
66 GstClockTime timestamp;
69 GstEvent *pending_segment;
71 GstPadEventFunction collect_event;
73 GstInterleaveFunc func;
77 gboolean send_stream_start;
80 struct _GstInterleaveClass
82 GstElementClass parent_class;
85 GType gst_interleave_get_type (void);
89 #endif /* __INTERLEAVE_H__ */