Commit 75c1c9f3 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

Add audioiirfilter and audiofirfilter elements which allow generic IIR/FIR...

Add audioiirfilter and audiofirfilter elements which allow generic IIR/FIR filters to be implemented by providing the...

Original commit message from CVS:
* configure.ac:
* gst/audiofx/Makefile.am:
* gst/audiofx/audiofirfilter.c: (gst_audio_fir_filter_base_init),
(gst_audio_fir_filter_class_init),
(gst_audio_fir_filter_update_kernel), (gst_audio_fir_filter_init),
(gst_audio_fir_filter_setup), (gst_audio_fir_filter_finalize),
(gst_audio_fir_filter_set_property),
(gst_audio_fir_filter_get_property):
* gst/audiofx/audiofirfilter.h:
* gst/audiofx/audiofx.c: (plugin_init):
* gst/audiofx/audioiirfilter.c: (gst_audio_iir_filter_base_init),
(gst_audio_iir_filter_class_init),
(gst_audio_iir_filter_update_coefficients),
(gst_audio_iir_filter_init), (gst_audio_iir_filter_setup),
(gst_audio_iir_filter_finalize),
(gst_audio_iir_filter_set_property),
(gst_audio_iir_filter_get_property):
* gst/audiofx/audioiirfilter.h:
Add audioiirfilter and audiofirfilter elements which allow
generic IIR/FIR filters to be implemented by providing the
filter coefficients. Fixes bug #567577.
* 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/gst-plugins-good-plugins.hierarchy:
* docs/plugins/gst-plugins-good-plugins.signals:
* docs/plugins/inspect/plugin-alaw.xml:
* docs/plugins/inspect/plugin-audiofx.xml:
* docs/plugins/inspect/plugin-avi.xml:
* docs/plugins/inspect/plugin-flac.xml:
* docs/plugins/inspect/plugin-mulaw.xml:
* docs/plugins/inspect/plugin-video4linux2.xml:
* docs/plugins/inspect/plugin-wavparse.xml:
Add documentation for the audioiirfilter and audiofirfilter
elements.
* tests/check/Makefile.am:
* tests/check/elements/audiofirfilter.c: (on_message),
(on_rate_changed), (on_handoff), (GST_START_TEST),
(audiofirfilter_suite):
* tests/check/elements/audioiirfilter.c: (on_message),
(on_rate_changed), (on_handoff), (GST_START_TEST),
(audioiirfilter_suite):
* tests/examples/Makefile.am:
* tests/examples/audiofx/Makefile.am:
* tests/examples/audiofx/firfilter-example.c: (on_message),
(on_rate_changed), (main):
* tests/examples/audiofx/iirfilter-example.c: (on_message),
(on_rate_changed), (main):
Add unit tests and example applications for the two filter
elements.
parent 5f5ae768
2009-01-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* configure.ac:
* gst/audiofx/Makefile.am:
* gst/audiofx/audiofirfilter.c: (gst_audio_fir_filter_base_init),
(gst_audio_fir_filter_class_init),
(gst_audio_fir_filter_update_kernel), (gst_audio_fir_filter_init),
(gst_audio_fir_filter_setup), (gst_audio_fir_filter_finalize),
(gst_audio_fir_filter_set_property),
(gst_audio_fir_filter_get_property):
* gst/audiofx/audiofirfilter.h:
* gst/audiofx/audiofx.c: (plugin_init):
* gst/audiofx/audioiirfilter.c: (gst_audio_iir_filter_base_init),
(gst_audio_iir_filter_class_init),
(gst_audio_iir_filter_update_coefficients),
(gst_audio_iir_filter_init), (gst_audio_iir_filter_setup),
(gst_audio_iir_filter_finalize),
(gst_audio_iir_filter_set_property),
(gst_audio_iir_filter_get_property):
* gst/audiofx/audioiirfilter.h:
Add audioiirfilter and audiofirfilter elements which allow
generic IIR/FIR filters to be implemented by providing the
filter coefficients. Fixes bug #567577.
* 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/gst-plugins-good-plugins.hierarchy:
* docs/plugins/gst-plugins-good-plugins.signals:
* docs/plugins/inspect/plugin-alaw.xml:
* docs/plugins/inspect/plugin-audiofx.xml:
* docs/plugins/inspect/plugin-avi.xml:
* docs/plugins/inspect/plugin-flac.xml:
* docs/plugins/inspect/plugin-mulaw.xml:
* docs/plugins/inspect/plugin-video4linux2.xml:
* docs/plugins/inspect/plugin-wavparse.xml:
Add documentation for the audioiirfilter and audiofirfilter
elements.
* tests/check/Makefile.am:
* tests/check/elements/audiofirfilter.c: (on_message),
(on_rate_changed), (on_handoff), (GST_START_TEST),
(audiofirfilter_suite):
* tests/check/elements/audioiirfilter.c: (on_message),
(on_rate_changed), (on_handoff), (GST_START_TEST),
(audioiirfilter_suite):
* tests/examples/Makefile.am:
* tests/examples/audiofx/Makefile.am:
* tests/examples/audiofx/firfilter-example.c: (on_message),
(on_rate_changed), (main):
* tests/examples/audiofx/iirfilter-example.c: (on_message),
(on_rate_changed), (main):
Add unit tests and example applications for the two filter
elements.
2009-01-13 Michael Smith <msmith@songbirdnest.com> 2009-01-13 Michael Smith <msmith@songbirdnest.com>
   
