summaryrefslogtreecommitdiffstats
path: root/gst/equalizer/gstiirequalizer.h
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sourceforge.net>2007-03-09 08:58:26 +0000
committerStefan Kost <ensonic@users.sourceforge.net>2007-03-09 08:58:26 +0000
commit44e09dddc430f9e24f0db08fc86120e3cd8b13c7 (patch)
tree774dc5eb4a916101bb0166b30f695f08100b88da /gst/equalizer/gstiirequalizer.h
parent654ad41f259ffcb204ddc7a8001f3edf6a4bee60 (diff)
gst/equalizer/: Refactor plugin into a base class and a first subclass (nband eq). The nband eq uses GstChildProxy an...
Original commit message from CVS: * gst/equalizer/Makefile.am: * gst/equalizer/gstiirequalizer.c: (_do_init), (gst_iir_equalizer_band_set_property), (gst_iir_equalizer_band_get_property), (gst_iir_equalizer_band_class_init), (gst_iir_equalizer_band_get_type), (gst_iir_equalizer_child_proxy_get_child_by_index), (gst_iir_equalizer_child_proxy_get_children_count), (gst_iir_equalizer_child_proxy_interface_init), (gst_iir_equalizer_base_init), (gst_iir_equalizer_class_init), (gst_iir_equalizer_finalize), (setup_filter), (gst_iir_equalizer_compute_frequencies), (gst_iir_equalizer_set_property), (gst_iir_equalizer_get_property), (gst_iir_equalizer_setup), (plugin_init): * gst/equalizer/gstiirequalizer.h: * gst/equalizer/gstiirequalizernbands.c: (gst_iir_equalizer_nbands_base_init), (gst_iir_equalizer_nbands_class_init), (gst_iir_equalizer_nbands_init), (gst_iir_equalizer_nbands_set_property), (gst_iir_equalizer_nbands_get_property): * gst/equalizer/gstiirequalizernbands.h: Refactor plugin into a base class and a first subclass (nband eq). The nband eq uses GstChildProxy and is controlable. More subclasses will follow.
Diffstat (limited to 'gst/equalizer/gstiirequalizer.h')
-rw-r--r--gst/equalizer/gstiirequalizer.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/gst/equalizer/gstiirequalizer.h b/gst/equalizer/gstiirequalizer.h
index 2193369b..03fe6a72 100644
--- a/gst/equalizer/gstiirequalizer.h
+++ b/gst/equalizer/gstiirequalizer.h
@@ -1,5 +1,6 @@
/* GStreamer IIR equalizer
* Copyright (C) <2004> Benjamin Otte <otte@gnome.org>
+ * <2007> Stefan Kost <ensonic@users.sf.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -22,9 +23,19 @@
#include <gst/audio/gstaudiofilter.h>
#include <gst/audio/gstringbuffer.h>
+#include <gst/controller/gstcontroller.h>
+
+
+#define GST_EQUALIZER_TRANSFORM_LOCK(eq) \
+ g_mutex_lock (GST_BASE_TRANSFORM(eq)->transform_lock)
+
+#define GST_EQUALIZER_TRANSFORM_UNLOCK(eq) \
+ g_mutex_unlock (GST_BASE_TRANSFORM(eq)->transform_lock)
+
typedef struct _GstIirEqualizer GstIirEqualizer;
typedef struct _GstIirEqualizerClass GstIirEqualizerClass;
+typedef struct _GstIirEqualizerBand GstIirEqualizerBand;
#define GST_TYPE_IIR_EQUALIZER \
(gst_iir_equalizer_get_type())
@@ -43,30 +54,22 @@ typedef struct _GstIirEqualizerClass GstIirEqualizerClass;
typedef void (*ProcessFunc) (GstIirEqualizer * eq, guint8 * data, guint size,
guint channels);
-typedef struct
-{
- gdouble alpha; /* IIR coefficients for outputs */
- gdouble beta; /* IIR coefficients for inputs */
- gdouble gamma; /* IIR coefficients for inputs */
-} SecondOrderFilter;
-
struct _GstIirEqualizer
{
GstAudioFilter audiofilter;
/*< private >*/
+
+ GstIirEqualizerBand **bands;
/* properties */
- guint freq_count;
+ guint freq_band_count;
gdouble band_width;
- gdouble *freqs;
- gdouble *values;
-
- /* data */
- SecondOrderFilter *filter;
+ /* for each band and channel */
gpointer history;
- ProcessFunc process;
guint history_size;
+
+ ProcessFunc process;
};
struct _GstIirEqualizerClass
@@ -74,4 +77,8 @@ struct _GstIirEqualizerClass
GstAudioFilterClass audiofilter_class;
};
+extern void gst_iir_equalizer_compute_frequencies (GstIirEqualizer * equ, guint new_count);
+
+extern GType gst_iir_equalizer_get_type(void);
+
#endif /* __GST_IIR_EQUALIZER__ */