gst-libs/gst/audio/gstaudiofilter.c: fix link function to always query channels and query width for floats

Original commit message from CVS:
* gst-libs/gst/audio/gstaudiofilter.c: (gst_audiofilter_link):
fix link function to always query channels and query width for
floats
* configure.ac:
add equalizer dir
* gst/equalizer/Makefile.am:
* gst/equalizer/gstiirequalizer.c: (gst_iir_equalizer_get_type),
(gst_iir_equalizer_base_init), (gst_iir_equalizer_class_init),
(gst_iir_equalizer_init), (gst_iir_equalizer_finalize),
(arg_to_scale), (setup_filter),
(gst_iir_equalizer_compute_frequencies),
(gst_iir_equalizer_set_property), (gst_iir_equalizer_get_property),
(gst_iir_equalizer_filter_inplace), (gst_iir_equalizer_setup),
(plugin_init):
add an equalizer
This commit is contained in:
Benjamin Otte 2004-10-28 02:33:47 +00:00
parent 7d5efeedce
commit 4f9bfe73fd
3 changed files with 25 additions and 3 deletions

View file

@ -1,3 +1,21 @@
2004-10-28 Benjamin Otte <otte@gnome.org>
* gst-libs/gst/audio/gstaudiofilter.c: (gst_audiofilter_link):
fix link function to always query channels and query width for
floats
* configure.ac:
add equalizer dir
* gst/equalizer/Makefile.am:
* gst/equalizer/gstiirequalizer.c: (gst_iir_equalizer_get_type),
(gst_iir_equalizer_base_init), (gst_iir_equalizer_class_init),
(gst_iir_equalizer_init), (gst_iir_equalizer_finalize),
(arg_to_scale), (setup_filter),
(gst_iir_equalizer_compute_frequencies),
(gst_iir_equalizer_set_property), (gst_iir_equalizer_get_property),
(gst_iir_equalizer_filter_inplace), (gst_iir_equalizer_setup),
(plugin_init):
add an equalizer
2004-10-27 Thomas Vander Stichele <thomas at apestaart dot org> 2004-10-27 Thomas Vander Stichele <thomas at apestaart dot org>
Submitted by: Kjartan Maraas <kmaraas@broadpark.no> Submitted by: Kjartan Maraas <kmaraas@broadpark.no>

View file

@ -342,6 +342,7 @@ GST_PLUGINS_ALL="\
debug \ debug \
deinterlace \ deinterlace \
effectv \ effectv \
equalizer \
festival \ festival \
ffmpegcolorspace \ ffmpegcolorspace \
filter \ filter \
@ -1832,6 +1833,7 @@ gst/cutter/Makefile
gst/debug/Makefile gst/debug/Makefile
gst/deinterlace/Makefile gst/deinterlace/Makefile
gst/effectv/Makefile gst/effectv/Makefile
gst/equalizer/Makefile
gst/festival/Makefile gst/festival/Makefile
gst/ffmpegcolorspace/Makefile gst/ffmpegcolorspace/Makefile
gst/filter/Makefile gst/filter/Makefile

View file

@ -141,15 +141,17 @@ gst_audiofilter_link (GstPad * pad, const GstCaps * caps)
if (strcmp (gst_structure_get_name (structure), "audio/x-raw-int") == 0) { if (strcmp (gst_structure_get_name (structure), "audio/x-raw-int") == 0) {
ret = gst_structure_get_int (structure, "depth", &audiofilter->depth); ret = gst_structure_get_int (structure, "depth", &audiofilter->depth);
ret &= gst_structure_get_int (structure, "width", &audiofilter->width); ret &= gst_structure_get_int (structure, "width", &audiofilter->width);
ret &=
gst_structure_get_int (structure, "channels", &audiofilter->channels);
} else if (strcmp (gst_structure_get_name (structure), "audio/x-raw-float") } else if (strcmp (gst_structure_get_name (structure), "audio/x-raw-float")
== 0) { == 0) {
ret &= gst_structure_get_int (structure, "width", &audiofilter->width);
} else { } else {
g_assert_not_reached (); g_assert_not_reached ();
} }
ret &= gst_structure_get_int (structure, "rate", &audiofilter->rate); ret &= gst_structure_get_int (structure, "rate", &audiofilter->rate);
ret &= gst_structure_get_int (structure, "channels", &audiofilter->channels);
if (!ret)
return GST_PAD_LINK_REFUSED;
audiofilter->bytes_per_sample = (audiofilter->width / 8) * audiofilter->bytes_per_sample = (audiofilter->width / 8) *
audiofilter->channels; audiofilter->channels;