From 4b228f5f7fc37465c6347375a7aa37a72fdfb2d2 Mon Sep 17 00:00:00 2001 From: fengalin Date: Tue, 10 Oct 2017 16:37:56 +0200 Subject: [PATCH] gtsreamer-base: Fix version for gst_flow_combiner_ref/unref gst_flow_combiner_ref/unref were introduced in gstreamer-1.12.1 but they inherit the `since version` declared for `GstFlowCombiner` which is 1.4. Fixes https://github.com/sdroege/gstreamer-sys/pull/5 --- gir-files/GstBase-1.0.gir | 6 ++++-- gstreamer-base-sys/Cargo.toml | 1 + gstreamer-base-sys/build.rs | 4 +++- gstreamer-base-sys/src/lib.rs | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gir-files/GstBase-1.0.gir b/gir-files/GstBase-1.0.gir index 50824ab31..bbaa80078 100644 --- a/gir-files/GstBase-1.0.gir +++ b/gir-files/GstBase-1.0.gir @@ -10221,7 +10221,8 @@ returned immediatelly from the gst_flow_combiner_update_flow() function. - + @@ -10263,7 +10264,8 @@ returned immediatelly from the gst_flow_combiner_update_flow() function. - + diff --git a/gstreamer-base-sys/Cargo.toml b/gstreamer-base-sys/Cargo.toml index b0266f2f9..d6ee767a9 100644 --- a/gstreamer-base-sys/Cargo.toml +++ b/gstreamer-base-sys/Cargo.toml @@ -18,6 +18,7 @@ v1_6 = ["v1_4"] v1_8 = ["v1_6"] v1_10 = ["v1_8"] v1_12 = ["v1_10"] +v1_12_1 = ["v1_12"] dox = [] [lib] diff --git a/gstreamer-base-sys/build.rs b/gstreamer-base-sys/build.rs index d6ddbd72a..af32d8619 100644 --- a/gstreamer-base-sys/build.rs +++ b/gstreamer-base-sys/build.rs @@ -16,7 +16,9 @@ fn main() { fn find() -> Result<(), Error> { let package_name = "gstreamer-base-1.0"; let shared_libs = ["gstbase-1.0"]; - let version = if cfg!(feature = "v1_12") { + let version = if cfg!(feature = "v1_12_1") { + "1.12.1" + } else if cfg!(feature = "v1_12") { "1.12" } else if cfg!(feature = "v1_10") { "1.10" diff --git a/gstreamer-base-sys/src/lib.rs b/gstreamer-base-sys/src/lib.rs index ead788fdc..c049f3ca9 100644 --- a/gstreamer-base-sys/src/lib.rs +++ b/gstreamer-base-sys/src/lib.rs @@ -564,13 +564,13 @@ extern "C" { pub fn gst_flow_combiner_clear(combiner: *mut GstFlowCombiner); #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_flow_combiner_free(combiner: *mut GstFlowCombiner); - #[cfg(any(feature = "v1_4", feature = "dox"))] + #[cfg(any(feature = "v1_12_1", feature = "dox"))] pub fn gst_flow_combiner_ref(combiner: *mut GstFlowCombiner) -> *mut GstFlowCombiner; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_flow_combiner_remove_pad(combiner: *mut GstFlowCombiner, pad: *mut gst::GstPad); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_flow_combiner_reset(combiner: *mut GstFlowCombiner); - #[cfg(any(feature = "v1_4", feature = "dox"))] + #[cfg(any(feature = "v1_12_1", feature = "dox"))] pub fn gst_flow_combiner_unref(combiner: *mut GstFlowCombiner); #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_flow_combiner_update_flow(combiner: *mut GstFlowCombiner, fret: gst::GstFlowReturn) -> gst::GstFlowReturn;