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
This commit is contained in:
fengalin 2017-10-10 17:52:54 +02:00 committed by Sebastian Dröge
parent f253caac19
commit 44130794f1
4 changed files with 18 additions and 10 deletions

View file

@ -67,7 +67,7 @@ concurrency = "none"
[[object]] [[object]]
name = "GstBase.FlowCombiner" name = "GstBase.FlowCombiner"
status = "generate" status = "manual"
trait = false trait = false
concurrency = "none" concurrency = "none"

View file

@ -10221,7 +10221,8 @@ returned immediatelly from the gst_flow_combiner_update_flow() function.</doc>
</instance-parameter> </instance-parameter>
</parameters> </parameters>
</method> </method>
<method name="ref" c:identifier="gst_flow_combiner_ref"> <method name="ref" c:identifier="gst_flow_combiner_ref"
version="1.12.1">
<return-value transfer-ownership="full"> <return-value transfer-ownership="full">
<type name="FlowCombiner" c:type="GstFlowCombiner*"/> <type name="FlowCombiner" c:type="GstFlowCombiner*"/>
</return-value> </return-value>
@ -10263,7 +10264,8 @@ returned immediatelly from the gst_flow_combiner_update_flow() function.</doc>
</instance-parameter> </instance-parameter>
</parameters> </parameters>
</method> </method>
<method name="unref" c:identifier="gst_flow_combiner_unref"> <method name="unref" c:identifier="gst_flow_combiner_unref"
version="1.12.1">
<return-value transfer-ownership="none"> <return-value transfer-ownership="none">
<type name="none" c:type="void"/> <type name="none" c:type="void"/>
</return-value> </return-value>

View file

@ -19,9 +19,6 @@ pub use self::base_transform::BaseTransformExt;
mod push_src; mod push_src;
pub use self::push_src::PushSrc; pub use self::push_src::PushSrc;
mod flow_combiner;
pub use self::flow_combiner::FlowCombiner;
#[doc(hidden)] #[doc(hidden)]
pub mod traits { pub mod traits {
pub use super::BaseSinkExt; pub use super::BaseSinkExt;

View file

@ -1,5 +1,10 @@
// This file was generated by gir (0fe730d) from gir-files (???) // Copyright (C) 2017 Sebastian Dröge <sebastian@centricular.com>
// DO NOT EDIT //
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ffi; use ffi;
use glib::object::IsA; use glib::object::IsA;
@ -14,8 +19,12 @@ glib_wrapper! {
pub struct FlowCombiner(Shared<ffi::GstFlowCombiner>); pub struct FlowCombiner(Shared<ffi::GstFlowCombiner>);
match fn { match fn {
ref => |ptr| ffi::gst_flow_combiner_ref(ptr), ref => |ptr| {
unref => |ptr| ffi::gst_flow_combiner_unref(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(), get_type => || ffi::gst_flow_combiner_get_type(),
} }
} }