From 5e4d5a3dc6762e415a4ccbeeaac077cd2d8037d0 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 28 Nov 2024 18:55:54 +0530 Subject: [PATCH] meson: Enable crate features based on available gstreamer version We shouldn't only enable the gstreamer features based on the available gstreamer version (such as gst-base/v1_26), but also the plugin features (such as v1_26). This should help with situations like https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/634 Part-of: --- dependencies.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dependencies.py b/dependencies.py index cd6c817a..4d5f43ef 100755 --- a/dependencies.py +++ b/dependencies.py @@ -63,6 +63,7 @@ class CargoAnalyzer: def extract_features(self, cargo_data): features = cargo_data['features'] + print(f'Available features: {features!r}', file=sys.stderr) wanted_features = set() gst_version_major = int(self.gst_version.split('.')[0]) gst_version_minor = int(self.gst_version.split('.')[1]) @@ -77,11 +78,13 @@ class CargoAnalyzer: if gst_version_major < majver or gst_version_minor < minver: continue + wanted_features |= set([name]) wanted_features |= set(value) if name.startswith("gst"): # Required for some reason for rswebrtc which has a specific feature wanted_features |= {f"{cargo_data['package']['name']}/{name}"} + print(f'Enabling features: {wanted_features!r}', file=sys.stderr) return wanted_features def run(self):