mirror of
https://github.com/pulseaudio/pulseaudio.git
synced 2024-11-23 09:53:32 +08:00
meson: Enable echo-cancel module, add libwebrtc_util lib, add speex and webrtc dependencies
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
This commit is contained in:
parent
31fd820702
commit
88d77ff852
10
meson.build
10
meson.build
@ -279,11 +279,21 @@ if sbc_dep.found() and dbus_dep.found()
|
||||
cdata.set('HAVE_BLUEZ_5', 1)
|
||||
endif
|
||||
|
||||
speex_dep = dependency('speexdsp', version : '>= 1.2', required : false)
|
||||
if speex_dep.found()
|
||||
cdata.set('HAVE_SPEEX', 1)
|
||||
endif
|
||||
|
||||
udev_dep = dependency('libudev', version : '>= 143', required : false)
|
||||
if udev_dep.found()
|
||||
cdata.set('HAVE_UDEV', 1)
|
||||
endif
|
||||
|
||||
webrtc_dep = dependency('webrtc-audio-processing', version : '>= 0.2', required : false)
|
||||
if webrtc_dep.found()
|
||||
cdata.set('HAVE_WEBRTC', 1)
|
||||
endif
|
||||
|
||||
# Now generate config.h from everything above
|
||||
configure_file(output : 'config.h', configuration : cdata)
|
||||
|
||||
|
18
src/modules/echo-cancel/meson.build
Normal file
18
src/modules/echo-cancel/meson.build
Normal file
@ -0,0 +1,18 @@
|
||||
# The webrtc code is split off into a helper library to avoid having automake
|
||||
# link module-echo-cancel with C++ (which it does if there are any C++ deps,
|
||||
# even conditional ones).
|
||||
|
||||
# Defining this library as shared fails, as it actually requires a symbol
|
||||
# from module-echo-cancel.c. Setting it to static solves that.
|
||||
|
||||
libwebrtc_util_sources = [
|
||||
'webrtc.cc'
|
||||
]
|
||||
|
||||
libwebrtc_util = static_library('libwebrtc_util',
|
||||
libwebrtc_util_sources,
|
||||
cpp_args : [pa_c_args, server_c_args],
|
||||
include_directories : [configinc, topinc],
|
||||
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, webrtc_dep],
|
||||
install : true
|
||||
)
|
@ -22,7 +22,6 @@ all_modules = [
|
||||
[ 'module-detect', 'module-detect.c' ],
|
||||
[ 'module-device-manager', 'module-device-manager.c', [], [], [], libprotocol_native ],
|
||||
[ 'module-device-restore', 'module-device-restore.c', [], [], [dbus_dep], libprotocol_native ],
|
||||
# [ 'module-echo-cancel', 'module-echo-cancel.c' ],
|
||||
[ 'module-esound-compat-spawnfd', 'module-esound-compat-spawnfd.c' ],
|
||||
[ 'module-esound-compat-spawnpid', 'module-esound-compat-spawnpid.c' ],
|
||||
# [ 'module-esound-protocol-tcp', 'module-protocol-stub.c' ],
|
||||
@ -197,6 +196,53 @@ if x11_dep.found()
|
||||
endif
|
||||
endif
|
||||
|
||||
# Module echo-cancel is quite modular itself and requires a section of its own
|
||||
|
||||
module_echo_cancel_sources = [
|
||||
'echo-cancel/echo-cancel.h',
|
||||
'echo-cancel/module-echo-cancel.c',
|
||||
'echo-cancel/null.c',
|
||||
]
|
||||
module_echo_cancel_flags = []
|
||||
module_echo_cancel_deps = []
|
||||
module_echo_cancel_libs = []
|
||||
|
||||
# FIXME: Adrian support should be optional
|
||||
module_echo_cancel_sources += [
|
||||
'echo-cancel/adrian.c', 'echo-cancel/adrian.h',
|
||||
'echo-cancel/adrian-aec.c', 'echo-cancel/adrian-aec.h',
|
||||
]
|
||||
module_echo_cancel_flags += ['-DHAVE_ADRIAN_EC=1']
|
||||
|
||||
# FIXME: support ORC (depends on Adrian)
|
||||
#ORC_SOURCE += modules/echo-cancel/adrian-aec
|
||||
#module_echo_cancel_sources += [
|
||||
# 'echo-cancel/adrian-aec-orc-gen.c', 'echo-cancel/adrian-aec-orc-gen.h'
|
||||
#]
|
||||
#module_echo_cancel_deps += [orc_dep]
|
||||
|
||||
if speex_dep.found()
|
||||
module_echo_cancel_sources += ['echo-cancel/speex.c']
|
||||
module_echo_cancel_deps += [speex_dep]
|
||||
endif
|
||||
|
||||
if webrtc_dep.found()
|
||||
subdir('echo-cancel')
|
||||
module_echo_cancel_libs += [libwebrtc_util]
|
||||
endif
|
||||
|
||||
all_modules += [
|
||||
[ 'module-echo-cancel',
|
||||
module_echo_cancel_sources,
|
||||
[],
|
||||
module_echo_cancel_flags,
|
||||
module_echo_cancel_deps,
|
||||
module_echo_cancel_libs,
|
||||
]
|
||||
]
|
||||
|
||||
# Generate a shared module object for each modules
|
||||
|
||||
foreach m : all_modules
|
||||
name = m[0]
|
||||
sources = m[1]
|
||||
|
@ -126,6 +126,10 @@ if dbus_dep.found()
|
||||
]
|
||||
endif
|
||||
|
||||
if speex_dep.found()
|
||||
libpulsecore_sources += ['resampler/speex.c']
|
||||
endif
|
||||
|
||||
if x11_dep.found()
|
||||
libpulsecore_sources += ['x11wrap.c']
|
||||
libpulsecore_headers += ['x11wrap.h']
|
||||
@ -159,7 +163,7 @@ libpulsecore = shared_library('pulsecore-' + pa_version_major_minor,
|
||||
c_args : [pa_c_args, server_c_args],
|
||||
install : true,
|
||||
link_with : libpulsecore_simd_lib,
|
||||
dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, x11_dep],
|
||||
dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, speex_dep, x11_dep],
|
||||
implicit_include_directories : false)
|
||||
|
||||
libpulsecore_dep = declare_dependency(link_with: libpulsecore)
|
||||
|
Loading…
Reference in New Issue
Block a user