meson: Detect unrelease gstreamer version number

If the minor version is odd, it means we are depending on gstreamer main and
should therefore enable the features of the (upcoming) even minor version

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1941>
This commit is contained in:
Edward Hervey 2024-11-27 15:49:55 +01:00
parent e5f3ab4053
commit 6b58c2173c

View file

@ -66,6 +66,8 @@ class CargoAnalyzer:
wanted_features = set() wanted_features = set()
gst_version_major = int(self.gst_version.split('.')[0]) gst_version_major = int(self.gst_version.split('.')[0])
gst_version_minor = int(self.gst_version.split('.')[1]) gst_version_minor = int(self.gst_version.split('.')[1])
if gst_version_minor % 2:
gst_version_minor += 1
for (name, value) in features.items(): for (name, value) in features.items():
version = self.extract_version(name) version = self.extract_version(name)