Merge branch 'master' into 0.11
[platform/upstream/gst-plugins-base.git] / gst / adder / gstadder.h
index 3895118..9fedf06 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <gst/gst.h>
 #include <gst/base/gstcollectpads2.h>
+#include <gst/audio/audio.h>
 
 G_BEGIN_DECLS
 
@@ -39,12 +40,6 @@ typedef struct _GstAdder             GstAdder;
 typedef struct _GstAdderClass        GstAdderClass;
 typedef struct _GstAdderInputChannel GstAdderInputChannel;
 
-typedef enum {
-  GST_ADDER_FORMAT_UNSET,
-  GST_ADDER_FORMAT_INT,
-  GST_ADDER_FORMAT_FLOAT
-} GstAdderFormat;
-
 typedef void (*GstAdderFunction) (gpointer out, gpointer in, guint size);
 
 /**
@@ -61,42 +56,28 @@ struct _GstAdder {
   gint            padcount;
 
   /* the next are valid for both int and float */
-  GstAdderFormat  format;
-  gint            rate;
-  gint            channels;
-  gint            width;
-  gint            endianness;
-  int             sample_size;
-
-  /* the next are valid only for format == GST_ADDER_FORMAT_INT */
-  gint            depth;
-  gboolean        is_signed;
-
-  /* number of bytes per sample, actually width/8 * channels */
-  gint            bps;
+  GstAudioInfo    info;
 
   /* function to add samples */
   GstAdderFunction func;
 
   /* counters to keep track of timestamps */
-  gint64          timestamp;
   gint64          offset;
 
   /* sink event handling */
-  GstPadEventFunction  collect_event;
   GstSegment      segment;
-  guint64         segment_start, segment_end;
-  gdouble         segment_rate;
   volatile gboolean new_segment_pending;
   volatile gboolean wait_for_new_segment;
   /* src event handling */
   volatile gboolean flush_stop_pending;
-  
+
   /* target caps */
   GstCaps *filter_caps;
 
   /* Pending inline events */
   GList *pending_events;
+  
+  gboolean in_setcaps;
 };
 
 struct _GstAdderClass {