meson: Add RTP options that are also present in the CMakeLists.txt

This commit is contained in:
hrxi 2023-09-30 03:05:11 +02:00 committed by fiaxh
parent bfc1962f70
commit a55a10e88f
3 changed files with 31 additions and 8 deletions

View file

@ -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()

View file

@ -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')

View file

@ -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('.'))