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 G_DECLARE_FINAL_TYPE (GstStreamCombiner, gst_stream_combiner, 28 GST, STREAM_COMBINER, GstElement) 29 30 struct _GstStreamCombiner { 31 GstElement parent; 32 33 GstPad *srcpad; 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 *sinkpads; 43 guint32 cookie; 44 gboolean draining_encoder; /* TRUE when streamspliter informed us that it is 45 * draining the encoder, meaning that we are 46 * expecting to receive and discard an EOS, a flush 47 * start, and then a flush_stop which implies the 48 * draining is done. */ 49 50 }; 51 52 GstElement *gst_stream_combiner_new (gchar *name); 53 54 #endif /* __GST_STREAMCOMBINER_H__ */ 55