Commit 6fe3c141 authored by Jan Schmidt's avatar Jan Schmidt
Browse files

Move the lpwsinc and bpwsinc elements from gst-plugins-bad into the audiofx...

Move the lpwsinc and bpwsinc elements from gst-plugins-bad into the audiofx plugin, and rename to audiowsinclimit and...

Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* docs/plugins/gst-plugins-good-plugins.args:
* docs/plugins/inspect/plugin-audiofx.xml:
* gst/audiofx/Makefile.am:
* gst/audiofx/audiofx.c:
* gst/audiofx/audiowsincband.c:
* gst/audiofx/audiowsincband.h:
* gst/audiofx/audiowsinclimit.c:
* gst/audiofx/audiowsinclimit.h:
* tests/check/Makefile.am:
* tests/check/elements/audiowsincband.c:
* tests/check/elements/audiowsinclimit.c:
Move the lpwsinc and bpwsinc elements from gst-plugins-bad into
the audiofx plugin, and rename to audiowsinclimit and audiowsincband
respectively.
Fixes: #467666
parent 6d166987
2008-02-07 Jan Schmidt <jan.schmidt@sun.com>
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* docs/plugins/gst-plugins-good-plugins.args:
* docs/plugins/inspect/plugin-audiofx.xml:
* gst/audiofx/Makefile.am:
* gst/audiofx/audiofx.c:
* gst/audiofx/audiowsincband.c:
* gst/audiofx/audiowsincband.h:
* gst/audiofx/audiowsinclimit.c:
* gst/audiofx/audiowsinclimit.h:
* tests/check/Makefile.am:
* tests/check/elements/audiowsincband.c:
* tests/check/elements/audiowsinclimit.c:
Move the lpwsinc and bpwsinc elements from gst-plugins-bad into
the audiofx plugin, and rename to audiowsinclimit and audiowsincband
respectively.
Fixes: #467666
2008-02-07 Tim-Philipp Müller <tim at centricular dot net>
 
