1 /* GStreamer concat element 2 * 3 * Copyright (c) 2014 Sebastian Dröge <sebastian@centricular.com> 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 22 #ifndef __GST_CONCAT_H__ 23 #define __GST_CONCAT_H__ 24 25 #include <gst/gst.h> 26 27 G_BEGIN_DECLS 28 29 #define GST_TYPE_CONCAT (gst_concat_get_type()) 30 #define GST_CONCAT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_CONCAT, GstConcat)) 31 #define GST_CONCAT_CAST(obj) ((GstConcat*)obj) 32 #define GST_CONCAT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_CONCAT,GstConcatClass)) 33 #define GST_IS_CONCAT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CONCAT)) 34 #define GST_IS_CONCAT_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CONCAT)) 35 36 typedef struct _GstConcat GstConcat; 37 typedef struct _GstConcatClass GstConcatClass; 38 39 /** 40 * GstConcat: 41 * 42 * The private concat structure 43 */ 44 struct _GstConcat 45 { 46 /*< private >*/ 47 GstElement parent; 48 49 GMutex lock; 50 GCond cond; 51 GList *sinkpads; /* Last is earliest */ 52 GstPad *current_sinkpad; 53 GstPad *srcpad; 54 guint pad_count; 55 56 /* Format we're operating in */ 57 GstFormat format; 58 /* In format, running time or accumulated byte offset */ 59 guint64 current_start_offset; 60 /* Between current pad's segment start and stop */ 61 guint64 last_stop; 62 63 gboolean adjust_base; 64 }; 65 66 struct _GstConcatClass 67 { 68 GstElementClass parent_class; 69 }; 70 71 G_GNUC_INTERNAL GType gst_concat_get_type (void); 72 73 G_END_DECLS 74 75 #endif /* __GST_CONCAT_H__ */ 76