From a55a10e88f88a4650aa6a83927ea38960aa26935 Mon Sep 17 00:00:00 2001 From: hrxi Date: Sat, 30 Sep 2023 03:05:11 +0200 Subject: meson: Add RTP options that are also present in the CMakeLists.txt --- plugins/rtp/meson.build | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'plugins') diff --git a/plugins/rtp/meson.build b/plugins/rtp/meson.build index d4d37e36..8a72dc41 100644 --- a/plugins/rtp/meson.build +++ b/plugins/rtp/meson.build @@ -1,18 +1,18 @@ dependencies = [ + dep_crypto_vala, + dep_dino, dep_gee, dep_glib, dep_gmodule, dep_gnutls, - dep_gtk4, dep_gstreamer, dep_gstreamer_app, dep_gstreamer_audio, dep_gstreamer_rtp, dep_gstreamer_video, - dep_crypto_vala, - dep_dino, + dep_gtk4, + dep_m, dep_qlite, - dep_webrtc_audio_processing, dep_xmpp_vala, ] sources = files( @@ -24,18 +24,35 @@ sources = files( 'src/register_plugin.vala', 'src/stream.vala', 'src/video_widget.vala', - 'src/voice_processor.vala', - 'src/voice_processor_native.cpp', ) c_args = [ '-DGST_1_16', '-DGST_1_18', '-DGST_1_20', - '-DWITH_VOICE_PROCESSOR', '-DG_LOG_DOMAIN="rtp"', ] vala_args = [ '--vapidir', meson.current_source_dir() / 'vapi', ] +if dep_webrtc_audio_processing.found() + dependencies += [dep_webrtc_audio_processing] + sources += files( + 'src/voice_processor.vala', + 'src/voice_processor_native.cpp', + ) + vala_args += ['-D', 'WITH_VOICE_PROCESSOR'] +endif +if get_option('plugin-rtp-h264').allowed() + vala_args += ['-D', 'ENABLE_H264'] +endif +if get_option('plugin-rtp-msdk').allowed() + vala_args += ['-D', 'ENABLE_MSDK'] +endif +if get_option('plugin-rtp-vaapi').allowed() + vala_args += ['-D', 'ENABLE_VAAPI'] +endif +if get_option('plugin-rtp-vp9').allowed() + vala_args += ['-D', 'ENABLE_VP9'] +endif lib_rtp = shared_library('rtp', sources, name_prefix: '', c_args: c_args, vala_args: vala_args, include_directories: include_directories('src'), dependencies: dependencies, install: true, install_dir: get_option('libdir') / 'dino/plugins') dep_rtp = declare_dependency(link_with: lib_rtp, include_directories: include_directories('.')) -- cgit v1.2.3-70-g09d2