Patch by: Thiago Sousa Santos <thiagoss@embedded.ufcg.edu.br> Patch by: Thiago Sousa Santos <thiagoss@embedded.ufcg.edu.br>
......
...@@ -1105,6 +1105,7 @@ po/Makefile.in ...@@ -1105,6 +1105,7 @@ po/Makefile.in
tests/Makefile tests/Makefile
tests/check/Makefile tests/check/Makefile
tests/examples/Makefile tests/examples/Makefile
tests/examples/audiofx/Makefile
tests/examples/equalizer/Makefile tests/examples/equalizer/Makefile
tests/examples/level/Makefile tests/examples/level/Makefile
tests/examples/rtp/Makefile tests/examples/rtp/Makefile
......
...@@ -112,8 +112,10 @@ EXTRA_HFILES = \ ...@@ -112,8 +112,10 @@ EXTRA_HFILES = \
$(top_srcdir)/gst/audiofx/audiopanorama.h \ $(top_srcdir)/gst/audiofx/audiopanorama.h \
$(top_srcdir)/gst/audiofx/audiocheblimit.h \ $(top_srcdir)/gst/audiofx/audiocheblimit.h \
$(top_srcdir)/gst/audiofx/audiochebband.h \ $(top_srcdir)/gst/audiofx/audiochebband.h \
$(top_srcdir)/gst/audiofx/audioiirfilter.h \
$(top_srcdir)/gst/audiofx/audiowsincband.h \ $(top_srcdir)/gst/audiofx/audiowsincband.h \
$(top_srcdir)/gst/audiofx/audiowsinclimit.h \ $(top_srcdir)/gst/audiofx/audiowsinclimit.h \
$(top_srcdir)/gst/audiofx/audiofirfilter.h \
$(top_srcdir)/gst/autodetect/gstautoaudiosink.h \ $(top_srcdir)/gst/autodetect/gstautoaudiosink.h \
$(top_srcdir)/gst/autodetect/gstautoaudiosrc.h \ $(top_srcdir)/gst/autodetect/gstautoaudiosrc.h \
$(top_srcdir)/gst/autodetect/gstautovideosink.h \ $(top_srcdir)/gst/autodetect/gstautovideosink.h \
...@@ -177,7 +179,9 @@ EXTRA_HFILES = \ ...@@ -177,7 +179,9 @@ EXTRA_HFILES = \
# example code that needs to be converted to xml and placed in xml/ # example code that needs to be converted to xml and placed in xml/
EXAMPLE_CFILES = \ EXAMPLE_CFILES = \
$(top_srcdir)/tests/examples/level/level-example.c \ $(top_srcdir)/tests/examples/level/level-example.c \
$(top_srcdir)/tests/examples/spectrum/spectrum-example.c $(top_srcdir)/tests/examples/spectrum/spectrum-example.c \
$(top_srcdir)/tests/examples/audiofx/firfilter-example.c \
$(top_srcdir)/tests/examples/audiofx/iirfilter-example.c
# Images to copy into HTML directory. # Images to copy into HTML directory.
HTML_IMAGES = HTML_IMAGES =
......
...@@ -19,8 +19,10 @@ ...@@ -19,8 +19,10 @@
<xi:include href="xml/element-audioamplify.xml" /> <xi:include href="xml/element-audioamplify.xml" />
<xi:include href="xml/element-audiochebband.xml" /> <xi:include href="xml/element-audiochebband.xml" />
<xi:include href="xml/element-audiocheblimit.xml" /> <xi:include href="xml/element-audiocheblimit.xml" />
<xi:include href="xml/element-audioiirfilter.xml" />
<xi:include href="xml/element-audiowsincband.xml" /> <xi:include href="xml/element-audiowsincband.xml" />
<xi:include href="xml/element-audiowsinclimit.xml" /> <xi:include href="xml/element-audiowsinclimit.xml" />
<xi:include href="xml/element-audiofirfilter.xml" />
<xi:include href="xml/element-audiodynamic.xml" /> <xi:include href="xml/element-audiodynamic.xml" />
<xi:include href="xml/element-audioinvert.xml" /> <xi:include href="xml/element-audioinvert.xml" />
<xi:include href="xml/element-audiopanorama.xml" /> <xi:include href="xml/element-audiopanorama.xml" />
......
...@@ -102,6 +102,20 @@ GST_TYPE_AUDIO_CHEB_LIMIT ...@@ -102,6 +102,20 @@ GST_TYPE_AUDIO_CHEB_LIMIT
gst_audio_cheb_limit_get_type gst_audio_cheb_limit_get_type
</SECTION> </SECTION>
<SECTION>
<FILE>element-audioiirfilter</FILE>
<TITLE>audioiirfilter</TITLE>
GstAudioIIRFilter
<SUBSECTION Standard>
GstAudioIIRFilterClass
GST_AUDIO_IIR_FILTER
GST_AUDIO_IIR_FILTER_CLASS
GST_IS_AUDIO_IIR_FILTER_BAND
GST_IS_AUDIO_IIR_FILTER_CLASS
GST_TYPE_AUDIO_IIR_FILTER
gst_audio_iir_filter_get_type
</SECTION>
<SECTION> <SECTION>
<FILE>element-audiodynamic</FILE> <FILE>element-audiodynamic</FILE>
<TITLE>audiodynamic</TITLE> <TITLE>audiodynamic</TITLE>
...@@ -178,7 +192,7 @@ GST_AUDIO_WSINC_BAND_CLASS ...@@ -178,7 +192,7 @@ GST_AUDIO_WSINC_BAND_CLASS
GST_IS_AUDIO_WSINC_BAND GST_IS_AUDIO_WSINC_BAND
GST_IS_AUDIO_WSINC_BAND_CLASS GST_IS_AUDIO_WSINC_BAND_CLASS
GST_TYPE_AUDIO_WSINC_BAND GST_TYPE_AUDIO_WSINC_BAND
audio_wsincband_get_type gst_audio_wsincband_get_type
</SECTION> </SECTION>
<SECTION> <SECTION>
...@@ -193,7 +207,21 @@ GST_AUDIO_WSINC_LIMIT_CLASS ...@@ -193,7 +207,21 @@ GST_AUDIO_WSINC_LIMIT_CLASS
GST_IS_AUDIO_WSINC_LIMIT GST_IS_AUDIO_WSINC_LIMIT
GST_IS_AUDIO_WSINC_LIMIT_CLASS GST_IS_AUDIO_WSINC_LIMIT_CLASS
GST_TYPE_AUDIO_WSINC_LIMIT GST_TYPE_AUDIO_WSINC_LIMIT
audio_wsinclimit_get_type gst_audio_wsinclimit_get_type
</SECTION>
<SECTION>
<FILE>element-audiofirfilter</FILE>
<TITLE>audiofirfilter</TITLE>
GstAudioFIRFilter
<SUBSECTION Standard>
GstAudioFIRFilterClass
GST_AUDIO_FIR_FILTER
GST_AUDIO_FIR_FILTER_CLASS
GST_IS_AUDIO_FIR_FILTER_BAND
GST_IS_AUDIO_FIR_FILTER_CLASS
GST_TYPE_AUDIO_FIR_FILTER
gst_audio_fir_filter_get_type
</SECTION> </SECTION>
<SECTION> <SECTION>
......
...@@ -19668,3 +19668,43 @@ ...@@ -19668,3 +19668,43 @@
<DEFAULT>1</DEFAULT> <DEFAULT>1</DEFAULT>
</ARG> </ARG>
<ARG>
<NAME>GstAudioFIRFilter::kernel</NAME>
<TYPE>GValueArray*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Filter Kernel</NICK>
<BLURB>Filter kernel for the FIR filter.</BLURB>
<DEFAULT></DEFAULT>
</ARG>
<ARG>
<NAME>GstAudioFIRFilter::latency</NAME>
<TYPE>guint64</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Latecy</NICK>
<BLURB>Filter latency in samples.</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstAudioIIRFilter::a</NAME>
<TYPE>GValueArray*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>A</NICK>
<BLURB>Filter coefficients (numerator of transfer function).</BLURB>
<DEFAULT></DEFAULT>
</ARG>
<ARG>
<NAME>GstAudioIIRFilter::b</NAME>
<TYPE>GValueArray*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>B</NICK>
<BLURB>Filter coefficients (denominator of transfer function).</BLURB>
<DEFAULT></DEFAULT>
</ARG>
...@@ -56,10 +56,14 @@ GObject ...@@ -56,10 +56,14 @@ GObject
GstAudioKaraoke GstAudioKaraoke
GstAudioAmplify GstAudioAmplify
GstAudioDynamic GstAudioDynamic
GstAudioChebLimit GstAudioFXBaseIIRFilter
GstAudioChebBand GstAudioChebLimit
GstAudioWSincLimit GstAudioChebBand
GstAudioWSincBand GstAudioIIRFilter
GstAudioFXBaseFIRFilter
GstAudioWSincLimit
GstAudioWSincBand
GstAudioFIRFilter
GstIirEqualizer GstIirEqualizer
GstIirEqualizerNBands GstIirEqualizerNBands
GstIirEqualizer3Bands GstIirEqualizer3Bands
......
...@@ -332,3 +332,19 @@ guint arg1 ...@@ -332,3 +332,19 @@ guint arg1
guint arg2 guint arg2
</SIGNAL> </SIGNAL>
<SIGNAL>
<NAME>GstAudioFIRFilter::rate-changed</NAME>
<RETURNS>void</RETURNS>
<FLAGS>l</FLAGS>
GstAudioFIRFilter *gstaudiofirfilter
gint arg1
</SIGNAL>
<SIGNAL>
<NAME>GstAudioIIRFilter::rate-changed</NAME>
<RETURNS>void</RETURNS>
<FLAGS>l</FLAGS>
GstAudioIIRFilter *gstaudioiirfilter
gint arg1
</SIGNAL>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<name>src</name> <name>src</name>
<direction>source</direction> <direction>source</direction>
<presence>always</presence> <presence>always</presence>
<details>audio/x-raw-int, width=(int)16, depth=(int)16, endianness=(int)1234, signed=(boolean)true, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ]</details> <details>audio/x-raw-int, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ], endianness=(int)1234, width=(int)16, signed=(boolean)true</details>
</caps> </caps>
</pads> </pads>
</element> </element>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<name>sink</name> <name>sink</name>
<direction>sink</direction> <direction>sink</direction>
<presence>always</presence> <presence>always</presence>
<details>audio/x-raw-int, width=(int)16, depth=(int)16, endianness=(int)1234, signed=(boolean)true, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ]</details> <details>audio/x-raw-int, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ], endianness=(int)1234, width=(int)16, signed=(boolean)true</details>
</caps> </caps>
<caps> <caps>
<name>src</name> <name>src</name>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<longname>Band pass &amp; band reject filter</longname> <longname>Band pass &amp; band reject filter</longname>
<class>Filter/Effect/Audio</class> <class>Filter/Effect/Audio</class>
<description>Chebyshev band pass and band reject filter</description> <description>Chebyshev band pass and band reject filter</description>
<author>Sebastian Dröge &lt;slomo@circular-chaos.org&gt;</author> <author>Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</author>
<pads> <pads>
<caps> <caps>
<name>sink</name> <name>sink</name>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<longname>Low pass &amp; high pass filter</longname> <longname>Low pass &amp; high pass filter</longname>
<class>Filter/Effect/Audio</class> <class>Filter/Effect/Audio</class>
<description>Chebyshev low pass and high pass filter</description> <description>Chebyshev low pass and high pass filter</description>
<author>Sebastian Dröge &lt;slomo@circular-chaos.org&gt;</author> <author>Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</author>
<pads> <pads>
<caps> <caps>
<name>sink</name> <name>sink</name>
...@@ -93,6 +93,48 @@ ...@@ -93,6 +93,48 @@
</caps> </caps>
</pads> </pads>
</element> </element>
<element>
<name>audiofirfilter</name>
<longname>Audio FIR filter</longname>
<class>Filter/Effect/Audio</class>
<description>Generic audio FIR filter with custom filter kernel</description>
<author>Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</author>
<pads>
<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>
<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>
</pads>
</element>
<element>
<name>audioiirfilter</name>
<longname>Audio IIR filter</longname>
<class>Filter/Effect/Audio</class>
<description>Generic audio IIR filter with custom filter kernel</description>
<author>Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</author>
<pads>
<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>
<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>
</pads>
</element>
<element> <element>
<name>audioinvert</name> <name>audioinvert</name>
<longname>Audio inversion</longname> <longname>Audio inversion</longname>
...@@ -161,7 +203,7 @@ ...@@ -161,7 +203,7 @@
<longname>Band pass &amp; band reject filter</longname> <longname>Band pass &amp; band reject filter</longname>
<class>Filter/Effect/Audio</class> <class>Filter/Effect/Audio</class>
<description>Band pass and band reject windowed sinc filter</description> <description>Band pass and band reject windowed sinc filter</description>
<author>Thomas Vander Stichele &lt;thomas at apestaart dot org&gt;, Steven W. Smith, Dreamlab Technologies Ltd. &lt;mathis.hofer@dreamlab.net&gt;, Sebastian Dröge &lt;slomo@circular-chaos.org&gt;</author> <author>Thomas Vander Stichele &lt;thomas at apestaart dot org&gt;, Steven W. Smith, Dreamlab Technologies Ltd. &lt;mathis.hofer@dreamlab.net&gt;, Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</author>
<pads> <pads>
<caps> <caps>
<name>sink</name> <name>sink</name>
...@@ -182,7 +224,7 @@ ...@@ -182,7 +224,7 @@
<longname>Low pass &amp; high pass filter</longname> <longname>Low pass &amp; high pass filter</longname>
<class>Filter/Effect/Audio</class> <class>Filter/Effect/Audio</class>
<description>Low pass and high pass windowed sinc filter</description> <description>Low pass and high pass windowed sinc filter</description>
<author>Thomas Vander Stichele &lt;thomas at apestaart dot org&gt;, Steven W. Smith, Dreamlab Technologies Ltd. &lt;mathis.hofer@dreamlab.net&gt;, Sebastian Dröge &lt;slomo@circular-chaos.org&gt;</author> <author>Thomas Vander Stichele &lt;thomas at apestaart dot org&gt;, Steven W. Smith, Dreamlab Technologies Ltd. &lt;mathis.hofer@dreamlab.net&gt;, Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</author>
<pads> <pads>
<caps> <caps>
<name>sink</name> <name>sink</name>
......
This diff is collapsed.
...@@ -16,18 +16,18 @@ ...@@ -16,18 +16,18 @@
<description>Decodes FLAC lossless audio streams</description> <description>Decodes FLAC lossless audio streams</description>
<author>Wim Taymans &lt;wim@fluendo.com&gt;</author> <author>Wim Taymans &lt;wim@fluendo.com&gt;</author>
<pads> <pads>
<caps>
<name>src</name>
<direction>source</direction>
<presence>always</presence>
<details>audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int){ 8, 16, 32 }, depth=(int)[ 4, 32 ], rate=(int)[ 1, 655350 ], channels=(int)[ 1, 8 ]</details>
</caps>
<caps> <caps>
<name>sink</name> <name>sink</name>
<direction>sink</direction> <direction>sink</direction>
<presence>always</presence> <presence>always</presence>
<details>audio/x-flac</details> <details>audio/x-flac</details>
</caps> </caps>
<caps>
<name>src</name>
<direction>source</direction>
<presence>always</presence>
<details>audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int){ 8, 16, 32 }, depth=(int)[ 4, 32 ], rate=(int)[ 1, 655350 ], channels=(int)[ 1, 8 ]</details>
</caps>
</pads> </pads>
</element> </element>
<element> <element>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<name>src</name> <name>src</name>
<direction>source</direction> <direction>source</direction>
<presence>always</presence> <presence>always</presence>
<details>audio/x-raw-int, width=(int)16, depth=(int)16, endianness=(int)1234, signed=(boolean)true, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ]</details> <details>audio/x-raw-int, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ], endianness=(int)1234, width=(int)16, signed=(boolean)true</details>
</caps> </caps>
</pads> </pads>
</element> </element>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<name>sink</name> <name>sink</name>
<direction>sink</direction> <direction>sink</direction>
<presence>always</presence> <presence>always</presence>
<details>audio/x-raw-int, width=(int)16, depth=(int)16, endianness=(int)1234, signed=(boolean)true, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ]</details> <details>audio/x-raw-int, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ], endianness=(int)1234, width=(int)16, signed=(boolean)true</details>
</caps> </caps>
<caps> <caps>
<name>src</name> <name>src</name>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<name>src</name> <name>src</name>
<direction>source</direction> <direction>source</direction>
<presence>always</presence> <presence>always</presence>
<details>video/x-raw-rgb, bpp=(int)8, depth=(int)8, red_mask=(int)224, green_mask=(int)28, blue_mask=(int)3, endianness=(int)1234, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)15, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, endianness=(int)1234, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)16, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, endianness=(int)1234, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)15, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, endianness=(int)4321, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)16, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, endianness=(int)4321, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)24, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)24, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)32, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)32, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, endianness=(int)4321, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)YVU9, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)YV12, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)YUY2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)UYVY, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)Y42B, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)Y41B, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)Y41P, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)NV12, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)NV21, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)YUV9, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)I420, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-bayer, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; image/jpeg, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; image/jpeg, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-dv, systemstream=(boolean)true, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]</details> <details>video/x-raw-rgb, bpp=(int)8, depth=(int)8, red_mask=(int)224, green_mask=(int)28, blue_mask=(int)3, endianness=(int)1234, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)15, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, endianness=(int)1234, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)16, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, endianness=(int)1234, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)15, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, endianness=(int)4321, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)16, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, endianness=(int)4321, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)24, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)24, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)32, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)32, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, endianness=(int)4321, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-gray, bpp=(int)8, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)YVU9, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)YV12, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)YUY2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)UYVY, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)Y42B, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)Y41B, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)Y41P, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)NV12, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)NV21, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)YUV9, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-yuv, format=(fourcc)I420, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-raw-bayer, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; image/jpeg, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; image/jpeg, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-dv, systemstream=(boolean)true, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]; video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]</details>
</caps> </caps>
</pads> </pads>
</element> </element>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<name>wavparse_src</name> <name>wavparse_src</name>
<direction>source</direction> <direction>source</direction>
<presence>sometimes</presence> <presence>sometimes</presence>
<details>audio/ms-gsm, rate=(int)[ 1, 96000 ], channels=(int)[ 1, 2 ]; audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]; audio/mpeg, mpegversion=(int)1, layer=(int)2, rate=(int)[ 16000, 48000 ], channels=(int)[ 1, 2 ]; audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false }, width=(int){ 8, 16, 24, 32 }, depth=(int)[ 1, 32 ], rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 8 ]; audio/x-vorbis, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-ac3, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 6 ]; audio/x-dts; audio/mpeg, mpegversion=(int)4, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 8 ]; audio/x-alaw, rate=(int)[ 1000, 48000 ], channels=(int)[ 1, 2 ]; audio/x-mulaw, rate=(int)[ 1000, 48000 ], channels=(int)[ 1, 2 ]; audio/x-wms, bitrate=(int)[ 0, 2147483647 ], rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ], block_align=(int)[ 1, 2147483647 ]; audio/x-adpcm, layout=(string)microsoft, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ], block_align=(int)[ 1, 2147483647 ]; audio/x-adpcm, layout=(string)dvi, rate=(int)[ 1000, 48000 ], channels=(int)[ 1, 2 ], block_align=(int)[ 1, 2147483647 ]; audio/x-truespeech, rate=(int)8000, channels=(int)[ 1, 2 ]; audio/x-wma, wmaversion=(int)1, bitrate=(int)[ 0, 2147483647 ], rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 6 ], block_align=(int)[ 1, 2147483647 ]; audio/x-wma, wmaversion=(int)2, bitrate=(int)[ 0, 2147483647 ], rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 6 ], block_align=(int)[ 1, 2147483647 ]; audio/x-wma, wmaversion=(int)3, bitrate=(int)[ 0, 2147483647 ], rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 6 ], block_align=(int)[ 1, 2147483647 ]; audio/x-vnd.sony.atrac3, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-raw-float, endianness=(int)1234, width=(int){ 32, 64 }, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 8 ]; audio/x-voxware, voxwaretype=(int)117, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-adpcm, layout=(string)dk4, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-adpcm, layout=(string)dk3, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; application/x-ogg-avi</details> <details>audio/ms-gsm, rate=(int)[ 1, 96000 ], channels=(int)[ 1, 2 ]; audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]; audio/mpeg, mpegversion=(int)1, layer=(int)2, rate=(int)[ 16000, 48000 ], channels=(int)[ 1, 2 ]; audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false }, width=(int){ 8, 16, 24, 32 }, depth=(int)[ 1, 32 ], rate=(int)[ 1000, 192000 ], channels=(int)[ 1, 8 ]; audio/x-vorbis, rate=(int)[ 1000, 192000 ], channels=(int)[ 1, 2 ]; audio/x-ac3, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 6 ]; audio/x-dts; audio/mpeg, mpegversion=(int)4, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 8 ]; audio/x-alaw, rate=(int)[ 1000, 48000 ], channels=(int)[ 1, 2 ]; audio/x-mulaw, rate=(int)[ 1000, 48000 ], channels=(int)[ 1, 2 ]; audio/x-wms, bitrate=(int)[ 0, 2147483647 ], rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ], block_align=(int)[ 1, 2147483647 ]; audio/x-adpcm, layout=(string)microsoft, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ], block_align=(int)[ 1, 2147483647 ]; audio/x-adpcm, layout=(string)dvi, rate=(int)[ 1000, 48000 ], channels=(int)[ 1, 2 ], block_align=(int)[ 1, 2147483647 ]; audio/x-truespeech, rate=(int)8000, channels=(int)[ 1, 2 ]; audio/x-wma, wmaversion=(int)1, bitrate=(int)[ 0, 2147483647 ], rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 6 ], block_align=(int)[ 1, 2147483647 ]; audio/x-wma, wmaversion=(int)2, bitrate=(int)[ 0, 2147483647 ], rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 6 ], block_align=(int)[ 1, 2147483647 ]; audio/x-wma, wmaversion=(int)3, bitrate=(int)[ 0, 2147483647 ], rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 6 ], block_align=(int)[ 1, 2147483647 ]; audio/x-vnd.sony.atrac3, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-raw-float, endianness=(int)1234, width=(int){ 32, 64 }, rate=(int)[ 1000, 192000 ], channels=(int)[ 1, 8 ]; audio/x-voxware, voxwaretype=(int)117, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-adpcm, layout=(string)dk4, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-adpcm, layout=(string)dk3, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; application/x-ogg-avi</details>
</caps> </caps>
<caps> <caps>
<name>wavparse_sink</name> <name>wavparse_sink</name>
......
...@@ -12,9 +12,11 @@ libgstaudiofx_la_SOURCES = audiofx.c\ ...@@ -12,9 +12,11 @@ libgstaudiofx_la_SOURCES = audiofx.c\
audiofxbaseiirfilter.c \ audiofxbaseiirfilter.c \
audiocheblimit.c \ audiocheblimit.c \
audiochebband.c \ audiochebband.c \
audioiirfilter.c \
audiofxbasefirfilter.c \ audiofxbasefirfilter.c \
audiowsincband.c \ audiowsincband.c \
audiowsinclimit.c audiowsinclimit.c \
audiofirfilter.c
# flags used to compile this plugin # flags used to compile this plugin
libgstaudiofx_la_CFLAGS = $(GST_CFLAGS) \ libgstaudiofx_la_CFLAGS = $(GST_CFLAGS) \
...@@ -39,8 +41,10 @@ noinst_HEADERS = audiopanorama.h \ ...@@ -39,8 +41,10 @@ noinst_HEADERS = audiopanorama.h \
audiofxbaseiirfilter.h \ audiofxbaseiirfilter.h \
audiocheblimit.h \ audiocheblimit.h \
audiochebband.h \ audiochebband.h \
audioiirfilter.h \
audiofxbasefirfilter.h \ audiofxbasefirfilter.h \
audiowsincband.h \ audiowsincband.h \
audiowsinclimit.h \ audiowsinclimit.h \
audiofirfilter.h \
math_compat.h math_compat.h
/*
* GStreamer
* Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
/**
* SECTION:element-audiofirfilter
* @short_description: Generic audio FIR filter
*
* <refsect2>
* <para>
* audiofirfilter implements a generic audio <ulink url="http://en.wikipedia.org/wiki/Finite_impulse_response">FIR filter</ulink>. Before usage the
* "kernel" property has to be set to the filter kernel that should be
* used and the "latency" property has to be set to the latency (in samples)
* that is introduced by the filter kernel. Setting a latency of n samples
* will lead to the first n samples being dropped from the output and
* n samples added to the end.
* </para>
* <para>
* The filter kernel describes the impulse response of the filter. To
* calculate the frequency response of the filter you have to calculate
* the Fourier Transform of the impulse response.
* </para>
* <para>
* To change the filter kernel whenever the sampling rate changes the
* "rate-changed" signal can be used. This should be done for most
* FIR filters as they're depending on the sampling rate.
* </para>
* <title>Example application</title>
* <para>
* <include xmlns="http://www.w3.org/2003/XInclude" href="element-firfilter-example.xml" />
* </para>
* </refsect2>
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#include <math.h>
#include <gst/gst.h>
#include <gst/audio/gstaudiofilter.h>
#include <gst/controller/gstcontroller.h>