aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build2
-rw-r--r--meson_options.txt6
-rw-r--r--plugins/rtp/meson.build31
3 files changed, 31 insertions, 8 deletions
diff --git a/meson.build b/meson.build
index 3276158f..4ad18477 100644
--- a/meson.build
+++ b/meson.build
@@ -52,7 +52,7 @@ dep_libsoup = dependency('libsoup-3.0', disabler: true, required: get_option('pl
dep_nice = dependency('nice', version: '>=0.1.15', disabler: true, required: get_option('plugin-ice'))
dep_m = meson.get_compiler('c').find_library('m', required: false)
dep_sqlite3 = dependency('sqlite3', version: '>=3.24')
-dep_webrtc_audio_processing = dependency('webrtc-audio-processing', version: ['>=0.2', '<0.4'], disabler: true, required: get_option('plugin-rtp'))
+dep_webrtc_audio_processing = dependency('webrtc-audio-processing', version: ['>=0.2', '<0.4'], required: get_option('plugin-rtp-webrtc-audio-processing'))
prog_git = find_program('git', required: false)
prog_python = python.find_installation()
diff --git a/meson_options.txt b/meson_options.txt
index ee0ac3c0..caee3093 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,3 +6,9 @@ option('plugin-notification-sound', type: 'feature', description: 'Sound for cha
option('plugin-omemo', type: 'feature', description: 'End-to-end encryption')
option('plugin-openpgp', type: 'feature', description: 'End-to-end encryption using PGP')
option('plugin-rtp', type: 'feature', description: 'Voice/video calls')
+
+option('plugin-rtp-h264', type: 'feature', value: 'disabled', description: 'H264 codec')
+option('plugin-rtp-msdk', type: 'feature', value: 'disabled', description: 'Intel MediaSDK')
+option('plugin-rtp-vaapi', type: 'feature', value: 'disabled', description: 'Video Acceleration API')
+option('plugin-rtp-vp9', type: 'feature', value: 'disabled', description: 'VP9 codec')
+option('plugin-rtp-webrtc-audio-processing', type: 'feature', description: 'Voice preprocessing')
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('.'))