2017-06-23 18:23:52 +00:00
|
|
|
oss_header_locations = [
|
|
|
|
# Linux and newer BSD versions
|
|
|
|
['sys/soundcard.h', 'HAVE_OSS_INCLUDE_IN_SYS', 'OSS includes are in sys/'],
|
|
|
|
# Some old BSD versions and also newer OpenBSD versions
|
|
|
|
['soundcard.h', 'HAVE_OSS_INCLUDE_IN_ROOT', 'OSS includes are in root'],
|
|
|
|
# Some old BSD versions
|
|
|
|
['machine/soundcard.h', 'HAVE_OSS_INCLUDE_IN_MACHINE', 'OSS includes are in machine/'],
|
|
|
|
]
|
|
|
|
|
|
|
|
have_oss = false
|
2018-07-25 02:05:28 +00:00
|
|
|
oss_option = get_option('oss')
|
|
|
|
if not oss_option.disabled()
|
|
|
|
foreach hdr : oss_header_locations
|
|
|
|
if not have_oss
|
|
|
|
if cc.has_header(hdr[0])
|
|
|
|
cdata.set(hdr[1], 1, description: hdr[2])
|
|
|
|
have_oss = true
|
|
|
|
endif
|
2017-06-23 18:23:52 +00:00
|
|
|
endif
|
2018-07-25 02:05:28 +00:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
if not have_oss and oss_option.enabled()
|
|
|
|
error('OSS plugin was enabled but soundcard.h was not found')
|
2017-06-23 18:23:52 +00:00
|
|
|
endif
|
2018-07-25 02:05:28 +00:00
|
|
|
endif
|
2017-06-23 18:23:52 +00:00
|
|
|
|
|
|
|
if have_oss
|
2018-10-22 09:39:55 +00:00
|
|
|
plugins += [library('gstossaudio',
|
2023-05-25 18:39:03 +00:00
|
|
|
'gstossaudio.c', 'gstossaudioelement.c', 'gstossdeviceprovider.c', 'gstosshelper.c', 'gstosssink.c', 'gstosssrc.c',
|
2017-06-23 18:23:52 +00:00
|
|
|
c_args : gst_plugins_good_args,
|
|
|
|
include_directories : [configinc, libsinc],
|
|
|
|
dependencies : [gstaudio_dep, gstbase_dep],
|
|
|
|
install : true,
|
2018-10-22 09:39:55 +00:00
|
|
|
install_dir : plugins_install_dir)]
|
2017-06-23 18:23:52 +00:00
|
|
|
endif
|