diff options
| author | Marvin W <git@larma.de> | 2025-01-26 12:02:49 +0100 |
|---|---|---|
| committer | Marvin W <git@larma.de> | 2025-02-22 21:06:26 +0100 |
| commit | 1c365daa14e0e11bb4931b0c7891a781c5fc7084 (patch) | |
| tree | 0e045a92a5466be5509b7d9312d53a811c246f5f /plugins/rtp/meson.build | |
| parent | f796286650e4ad862b147e484d528ca56cf5e0e6 (diff) | |
Voice processor: add support for webrtc-audio-processing 1.x and 2.x
Diffstat (limited to 'plugins/rtp/meson.build')
| -rw-r--r-- | plugins/rtp/meson.build | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/rtp/meson.build b/plugins/rtp/meson.build index a2bae51b..c70a414b 100644 --- a/plugins/rtp/meson.build +++ b/plugins/rtp/meson.build @@ -28,7 +28,7 @@ c_args = [ '-DG_LOG_DOMAIN="rtp"', ] vala_args = [] -if dep_webrtc_audio_processing.found() +if dep_webrtc_audio_processing.found() and get_option('plugin-rtp-webrtc-audio-processing').allowed() voice_dependencies = [ dep_gstreamer_audio, dep_webrtc_audio_processing, @@ -36,13 +36,23 @@ if dep_webrtc_audio_processing.found() voice_sources = files( 'src/voice_processor_native.cpp', ) - lib_rtp_voice_processor = static_library('rtp-voice-processor', voice_sources, c_args: c_args, dependencies: voice_dependencies, install: false) + voice_c_args = c_args + if dep_webrtc_audio_processing.version().version_compare('>=2.0') + voice_c_args += ['-DWEBRTC2'] + elif dep_webrtc_audio_processing.version().version_compare('>=1.0') + voice_c_args += ['-DWEBRTC1'] + else + voice_c_args += ['-DWEBRTC0'] + endif + lib_rtp_voice_processor = static_library('rtp-voice-processor', voice_sources, c_args: voice_c_args, cpp_args: voice_c_args, dependencies: voice_dependencies, install: false) dep_rtp_voice_processor = declare_dependency(link_with: lib_rtp_voice_processor) vala_args += ['-D', 'WITH_VOICE_PROCESSOR'] dependencies += [dep_rtp_voice_processor] sources += files( 'src/voice_processor.vala', ) +elif get_option('plugin-rtp-webrtc-audio-processing').enabled() + error('No compatible webrtc-audio-processing found, but plugin-rtp-webrtc-audio-processing option set.') endif if dep_gstreamer_rtp.version() == 'unknown' or dep_gstreamer_rtp.version().version_compare('>=1.16') vala_args += ['-D', 'GST_1_16'] |
