diff options
author | Stefan Kost <ensonic@users.sourceforge.net> | 2007-03-09 08:58:26 +0000 |
---|---|---|
committer | Stefan Kost <ensonic@users.sourceforge.net> | 2007-03-09 08:58:26 +0000 |
commit | ab6e3e5e06966592fc6289db9ff3018a2b1fe513 (patch) | |
tree | f9a3a931afddc4e82ad74be18bef9aa845ff382f /gst/equalizer/gstiirequalizer.h | |
parent | f1b91e369d111f10996074c14c6a4843c36d5d41 (diff) | |
download | gst-plugins-bad-ab6e3e5e06966592fc6289db9ff3018a2b1fe513.tar.gz gst-plugins-bad-ab6e3e5e06966592fc6289db9ff3018a2b1fe513.tar.bz2 gst-plugins-bad-ab6e3e5e06966592fc6289db9ff3018a2b1fe513.zip |
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.h | 35 |
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__ */ |