2018-08-17 13:26:54 +00:00
|
|
|
osxaudio_sources = [
|
|
|
|
'gstosxaudioringbuffer.c',
|
|
|
|
'gstosxaudioelement.c',
|
|
|
|
'gstosxaudiosink.c',
|
|
|
|
'gstosxaudiosrc.c',
|
|
|
|
'gstosxcoreaudiocommon.c',
|
|
|
|
'gstosxcoreaudio.c',
|
2024-02-26 13:57:32 +00:00
|
|
|
'gstosxaudio.c',
|
|
|
|
'gstatdec.c',
|
2024-02-28 18:25:52 +00:00
|
|
|
'gstatenc.c',
|
2018-08-17 13:26:54 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
have_osxaudio = false
|
|
|
|
osxaudio_option = get_option('osxaudio')
|
|
|
|
if osxaudio_option.disabled() or not ['darwin', 'ios'].contains(host_system)
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
if host_system == 'darwin'
|
|
|
|
# TODO: https://github.com/mesonbuild/meson/issues/3940
|
|
|
|
have_osxaudio = cc.has_header('CoreAudio/CoreAudio.h')
|
|
|
|
osxaudio_sources += ['gstosxaudiodeviceprovider.c']
|
|
|
|
elif host_system == 'ios'
|
|
|
|
have_osxaudio = cc.has_header('CoreAudio/CoreAudioTypes.h')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not have_osxaudio and osxaudio_option.enabled()
|
|
|
|
error('osxaudio plugin was enabled but CoreAudio headers not found')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if have_osxaudio
|
2019-07-15 05:46:56 +00:00
|
|
|
modules = ['CoreAudio', 'AudioToolbox']
|
2018-08-17 13:26:54 +00:00
|
|
|
if host_system == 'darwin'
|
2018-09-01 04:00:23 +00:00
|
|
|
modules += ['AudioUnit', 'CoreServices']
|
2018-08-17 13:26:54 +00:00
|
|
|
endif
|
2018-09-01 04:00:23 +00:00
|
|
|
osxaudio_dep = dependency('appleframeworks', modules : modules)
|
2018-08-17 13:26:54 +00:00
|
|
|
|
|
|
|
gstosxaudio = library('gstosxaudio',
|
|
|
|
osxaudio_sources,
|
|
|
|
c_args : gst_plugins_good_args,
|
|
|
|
include_directories : [configinc, libsinc],
|
2024-02-28 18:25:52 +00:00
|
|
|
dependencies : [gstaudio_dep, gstpbutils_dep, osxaudio_dep],
|
2018-08-17 13:26:54 +00:00
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir)
|
2019-05-29 09:58:40 +00:00
|
|
|
plugins += [gstosxaudio]
|
2018-08-17 13:26:54 +00:00
|
|
|
endif
|