ladspa: Make RDF parsing truely optional
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Sun, 10 Dec 2023 03:26:59 +0000 (04:26 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 12 Dec 2023 17:36:50 +0000 (17:36 +0000)
If the ladspa plugin is enabled explicitly or via auto-features, the
liblrdf dependency can not be disabled.

As the RDF parsing currently provides hardly any features, the possibility
to disable it fairly useful.

Fixes: #3168
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5802>

subprojects/gst-plugins-bad/ext/ladspa/meson.build
subprojects/gst-plugins-bad/meson_options.txt

index afc477b..946ef9b 100644 (file)
@@ -12,18 +12,17 @@ if get_option('ladspa').disabled()
   subdir_done()
 endif
 
-# This is an optional dep, but we make it optional only in auto mode
-lrdf_dep = dependency('lrdf', required : get_option('ladspa'))
-if lrdf_dep.found()
-  ladspa_cargs = ['-DHAVE_LRDF']
-endif
-
 have_ladspa_h = cc.has_header('ladspa.h')
 if not have_ladspa_h and get_option('ladspa').enabled()
   error('ladspa plugin is enabled but ladspa.h not found')
 endif
 
 if have_ladspa_h
+  lrdf_dep = dependency('lrdf', required : get_option('ladspa-rdf'))
+  if lrdf_dep.found()
+    ladspa_cargs = ['-DHAVE_LRDF']
+  endif
+
   gstladspa = library('gstladspa',
     ladspa_sources,
     c_args : gst_plugins_bad_args + ladspa_cargs,
index 55f8e9e..6c8855a 100644 (file)
@@ -121,6 +121,7 @@ option('iqa', type : 'feature', value : 'auto', description : 'Image quality ass
 option('kate', type : 'feature', value : 'auto', description : 'Kate subtitle parser, tagger, and codec plugin')
 option('kms', type : 'feature', value : 'auto', description : 'KMS video sink plugin')
 option('ladspa', type : 'feature', value : 'auto', description : 'LADSPA plugin bridge')
+option('ladspa-rdf', type : 'feature', value : 'auto', description : 'LADSPA plugin bridge RDF support')
 option('ldac', type : 'feature', value : 'auto', description : 'LDAC bluetooth audio codec plugin')
 option('libde265', type : 'feature', value : 'auto', description : 'HEVC/H.265 video decoder plugin')
 option('openaptx', type : 'feature', value : 'auto', description : 'Open Source implementation of Audio Processing Technology codec (aptX) plugin')