From 84b0dd89802255299670b90e7e2a2a114a418bad Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 18 Oct 2023 14:33:22 +0530 Subject: [PATCH] meson: Enable the RTP option when WebRTC is enabled And make the webrtc option yielding, see: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5505 Part-of: --- meson.build | 9 ++++++--- meson_options.txt | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 162da11d..b2509fa4 100644 --- a/meson.build +++ b/meson.build @@ -65,11 +65,14 @@ deps = [ ['gstreamer-video-1.0', 'gst-plugins-base', 'video_dep', 'gstvideo'] ] +webrtc_option = get_option('webrtc') +rtp_option = get_option('rtp').enable_if(webrtc_option.enabled(), error_message: 'webrtc option is enabled') + if get_option('threadshare').allowed() \ or get_option('onvif').allowed() \ or get_option('raptorq').allowed() \ - or get_option('rtp').allowed() \ - or get_option('webrtc').allowed() + or rtp_option.allowed() \ + or webrtc_option.allowed() deps += [['gstreamer-rtp-1.0', 'gst-plugins-base', 'rtp_dep', 'gst_rtp']] endif if get_option('webrtc').allowed() \ @@ -351,7 +354,7 @@ if get_option('default_library') == 'static' endif foreach plugin_name, details: plugins - plugin_opt = get_option(plugin_name) + plugin_opt = get_variable(f'@plugin_name@_option', get_option(plugin_name)) if plugin_opt.allowed() plugin_deps_found = true foreach dep_name, dep_ver: details.get('extra-deps', {}) diff --git a/meson_options.txt b/meson_options.txt index fbe8034d..af24970f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -29,7 +29,7 @@ option('onvif', type: 'feature', value: 'auto', description: 'Build onvif plugin option('raptorq', type: 'feature', value: 'auto', description: 'Build raptorq plugin') option('reqwest', type: 'feature', value: 'auto', description: 'Build reqwest plugin') option('rtp', type: 'feature', value: 'auto', description: 'Build rtp plugin') -option('webrtc', type: 'feature', value: 'auto', description: 'Build webrtc plugin') +option('webrtc', type: 'feature', value: 'auto', yield: true, description: 'Build webrtc plugin') option('webrtchttp', type: 'feature', value: 'auto', description: 'Build webrtchttp plugin') # text