From 44130794f18c61d10e22e5bc3f4a366ea7fb293a Mon Sep 17 00:00:00 2001 From: fengalin Date: Tue, 10 Oct 2017 17:52:54 +0200 Subject: [PATCH] gstreamer-base: use g_boxed_copy/free for GstFlowCombiner This avoids depending on gst_flow_combiner_ref/unref which were introduced in gstreamer-1.12.1. Fixes https://github.com/sdroege/gstreamer-rs/pull/40 --- Gir_GstBase.toml | 2 +- gir-files/GstBase-1.0.gir | 6 ++++-- gstreamer-base/src/auto/mod.rs | 3 --- gstreamer-base/src/{auto => }/flow_combiner.rs | 17 +++++++++++++---- 4 files changed, 18 insertions(+), 10 deletions(-) rename gstreamer-base/src/{auto => }/flow_combiner.rs (71%) diff --git a/Gir_GstBase.toml b/Gir_GstBase.toml index c8430b85b..f072f6932 100644 --- a/Gir_GstBase.toml +++ b/Gir_GstBase.toml @@ -67,7 +67,7 @@ concurrency = "none" [[object]] name = "GstBase.FlowCombiner" -status = "generate" +status = "manual" trait = false concurrency = "none" 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/src/auto/mod.rs b/gstreamer-base/src/auto/mod.rs index 82153a8fb..e7c7e545c 100644 --- a/gstreamer-base/src/auto/mod.rs +++ b/gstreamer-base/src/auto/mod.rs @@ -19,9 +19,6 @@ pub use self::base_transform::BaseTransformExt; mod push_src; pub use self::push_src::PushSrc; -mod flow_combiner; -pub use self::flow_combiner::FlowCombiner; - #[doc(hidden)] pub mod traits { pub use super::BaseSinkExt; diff --git a/gstreamer-base/src/auto/flow_combiner.rs b/gstreamer-base/src/flow_combiner.rs similarity index 71% rename from gstreamer-base/src/auto/flow_combiner.rs rename to gstreamer-base/src/flow_combiner.rs index 6db0211d5..118bfbb0c 100644 --- a/gstreamer-base/src/auto/flow_combiner.rs +++ b/gstreamer-base/src/flow_combiner.rs @@ -1,5 +1,10 @@ -// This file was generated by gir (0fe730d) from gir-files (???) -// DO NOT EDIT +// Copyright (C) 2017 Sebastian Dröge +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. use ffi; use glib::object::IsA; @@ -14,8 +19,12 @@ glib_wrapper! { pub struct FlowCombiner(Shared); match fn { - ref => |ptr| ffi::gst_flow_combiner_ref(ptr), - unref => |ptr| ffi::gst_flow_combiner_unref(ptr), + ref => |ptr| { + gobject_ffi::g_boxed_copy(ffi::gst_flow_combiner_get_type(), ptr as *mut _) as *mut ffi::GstFlowCombiner + }, + unref => |ptr| { + gobject_ffi::g_boxed_free(ffi::gst_flow_combiner_get_type(), ptr as *mut _) + }, get_type => || ffi::gst_flow_combiner_get_type(), } }