* gst/icydemux/gsticydemux.c: (gst_icydemux_chain):
......
......@@ -102,6 +102,8 @@ EXTRA_HFILES = \
$(top_srcdir)/gst/audiofx/audiopanorama.h \
$(top_srcdir)/gst/audiofx/audiocheblimit.h \
$(top_srcdir)/gst/audiofx/audiochebband.h \
$(top_srcdir)/gst/audiofx/audiowsincband.h \
$(top_srcdir)/gst/audiofx/audiowsinclimit.h \
$(top_srcdir)/gst/autodetect/gstautoaudiosink.h \
$(top_srcdir)/gst/autodetect/gstautovideosink.h \
$(top_srcdir)/gst/avi/gstavidemux.h \
......
......@@ -18,6 +18,8 @@
<xi:include href="xml/element-audioamplify.xml" />
<xi:include href="xml/element-audiochebband.xml" />
<xi:include href="xml/element-audiocheblimit.xml" />
<xi:include href="xml/element-audiowsincband.xml" />
<xi:include href="xml/element-audiowsinclimit.xml" />
<xi:include href="xml/element-audiodynamic.xml" />
<xi:include href="xml/element-audioinvert.xml" />
<xi:include href="xml/element-audiopanorama.xml" />
......
......@@ -137,6 +137,36 @@ GST_TYPE_AUDIO_PANORAMA
gst_audio_panorama_get_type
</SECTION>
<SECTION>
<FILE>element-audiowsincband</FILE>
<TITLE>audiowsincband</TITLE>
GstAudioWSincBand
<SUBSECTION Standard>
GstAudioWSincBandClass
GstAudioWSincBandProcessFunc
GST_AUDIO_WSINC_BAND
GST_AUDIO_WSINC_BAND_CLASS
GST_IS_AUDIO_WSINC_BAND
GST_IS_AUDIO_WSINC_BAND_CLASS
GST_TYPE_AUDIO_WSINC_BAND
audio_wsincband_get_type
</SECTION>
<SECTION>
<FILE>element-audiowsinclimit</FILE>
<TITLE>audiowsinclimit</TITLE>
GstAudioWSincLimit
<SUBSECTION Standard>
GstAudioWSincLimitClass
GstAudioWSincLimitProcessFunc
GST_AUDIO_WSINC_LIMIT
GST_AUDIO_WSINC_LIMIT_CLASS
GST_IS_AUDIO_WSINC_LIMIT
GST_IS_AUDIO_WSINC_LIMIT_CLASS
GST_TYPE_AUDIO_WSINC_LIMIT
audio_wsinclimit_get_type
</SECTION>
<SECTION>
<FILE>element-autoaudiosink</FILE>
<TITLE>autoaudiosink</TITLE>
......
......@@ -17508,6 +17508,106 @@
<DEFAULT>1</DEFAULT>
</ARG>
ARG>
<NAME>GstAudioWSincBand::length</NAME>
<TYPE>gint</TYPE>
<RANGE>[3,50000]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Length</NICK>
<BLURB>Filter kernel length, will be rounded to the next odd number.</BLURB>
<DEFAULT>101</DEFAULT>
</ARG>
<ARG>
<NAME>GstAudioWSincBand::lower-frequency</NAME>
<TYPE>gfloat</TYPE>
<RANGE>[0,100000]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Lower Frequency</NICK>
<BLURB>Cut-off lower frequency (Hz).</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstAudioWSincBand::upper-frequency</NAME>
<TYPE>gfloat</TYPE>
<RANGE>[0,100000]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Upper Frequency</NICK>
<BLURB>Cut-off upper frequency (Hz).</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstAudioWSincBand::mode</NAME>
<TYPE>GstAudioWSincBandMode</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Mode</NICK>
<BLURB>Band pass or band reject mode.</BLURB>
<DEFAULT>Band pass (default)</DEFAULT>
</ARG>
<ARG>
<NAME>GstAudioWSincBand::window</NAME>
<TYPE>GstAudioWSincBandWindow</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Window</NICK>
<BLURB>Window function to use.</BLURB>
<DEFAULT>Hamming window (default)</DEFAULT>
</ARG>
<ARG>
<NAME>GstAudioWSincLimit::frequency</NAME>
<TYPE>gdouble</TYPE>
<RANGE>>= 0</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Frequency</NICK>
<BLURB>Cut-off Frequency (Hz).</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstAudioWSincLimit::length</NAME>
<TYPE>gint</TYPE>
<RANGE>[3,50000]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Length</NICK>
<BLURB>Filter kernel length, will be rounded to the next odd number.</BLURB>
<DEFAULT>101</DEFAULT>
</ARG>
<ARG>
<NAME>GstAudioWSincLimit::mode</NAME>
<TYPE>GstAudioWSincLimitMode</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Mode</NICK>
<BLURB>Low pass or high pass mode.</BLURB>
<DEFAULT>Low pass (default)</DEFAULT>
</ARG>
<ARG>
<NAME>GstAudioWSincLimit::window</NAME>
<TYPE>GstAudioWSincLimitWindow</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Window</NICK>
<BLURB>Window function to use.</BLURB>
<DEFAULT>Hamming window (default)</DEFAULT>
</ARG>
<ARG>
<NAME>GstAudioWSincLimit::cutoff</NAME>
<TYPE>gfloat</TYPE>
<RANGE>[0,100000]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Cutoff</NICK>
<BLURB>Cut-off Frequency (Hz).</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstRndBufferSize::max</NAME>
<TYPE>glong</TYPE>
......
......@@ -135,5 +135,47 @@
</caps>
</pads>
</element>
<element>
<name>audiowsincband</name>
<longname>Band-pass and Band-reject Windowed sinc filter</longname>
<class>Filter/Effect/Audio</class>
<description>Band-pass Windowed sinc filter</description>
<author>Thomas &lt;thomas@apestaart.org&gt;, Steven W. Smith, Dreamlab Technologies Ltd. &lt;mathis.hofer@dreamlab.net&gt;, Sebastian Dröge &lt;slomo@circular-chaos.org&gt;</author>
<pads>
<caps>
<name>src</name>
<direction>source</direction>
<presence>always</presence>
<details>audio/x-raw-float, width=(int){ 32, 64 }, endianness=(int)1234, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</details>
</caps>
<caps>
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
<details>audio/x-raw-float, width=(int){ 32, 64 }, endianness=(int)1234, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</details>
</caps>
</pads>
</element>
<element>
<name>audiowsinclimit</name>
<longname>AudioWSincLimit</longname>
<class>Filter/Effect/Audio</class>
<description>Low-pass and High-pass Windowed sinc filter</description>
<author>Thomas &lt;thomas@apestaart.org&gt;, Steven W. Smith, Dreamlab Technologies Ltd. &lt;mathis.hofer@dreamlab.net&gt;, Sebastian Dröge &lt;slomo@circular-chaos.org&gt;</author>
<pads>
<caps>
<name>src</name>
<direction>source</direction>
<presence>always</presence>
<details>audio/x-raw-float, width=(int){ 32, 64 }, endianness=(int)1234, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</details>
</caps>
<caps>
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
<details>audio/x-raw-float, width=(int){ 32, 64 }, endianness=(int)1234, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</details>
</caps>
</pads>
</element>
</elements>
</plugin>
\ No newline at end of file
......@@ -9,7 +9,9 @@ libgstaudiofx_la_SOURCES = audiofx.c\
audioamplify.c \
audiodynamic.c \
audiocheblimit.c \
audiochebband.c
audiochebband.c \
audiowsincband.c \
audiowsinclimit.c
# flags used to compile this plugin
libgstaudiofx_la_CFLAGS = $(GST_CFLAGS) \
......
......@@ -31,6 +31,8 @@
#include "audiodynamic.h"
#include "audiocheblimit.h"
#include "audiochebband.h"
#include "audiowsincband.h"
#include "audiowsinclimit.h"
/* entry point to initialize the plug-in
* initialize the plug-in itself
......@@ -54,7 +56,11 @@ plugin_init (GstPlugin * plugin)
gst_element_register (plugin, "audiocheblimit", GST_RANK_NONE,
GST_TYPE_AUDIO_CHEB_LIMIT) &&
gst_element_register (plugin, "audiochebband", GST_RANK_NONE,
GST_TYPE_AUDIO_CHEB_BAND));
GST_TYPE_AUDIO_CHEB_BAND) &&
gst_element_register (plugin, "audiowsinclimit", GST_RANK_NONE,
GST_TYPE_AUDIO_WSINC_LIMIT) &&
gst_element_register (plugin, "audiowsincband", GST_RANK_NONE,
GST_TYPE_AUDIO_WSINC_BAND));
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
......
......@@ -36,7 +36,7 @@
*/
/**
* SECTION:element-bpwsinc
* SECTION:element-audiowsincband
* @short_description: Windowed Sinc band pass and band reject filter
*
* <refsect2>
......@@ -54,9 +54,9 @@
* <title>Example launch line</title>
* <para>
* <programlisting>
* gst-launch audiotestsrc freq=1500 ! audioconvert ! bpwsinc mode=band-pass lower-frequency=3000 upper-frequency=10000 length=501 window=blackman ! audioconvert ! alsasink
* gst-launch filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! bpwsinc mode=band-reject lower-frequency=59 upper-frequency=61 length=10001 window=hamming ! audioconvert ! alsasink
* gst-launch audiotestsrc wave=white-noise ! audioconvert ! bpwsinc mode=band-pass lower-frequency=1000 upper-frequency=2000 length=31 ! audioconvert ! alsasink
* gst-launch audiotestsrc freq=1500 ! audioconvert ! audiosincband mode=band-pass lower-frequency=3000 upper-frequency=10000 length=501 window=blackman ! audioconvert ! alsasink
* gst-launch filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audiowsincband mode=band-reject lower-frequency=59 upper-frequency=61 length=10001 window=hamming ! audioconvert ! alsasink
* gst-launch audiotestsrc wave=white-noise ! audioconvert ! audiowsincband mode=band-pass lower-frequency=1000 upper-frequency=2000 length=31 ! audioconvert ! alsasink
* </programlisting>
* </para>
* </refsect2>
......@@ -72,12 +72,12 @@
#include <gst/audio/gstaudiofilter.h>
#include <gst/controller/gstcontroller.h>
#include "gstbpwsinc.h"
#include "audiowsincband.h"
#define GST_CAT_DEFAULT gst_bpwsinc_debug
#define GST_CAT_DEFAULT gst_audio_wsincband_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static const GstElementDetails bpwsinc_details =
static const GstElementDetails audio_wsincband_details =
GST_ELEMENT_DETAILS ("Band-pass and Band-reject Windowed sinc filter",
"Filter/Effect/Audio",
"Band-pass Windowed sinc filter",
......@@ -109,9 +109,9 @@ enum
MODE_BAND_REJECT
};
#define GST_TYPE_BPWSINC_MODE (gst_bpwsinc_mode_get_type ())
#define GST_TYPE_AUDIO_WSINC_BAND_MODE (gst_audio_wsincband_mode_get_type ())
static GType
gst_bpwsinc_mode_get_type (void)
gst_audio_wsincband_mode_get_type (void)
{
static GType gtype = 0;
......@@ -124,7 +124,7 @@ gst_bpwsinc_mode_get_type (void)
{0, NULL, NULL}
};
gtype = g_enum_register_static ("GstBPWSincMode", values);
gtype = g_enum_register_static ("GstAudioWSincBandMode", values);
}
return gtype;
}
......@@ -135,9 +135,9 @@ enum
WINDOW_BLACKMAN
};
#define GST_TYPE_BPWSINC_WINDOW (gst_bpwsinc_window_get_type ())
#define GST_TYPE_AUDIO_WSINC_BAND_WINDOW (gst_audio_wsincband_window_get_type ())
static GType
gst_bpwsinc_window_get_type (void)
gst_audio_wsincband_window_get_type (void)
{
static GType gtype = 0;
......@@ -150,7 +150,7 @@ gst_bpwsinc_window_get_type (void)
{0, NULL, NULL}
};
gtype = g_enum_register_static ("GstBPWSincWindow", values);
gtype = g_enum_register_static ("GstAudioWSincBandWindow", values);
}
return gtype;
}
......@@ -163,33 +163,35 @@ gst_bpwsinc_window_get_type (void)
" channels = (int) [ 1, MAX ] "
#define DEBUG_INIT(bla) \
GST_DEBUG_CATEGORY_INIT (gst_bpwsinc_debug, "bpwsinc", 0, "Band-pass and Band-reject Windowed sinc filter plugin");
GST_DEBUG_CATEGORY_INIT (gst_audio_wsincband_debug, "audiowsincband", 0, \
"Band-pass and Band-reject Windowed sinc filter plugin");
GST_BOILERPLATE_FULL (GstBPWSinc, gst_bpwsinc, GstAudioFilter,
GST_BOILERPLATE_FULL (GstAudioWSincBand, audio_wsincband, GstAudioFilter,
GST_TYPE_AUDIO_FILTER, DEBUG_INIT);
static void bpwsinc_set_property (GObject * object, guint prop_id,
static void audio_wsincband_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void bpwsinc_get_property (GObject * object, guint prop_id,
static void audio_wsincband_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static GstFlowReturn bpwsinc_transform (GstBaseTransform * base,
static GstFlowReturn audio_wsincband_transform (GstBaseTransform * base,
GstBuffer * inbuf, GstBuffer * outbuf);
static gboolean bpwsinc_start (GstBaseTransform * base);
static gboolean bpwsinc_event (GstBaseTransform * base, GstEvent * event);
static gboolean audio_wsincband_start (GstBaseTransform * base);
static gboolean audio_wsincband_event (GstBaseTransform * base,
GstEvent * event);
static gboolean bpwsinc_setup (GstAudioFilter * base,
static gboolean audio_wsincband_setup (GstAudioFilter * base,
GstRingBufferSpec * format);
static gboolean bpwsinc_query (GstPad * pad, GstQuery * query);
static const GstQueryType *bpwsinc_query_type (GstPad * pad);
static gboolean audio_wsincband_query (GstPad * pad, GstQuery * query);
static const GstQueryType *audio_wsincband_query_type (GstPad * pad);
/* Element class */
static void
gst_bpwsinc_dispose (GObject * object)
audio_wsincband_dispose (GObject * object)
{
GstBPWSinc *self = GST_BPWSINC (object);
GstAudioWSincBand *self = GST_AUDIO_WSINC_BAND (object);
if (self->residue) {
g_free (self->residue);
......@@ -205,12 +207,12 @@ gst_bpwsinc_dispose (GObject * object)
}
static void
gst_bpwsinc_base_init (gpointer g_class)
audio_wsincband_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps *caps;
gst_element_class_set_details (element_class, &bpwsinc_details);
gst_element_class_set_details (element_class, &audio_wsincband_details);
caps = gst_caps_from_string (ALLOWED_CAPS);
gst_audio_filter_class_add_pad_templates (GST_AUDIO_FILTER_CLASS (g_class),
......@@ -219,7 +221,7 @@ gst_bpwsinc_base_init (gpointer g_class)
}
static void
gst_bpwsinc_class_init (GstBPWSincClass * klass)
audio_wsincband_class_init (GstAudioWSincBandClass * klass)
{
GObjectClass *gobject_class;
GstBaseTransformClass *trans_class;
......@@ -229,9 +231,9 @@ gst_bpwsinc_class_init (GstBPWSincClass * klass)
trans_class = (GstBaseTransformClass *) klass;
filter_class = (GstAudioFilterClass *) klass;
gobject_class->set_property = bpwsinc_set_property;
gobject_class->get_property = bpwsinc_get_property;
gobject_class->dispose = gst_bpwsinc_dispose;
gobject_class->set_property = audio_wsincband_set_property;
gobject_class->get_property = audio_wsincband_get_property;
gobject_class->dispose = audio_wsincband_dispose;
/* FIXME: Don't use the complete possible range but restrict the upper boundary
* so automatically generated UIs can use a slider */
......@@ -248,22 +250,23 @@ gst_bpwsinc_class_init (GstBPWSincClass * klass)
g_object_class_install_property (gobject_class, PROP_MODE,
g_param_spec_enum ("mode", "Mode",
"Band pass or band reject mode", GST_TYPE_BPWSINC_MODE,
"Band pass or band reject mode", GST_TYPE_AUDIO_WSINC_BAND_MODE,
MODE_BAND_PASS, G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
g_object_class_install_property (gobject_class, PROP_WINDOW,
g_param_spec_enum ("window", "Window",
"Window function to use", GST_TYPE_BPWSINC_WINDOW,
"Window function to use", GST_TYPE_AUDIO_WSINC_BAND_WINDOW,
WINDOW_HAMMING, G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
trans_class->transform = GST_DEBUG_FUNCPTR (bpwsinc_transform);
trans_class->start = GST_DEBUG_FUNCPTR (bpwsinc_start);
trans_class->event = GST_DEBUG_FUNCPTR (bpwsinc_event);
filter_class->setup = GST_DEBUG_FUNCPTR (bpwsinc_setup);
trans_class->transform = GST_DEBUG_FUNCPTR (audio_wsincband_transform);
trans_class->start = GST_DEBUG_FUNCPTR (audio_wsincband_start);
trans_class->event = GST_DEBUG_FUNCPTR (audio_wsincband_event);
filter_class->setup = GST_DEBUG_FUNCPTR (audio_wsincband_setup);
}
static void
gst_bpwsinc_init (GstBPWSinc * self, GstBPWSincClass * g_class)
audio_wsincband_init (GstAudioWSincBand * self,
GstAudioWSincBandClass * g_class)
{
self->kernel_length = 101;
self->latency = 50;
......@@ -279,14 +282,15 @@ gst_bpwsinc_init (GstBPWSinc * self, GstBPWSincClass * g_class)
self->next_ts = GST_CLOCK_TIME_NONE;
self->next_off = GST_BUFFER_OFFSET_NONE;
gst_pad_set_query_function (GST_BASE_TRANSFORM (self)->srcpad, bpwsinc_query);
gst_pad_set_query_function (GST_BASE_TRANSFORM (self)->srcpad,
audio_wsincband_query);
gst_pad_set_query_type_function (GST_BASE_TRANSFORM (self)->srcpad,
bpwsinc_query_type);
audio_wsincband_query_type);
}
#define DEFINE_PROCESS_FUNC(width,ctype) \
static void \
process_##width (GstBPWSinc * self, g##ctype * src, g##ctype * dst, guint input_samples) \
process_##width (GstAudioWSincBand * self, g##ctype * src, g##ctype * dst, guint input_samples) \
{ \
gint kernel_length = self->kernel_length; \
gint i, j, k, l; \
......@@ -331,7 +335,7 @@ DEFINE_PROCESS_FUNC (64, double);
#undef DEFINE_PROCESS_FUNC
static void
bpwsinc_build_kernel (GstBPWSinc * self)
audio_wsincband_build_kernel (GstAudioWSincBand * self)
{
gint i = 0;
gdouble sum = 0.0;
......@@ -365,7 +369,7 @@ bpwsinc_build_kernel (GstBPWSinc * self)
self->upper_frequency = tmp;
}
GST_DEBUG ("bpwsinc: initializing filter kernel of length %d "
GST_DEBUG ("audio_wsincband: initializing filter kernel of length %d "
"with lower frequency %.2lf Hz "
", upper frequency %.2lf Hz for mode %s",
len, self->lower_frequency, self->upper_frequency,
......@@ -457,7 +461,7 @@ bpwsinc_build_kernel (GstBPWSinc * self)
}
static void
bpwsinc_push_residue (GstBPWSinc * self)
audio_wsincband_push_residue (GstAudioWSincBand * self)
{
GstBuffer *outbuf;
GstFlowReturn res;
......@@ -536,16 +540,16 @@ bpwsinc_push_residue (GstBPWSinc * self)
/* get notified of caps and plug in the correct process function */
static gboolean
bpwsinc_setup (GstAudioFilter * base, GstRingBufferSpec * format)
audio_wsincband_setup (GstAudioFilter * base, GstRingBufferSpec * format)
{
GstBPWSinc *self = GST_BPWSINC (base);
GstAudioWSincBand *self = GST_AUDIO_WSINC_BAND (base);
gboolean ret = TRUE;
if (format->width == 32)
self->process = (GstBPWSincProcessFunc) process_32;
self->process = (GstAudioWSincBandProcessFunc) process_32;
else if (format->width == 64)
self->process = (GstBPWSincProcessFunc) process_64;
self->process = (GstAudioWSincBandProcessFunc) process_64;
else
ret = FALSE;
......@@ -557,10 +561,10 @@ bpwsinc_setup (GstAudioFilter * base, GstRingBufferSpec * format)
/* GstBaseTransform vmethod implementations */
static GstFlowReturn
bpwsinc_transform (GstBaseTransform * base, GstBuffer * inbuf,
audio_wsincband_transform (GstBaseTransform * base, GstBuffer * inbuf,
GstBuffer * outbuf)
{
GstBPWSinc *self = GST_BPWSINC (base);
GstAudioWSincBand *self = GST_AUDIO_WSINC_BAND (base);
GstClockTime timestamp;
gint channels = GST_AUDIO_FILTER (self)->format.channels;
gint rate = GST_AUDIO_FILTER (self)->format.rate;
......@@ -575,7 +579,7 @@ bpwsinc_transform (GstBaseTransform * base, GstBuffer * inbuf,
gst_object_sync_values (G_OBJECT (self), timestamp);
if (!self->have_kernel)
bpwsinc_build_kernel (self);
audio_wsincband_build_kernel (self);
/* Reset the residue if already existing on discont buffers */
if (GST_BUFFER_IS_DISCONT (inbuf)) {
......@@ -675,9 +679,9 @@ bpwsinc_transform (GstBaseTransform * base, GstBuffer * inbuf,
}
static gboolean
bpwsinc_start (GstBaseTransform * base)
audio_wsincband_start (GstBaseTransform * base)
{
GstBPWSinc *self = GST_BPWSINC (base);
GstAudioWSincBand *self = GST_AUDIO_WSINC_BAND (base);
gint channels = GST_AUDIO_FILTER (self)->format.channels;
/* Reset the residue if already existing */
......@@ -693,9 +697,9 @@ bpwsinc_start (GstBaseTransform * base)
}
static gboolean
bpwsinc_query (GstPad * pad, GstQuery * query)
audio_wsincband_query (GstPad * pad, GstQuery * query)
{
GstBPWSinc *self = GST_BPWSINC (gst_pad_get_parent (pad));
GstAudioWSincBand *self = GST_AUDIO_WSINC_BAND (gst_pad_get_parent (pad));
gboolean res = TRUE;
switch (GST_QUERY_TYPE (query)) {
......@@ -746,7 +750,7 @@ bpwsinc_query (GstPad * pad, GstQuery * query)
}
static const GstQueryType *
bpwsinc_query_type (GstPad * pad)
audio_wsincband_query_type (GstPad * pad)
{
static const GstQueryType types[] = {
GST_QUERY_LATENCY,
......@@ -757,13 +761,13 @@ bpwsinc_query_type (GstPad * pad)
}
static gboolean
bpwsinc_event (GstBaseTransform * base, GstEvent * event)
audio_wsincband_event (GstBaseTransform * base, GstEvent * event)
{
GstBPWSinc *self = GST_BPWSINC (base);
GstAudioWSincBand *self = GST_AUDIO_WSINC_BAND (base);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:
bpwsinc_push_residue (self);
audio_wsincband_push_residue (self);
break;
default:
break;
......@@ -773,12 +777,12 @@ bpwsinc_event (GstBaseTransform * base, GstEvent * event)
}
static void
bpwsinc_set_property (GObject * object, guint prop_id, const GValue * value,
GParamSpec * pspec)
audio_wsincband_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstBPWSinc *self = GST_BPWSINC (object);
GstAudioWSincBand *self = GST_AUDIO_WSINC_BAND (object);
g_return_if_fail (GST_IS_BPWSINC (self));
g_return_if_fail (GST_IS_AUDIO_WSINC_BAND (self));
switch (prop_id) {
case PROP_LENGTH:{
......@@ -791,13 +795,13 @@ bpwsinc_set_property (GObject * object, guint prop_id, const GValue * value,
if (val != self->kernel_length) {
if (self->residue) {
bpwsinc_push_residue (self);
audio_wsincband_push_residue (self);
g_free (self->residue);