From c69ff617f5f0e76cf778233065058f3dddb3987c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 12 Nov 2022 16:47:59 +0200 Subject: [PATCH] ges: Don't generate version constants in the -sys crate They will change with every new version and make the tests fail if running against a different version. See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/422 Part-of: --- gstreamer-editing-services/sys/Gir.toml | 7 +++++++ gstreamer-editing-services/sys/src/lib.rs | 4 ---- gstreamer-editing-services/sys/tests/abi.rs | 4 ---- gstreamer-editing-services/sys/tests/constant.c | 4 ---- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/gstreamer-editing-services/sys/Gir.toml b/gstreamer-editing-services/sys/Gir.toml index ae7a0056d..3cfb370ee 100644 --- a/gstreamer-editing-services/sys/Gir.toml +++ b/gstreamer-editing-services/sys/Gir.toml @@ -18,6 +18,13 @@ external_libraries = [ "Gio", ] +ignore = [ + "GES.VERSION_MAJOR", + "GES.VERSION_MINOR", + "GES.VERSION_MICRO", + "GES.VERSION_NANO", +] + [external_libraries] gstreamer="Gst" gstreamer_pbutils="GstPbutils" diff --git a/gstreamer-editing-services/sys/src/lib.rs b/gstreamer-editing-services/sys/src/lib.rs index c1d61051a..751421219 100644 --- a/gstreamer-editing-services/sys/src/lib.rs +++ b/gstreamer-editing-services/sys/src/lib.rs @@ -191,10 +191,6 @@ pub const GES_MULTI_FILE_URI_PREFIX: *const c_char = pub const GES_PADDING: c_int = 4; pub const GES_PADDING_LARGE: c_int = 20; pub const GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY: u32 = 4294967295; -pub const GES_VERSION_MAJOR: c_int = 1; -pub const GES_VERSION_MICRO: c_int = 2; -pub const GES_VERSION_MINOR: c_int = 21; -pub const GES_VERSION_NANO: c_int = 1; // Flags pub type GESMarkerFlags = c_uint; diff --git a/gstreamer-editing-services/sys/tests/abi.rs b/gstreamer-editing-services/sys/tests/abi.rs index 928a18525..d1b257ddf 100644 --- a/gstreamer-editing-services/sys/tests/abi.rs +++ b/gstreamer-editing-services/sys/tests/abi.rs @@ -1125,10 +1125,6 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) GES_TRACK_TYPE_TEXT", "8"), ("(guint) GES_TRACK_TYPE_UNKNOWN", "1"), ("(guint) GES_TRACK_TYPE_VIDEO", "4"), - ("GES_VERSION_MAJOR", "1"), - ("GES_VERSION_MICRO", "2"), - ("GES_VERSION_MINOR", "21"), - ("GES_VERSION_NANO", "1"), ( "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL", "45", diff --git a/gstreamer-editing-services/sys/tests/constant.c b/gstreamer-editing-services/sys/tests/constant.c index 3abcd2b10..eeb599adf 100644 --- a/gstreamer-editing-services/sys/tests/constant.c +++ b/gstreamer-editing-services/sys/tests/constant.c @@ -95,10 +95,6 @@ int main() { PRINT_CONSTANT((guint) GES_TRACK_TYPE_TEXT); PRINT_CONSTANT((guint) GES_TRACK_TYPE_UNKNOWN); PRINT_CONSTANT((guint) GES_TRACK_TYPE_VIDEO); - PRINT_CONSTANT(GES_VERSION_MAJOR); - PRINT_CONSTANT(GES_VERSION_MICRO); - PRINT_CONSTANT(GES_VERSION_MINOR); - PRINT_CONSTANT(GES_VERSION_NANO); PRINT_CONSTANT((gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL); PRINT_CONSTANT((gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL); PRINT_CONSTANT((gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H);