#include <gst/gst.h>
#include <gst/base/gstcollectpads2.h>
+#include <gst/audio/audio.h>
G_BEGIN_DECLS
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);
/**
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 {