After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 127984 - Compilation error in ext/alsa/gstalsa.c because too many args passed to snd_pcm_hw_params* functions
Compilation error in ext/alsa/gstalsa.c because too many args passed to snd_p...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal critical
: 0.7.1
Assigned To: Leif Johnson
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-11-26 15:35 UTC by Damien Carbery
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
Change how snd_pcm_hw_params* funcs called in ext/alsa/gstalsa.c (2.84 KB, patch)
2003-11-26 15:35 UTC, Damien Carbery
none Details | Review

Description Damien Carbery 2003-11-26 15:35:02 UTC
Some of the calls to snd_pcm_hw_params* functions specify the wrong number
of parameters.
For snd_pcm_hw_params_get_channels_min, the min_rate data is returned
rather that setting a passed variable pointer.
I have alsa-devel-0.9.0.cvs20020903-178 on the system.

Patch attached.

Makefile and compiler output:
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I/opt/gnome-2.4/include
-I../../gst-libs -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread
-I/opt/gnome-2.4/include/gstreamer-0.7 -I/opt/gnome-2.4/include/glib-2.0
-I/opt/gnome-2.4/lib/glib-2.0/include -I/opt/gnome-2.4/include/libxml2
-DGST_DISABLE_DEPRECATED -Wall -Werror -DG_DISABLE_DEPRECATED -g
-I/opt/gnome-2.4/include -MT libgstalsa_la-gstalsa.lo -MD -MP -MF
.deps/libgstalsa_la-gstalsa.Tpo -c gstalsa.c  -fPIC -DPIC -o
libgstalsa_la-gstalsa.lo
gstalsa.c: In function `gst_alsa_get_caps':
gstalsa.c:559: too many arguments to function
`snd_pcm_hw_params_get_channels_min'
gstalsa.c:561: too many arguments to function
`snd_pcm_hw_params_get_channels_max'
gstalsa.c:567: too many arguments to function `snd_pcm_hw_params_get_rate_min'
gstalsa.c:570: too many arguments to function `snd_pcm_hw_params_get_rate_max'
cc1: warnings being treated as errors
gstalsa.c: In function `gst_alsa_probe_hw_params':
gstalsa.c:1052: warning: passing arg 3 of
`snd_pcm_hw_params_set_periods_near' makes integer from pointer without a cast
gstalsa.c:1054: warning: passing arg 3 of
`snd_pcm_hw_params_set_period_size_near' makes integer from pointer without
a cast
gstalsa.c: In function `gst_alsa_set_hw_params':
gstalsa.c:1108: warning: passing arg 3 of
`snd_pcm_hw_params_set_periods_near' makes integer from pointer without a cast
gstalsa.c:1110: warning: passing arg 3 of
`snd_pcm_hw_params_set_period_size_near' makes integer from pointer without
a cast
Comment 1 Damien Carbery 2003-11-26 15:35:48 UTC
Created attachment 21829 [details] [review]
Change how snd_pcm_hw_params* funcs called in ext/alsa/gstalsa.c
Comment 2 Leif Johnson 2003-11-27 01:19:24 UTC
You need to upgrade your ALSA devel libraries; apparently the API
changed between 0.9.0 and 0.9.1. The plugins compile well with the
current ALSA lib version (0.9.8), see
http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_8h-source.html for
the current function prototype.

I'll bump up the ALSA requirement in the configure script. Thanks for
reporting this.