diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2007-08-09 18:08:05 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2007-08-09 18:08:05 +0000 |
commit | f81256027660cc422f144e644b3960165d9b4252 (patch) | |
tree | 5330166c090298e92e675be389fbe60b57c88758 /gst/filter/gstlpwsinc.h | |
parent | cf74a6136d5b03386d7326757479b9ac59cca162 (diff) | |
download | gst-plugins-bad-f81256027660cc422f144e644b3960165d9b4252.tar.gz gst-plugins-bad-f81256027660cc422f144e644b3960165d9b4252.tar.bz2 gst-plugins-bad-f81256027660cc422f144e644b3960165d9b4252.zip |
gst/filter/gstlpwsinc.*: Add double support, replace "this" with "self" as the former is a C++ keyword.
Original commit message from CVS:
* gst/filter/gstlpwsinc.c: (gst_lpwsinc_dispose),
(gst_lpwsinc_class_init), (gst_lpwsinc_init), (process_32),
(process_64), (lpwsinc_build_kernel), (lpwsinc_setup),
(lpwsinc_get_unit_size), (lpwsinc_transform),
(lpwsinc_set_property), (lpwsinc_get_property):
* gst/filter/gstlpwsinc.h:
Add double support, replace "this" with "self" as the former
is a C++ keyword.
Implement the frequency property in Hz instead of fraction
of sampling frequency.
Remove some unecessary FIXMEs and add some TODOs, add some
required locking and refactor the kernel generation into a
separate function that is also called when the properties
change now.
And use BaseTransform::transform instead of transform_ip
as the convolution is done out of place anyway. Should
be done in place later.
Diffstat (limited to 'gst/filter/gstlpwsinc.h')
-rw-r--r-- | gst/filter/gstlpwsinc.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gst/filter/gstlpwsinc.h b/gst/filter/gstlpwsinc.h index 14791b51..afb7e9c7 100644 --- a/gst/filter/gstlpwsinc.h +++ b/gst/filter/gstlpwsinc.h @@ -54,6 +54,8 @@ G_BEGIN_DECLS typedef struct _GstLPWSinc GstLPWSinc; typedef struct _GstLPWSincClass GstLPWSincClass; +typedef void (*GstLPWSincProcessFunc) (GstLPWSinc *, guint8 *, guint8 *, guint); + /** * GstLPWSinc: * @@ -62,14 +64,15 @@ typedef struct _GstLPWSincClass GstLPWSincClass; struct _GstLPWSinc { GstAudioFilter element; - void (*process)(GstLPWSinc*, gpointer, gint); + GstLPWSincProcessFunc process; - double frequency; - int wing_size; /* length of a "wing" of the filter; + gdouble frequency; + gint wing_size; /* length of a "wing" of the filter; actual length is 2 * wing_size + 1 */ - gfloat *residue; /* buffer for left-over samples from previous buffer */ - double *kernel; + gdouble *residue; /* buffer for left-over samples from previous buffer */ + gdouble *kernel; /* filter kernel */ + gboolean have_kernel; }; struct _GstLPWSincClass { |