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 143861 - OSS elements portability on BSD (soundcard.h location)
OSS elements portability on BSD (soundcard.h location)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other FreeBSD
: Normal normal
: 0.8.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-06-07 12:38 UTC by Stephane Loeuillet
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
look for soundcard.h in 3 different dirs for BSD portability (6.10 KB, patch)
2004-06-07 13:30 UTC, Stephane Loeuillet
none Details | Review

Description Stephane Loeuillet 2004-06-07 12:38:22 UTC
as the devel-mailing seems to work when it wants (not very often), i post a
"potential" bug here.

some BSD that have OSS emulation (Free/Net/OpenBSD), have put (or still do)
their soundcard.h in INCLUDEDIR/, INCLUDEDIR/machine/ and sometimes
INCLUDEDIR/sys (like current linux does)

configure.ac only checks for sys/soundcard.h
oss & arts plugins only include sys/soundcard.h

first question : is arts OSS specific ?
i see no check for OSS presence in configure.ac arts detection section

would attach a patch in the near future that should fix this

any BSD people can tell me where this header is on their system and which
version they use ?
Comment 1 Benjamin Otte (Company) 2004-06-07 13:00:08 UTC
xine includes taken from from 
http://cvs.sourceforge.net/viewcvs.py/*checkout*/xine/xine-lib/src/audio_out/audio_oss_out.c?content-type=text%2Fplain&rev=1.109

#if defined(__OpenBSD__)
# include <soundcard.h>
#elif defined (__FreeBSD__)
#  if __FreeBSD__ < 4
#   include <machine/soundcard.h>
#  else
#   include <sys/soundcard.h>
#  endif
#else
# include <sys/soundcard.h>
#endif


libao (Xiph's audioout lib) taken from
http://svn.xiph.org/trunk/ao/src/plugins/oss/ao_oss.c

#if defined(__OpenBSD__) || defined(__NetBSD__)
#include <soundcard.h>
#else
#include <sys/soundcard.h>
#endif


esound taken from
http://cvs.gnome.org/viewcvs/esound/configure.in?rev=1.94&view=auto

in configure.in uses AC_CHECK_HEADERS(soundcard.h sys/soundcard.h
machine/soundcard.h) and ifdefs based on that.


mplayer taken from
http://www1.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/configure?rev=1.866&content-type=text/x-cvsweb-markup
(muhahaha)
does basically the same as esound. It only checks for sys/soundcard.h and
soundcard.h though.


Based on that my suggestion would be to copy from esound.
Comment 2 Stephane Loeuillet 2004-06-07 13:30:05 UTC
Created attachment 28423 [details] [review]
look for soundcard.h in 3 different dirs for BSD portability

could someone verify the arts section ? (as it includes sys/soundcard.h without
any check on OSS presence)
Comment 3 Stephane Loeuillet 2004-06-07 13:41:11 UTC
commited

i let it open for feedback from BSD people
Comment 4 Ronald Bultje 2004-06-07 13:58:34 UTC
Not needed, they'll reopen when there's a new bug. ;).