1 /* GStreamer Stream Splitter 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_STREAMSPLITTER_H__ 22 #define __GST_STREAMSPLITTER_H__ 23 24 #include <gst/gst.h> 25 26 #define GST_TYPE_STREAM_SPLITTER (gst_stream_splitter_get_type()) 27 G_DECLARE_FINAL_TYPE (GstStreamSplitter, gst_stream_splitter, 28 GST, STREAM_SPLITTER, GstElement) 29 30 struct _GstStreamSplitter { 31 GstElement parent; 32 33 GstPad *sinkpad; 34 35 /* lock protects: 36 * * the current pad 37 * * the list of srcpads 38 */ 39 GMutex lock; 40 /* Currently activated srcpad */ 41 GstPad *current; 42 GList *srcpads; 43 guint32 cookie; 44 45 /* List of pending in-band events */ 46 GList *pending_events; 47 48 guint32 keyunit_seqnum; 49 }; 50 51 GstElement *gst_stream_splitter_new (gchar *name); 52 53 #endif /* __GST_STREAMSPLITTER_H__ */ 54