1 /* GStreamer Stream Combiner 2 * Copyright (C) 2010 Edward Hervey <edward.hervey@collabora.co.uk> 3 * (C) 2009 Nokia Corporation 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public 16 * License along with this library; if not, write to the 17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef __GST_STREAMCOMBINER_H__ 22 #define __GST_STREAMCOMBINER_H__ 23 24 #include <gst/gst.h> 25 26 #define GST_TYPE_STREAM_COMBINER (gst_stream_combiner_get_type()) 27 #define GST_STREAM_COMBINER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_STREAM_COMBINER,GstStreamCombiner)) 28 #define GST_STREAM_COMBINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_STREAM_COMBINER,GstStreamCombinerClass)) 29 #define GST_IS_STREAM_COMBINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_STREAM_COMBINER)) 30 #define GST_IS_STREAM_COMBINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_STREAM_COMBINER)) 31 32 typedef struct _GstStreamCombiner GstStreamCombiner; 33 typedef struct _GstStreamCombinerClass GstStreamCombinerClass; 34 35 struct _GstStreamCombiner { 36 GstElement parent; 37 38 GstPad *srcpad; 39 40 /* lock protects: 41 * * the current pad 42 * * the list of srcpads 43 */ 44 GMutex lock; 45 /* Currently activated srcpad */ 46 GstPad *current; 47 GList *sinkpads; 48 guint32 cookie; 49 50 }; 51 52 struct _GstStreamCombinerClass { 53 GstElementClass parent; 54 }; 55 56 GType gst_stream_combiner_get_type(void); 57 58 GstElement *gst_stream_combiner_new (gchar *name); 59 60 #endif /* __GST_STREAMCOMBINER_H__ */ 61