1 /* GStreamer 2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu> 3 * 2000 Wim Taymans <wtay@chello.be> 4 * Copyright (C) 2013 Sebastian Dröge <slomo@circular-chaos.org> 5 * 6 * gstaudiointerleave.h: Header for audiointerleave element 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Library General Public 10 * License as published by the Free Software Foundation; either 11 * version 2 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Library General Public License for more details. 17 * 18 * You should have received a copy of the GNU Library General Public 19 * License along with this library; if not, write to the 20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 21 * Boston, MA 02110-1301, USA. 22 */ 23 24 #ifndef __GST_AUDIO_INTERLEAVE_H__ 25 #define __GST_AUDIO_INTERLEAVE_H__ 26 27 #include <gst/gst.h> 28 #include <gst/audio/audio.h> 29 30 #include <gst/audio/gstaudioaggregator.h> 31 32 G_BEGIN_DECLS 33 34 #define GST_TYPE_AUDIO_INTERLEAVE (gst_audio_interleave_get_type()) 35 G_DECLARE_FINAL_TYPE (GstAudioInterleave, gst_audio_interleave, 36 GST, AUDIO_INTERLEAVE, GstAudioAggregator) 37 38 typedef void (*GstInterleaveFunc) (gpointer out, gpointer in, guint stride, 39 guint nframes); 40 41 /** 42 * GstAudioInterleave: 43 * 44 * The GstAudioInterleave object structure. 45 */ 46 struct _GstAudioInterleave { 47 GstAudioAggregator parent; 48 49 gint padcounter; 50 guint channels; /* object lock */ 51 52 GstCaps *sinkcaps; 53 54 GValueArray *channel_positions; 55 GValueArray *input_channel_positions; 56 gboolean channel_positions_from_input; 57 58 gint default_channels_ordering_map[64]; 59 60 GstInterleaveFunc func; 61 }; 62 63 64 #define GST_TYPE_AUDIO_INTERLEAVE_PAD (gst_audio_interleave_pad_get_type()) 65 G_DECLARE_FINAL_TYPE (GstAudioInterleavePad, gst_audio_interleave_pad, 66 GST, AUDIO_INTERLEAVE_PAD, GstAudioAggregatorConvertPad) 67 68 struct _GstAudioInterleavePad { 69 GstAudioAggregatorPad parent; 70 71 guint channel; 72 }; 73 74 G_END_DECLS 75 76 #endif /* __GST_AUDIO_INTERLEAVE_H__ */ 77