2018-04-23 17:34:22 +00:00
|
|
|
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
|
|
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
2017-05-12 12:24:03 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
2017-07-29 14:10:10 +00:00
|
|
|
use ChildProxy;
|
2017-05-12 12:24:03 +00:00
|
|
|
use Element;
|
2017-10-01 13:52:15 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
2017-08-14 19:15:37 +00:00
|
|
|
use ElementFlags;
|
2017-05-12 12:24:03 +00:00
|
|
|
use Object;
|
|
|
|
use Pad;
|
|
|
|
use PadDirection;
|
|
|
|
use glib;
|
2017-11-27 17:16:34 +00:00
|
|
|
use glib::StaticType;
|
2017-05-12 12:24:03 +00:00
|
|
|
use glib::Value;
|
2019-01-16 11:32:39 +00:00
|
|
|
use glib::object::Cast;
|
2017-05-12 12:24:03 +00:00
|
|
|
use glib::object::IsA;
|
2017-09-09 13:01:32 +00:00
|
|
|
use glib::signal::SignalHandlerId;
|
2018-12-08 09:05:20 +00:00
|
|
|
use glib::signal::connect_raw;
|
2017-05-12 12:24:03 +00:00
|
|
|
use glib::translate::*;
|
2019-03-19 07:40:05 +00:00
|
|
|
use glib_sys;
|
|
|
|
use gobject_sys;
|
|
|
|
use gst_sys;
|
2017-05-12 12:24:03 +00:00
|
|
|
use std::boxed::Box as Box_;
|
|
|
|
use std::mem::transmute;
|
|
|
|
|
|
|
|
glib_wrapper! {
|
2019-03-19 07:40:05 +00:00
|
|
|
pub struct Bin(Object<gst_sys::GstBin, gst_sys::GstBinClass, BinClass>) @extends Element, Object, @implements ChildProxy;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
|
|
|
match fn {
|
2019-03-19 07:40:05 +00:00
|
|
|
get_type => || gst_sys::gst_bin_get_type(),
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Bin {
|
2019-03-19 07:40:05 +00:00
|
|
|
pub fn new(name: Option<&str>) -> Bin {
|
2017-07-10 09:36:15 +00:00
|
|
|
assert_initialized_main_thread!();
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
Element::from_glib_none(gst_sys::gst_bin_new(name.to_glib_none().0)).unsafe_cast()
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-06-25 08:04:37 +00:00
|
|
|
unsafe impl Send for Bin {}
|
|
|
|
unsafe impl Sync for Bin {}
|
|
|
|
|
2019-01-16 11:32:39 +00:00
|
|
|
pub const NONE_BIN: Option<&Bin> = None;
|
|
|
|
|
2018-12-08 09:05:20 +00:00
|
|
|
pub trait GstBinExt: 'static {
|
2017-06-24 09:02:24 +00:00
|
|
|
fn add<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError>;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
|
|
|
//fn add_many<P: IsA<Element>>(&self, element_1: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs);
|
|
|
|
|
|
|
|
fn find_unlinked_pad(&self, direction: PadDirection) -> Option<Pad>;
|
|
|
|
|
|
|
|
fn get_by_interface(&self, iface: glib::types::Type) -> Option<Element>;
|
|
|
|
|
|
|
|
fn get_by_name(&self, name: &str) -> Option<Element>;
|
|
|
|
|
|
|
|
fn get_by_name_recurse_up(&self, name: &str) -> Option<Element>;
|
|
|
|
|
2017-10-01 13:52:15 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
2017-08-14 19:15:37 +00:00
|
|
|
fn get_suppressed_flags(&self) -> ElementFlags;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-17 15:41:02 +00:00
|
|
|
//fn iterate_all_by_interface(&self, iface: glib::types::Type) -> /*Ignored*/Option<Iterator>;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-17 15:41:02 +00:00
|
|
|
//fn iterate_elements(&self) -> /*Ignored*/Option<Iterator>;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-17 15:41:02 +00:00
|
|
|
//fn iterate_recurse(&self) -> /*Ignored*/Option<Iterator>;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-17 15:41:02 +00:00
|
|
|
//fn iterate_sinks(&self) -> /*Ignored*/Option<Iterator>;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-17 15:41:02 +00:00
|
|
|
//fn iterate_sorted(&self) -> /*Ignored*/Option<Iterator>;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-17 15:41:02 +00:00
|
|
|
//fn iterate_sources(&self) -> /*Ignored*/Option<Iterator>;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-06-24 09:02:24 +00:00
|
|
|
fn recalculate_latency(&self) -> Result<(), glib::error::BoolError>;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-06-24 09:02:24 +00:00
|
|
|
fn remove<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError>;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
|
|
|
//fn remove_many<P: IsA<Element>>(&self, element_1: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs);
|
|
|
|
|
2017-10-01 13:52:15 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
2017-08-14 19:15:37 +00:00
|
|
|
fn set_suppressed_flags(&self, flags: ElementFlags);
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-06-24 09:02:24 +00:00
|
|
|
fn sync_children_states(&self) -> Result<(), glib::error::BoolError>;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
|
|
|
fn get_property_async_handling(&self) -> bool;
|
|
|
|
|
|
|
|
fn set_property_async_handling(&self, async_handling: bool);
|
|
|
|
|
|
|
|
fn get_property_message_forward(&self) -> bool;
|
|
|
|
|
|
|
|
fn set_property_message_forward(&self, message_forward: bool);
|
|
|
|
|
2017-10-01 13:52:15 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
2017-09-09 13:01:32 +00:00
|
|
|
fn connect_deep_element_added<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-10-01 13:52:15 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
2017-09-09 13:01:32 +00:00
|
|
|
fn connect_deep_element_removed<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-09 13:01:32 +00:00
|
|
|
fn connect_element_added<F: Fn(&Self, &Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-09 13:01:32 +00:00
|
|
|
fn connect_element_removed<F: Fn(&Self, &Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
2017-08-18 13:29:21 +00:00
|
|
|
|
2017-09-09 13:01:32 +00:00
|
|
|
fn connect_property_async_handling_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
2017-08-18 13:29:21 +00:00
|
|
|
|
2017-09-09 13:01:32 +00:00
|
|
|
fn connect_property_message_forward_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 09:05:20 +00:00
|
|
|
impl<O: IsA<Bin>> GstBinExt for O {
|
2017-06-24 09:02:24 +00:00
|
|
|
fn add<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError> {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
glib_result_from_gboolean!(gst_sys::gst_bin_add(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0), "Failed to add element")
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//fn add_many<P: IsA<Element>>(&self, element_1: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
|
2019-03-19 07:40:05 +00:00
|
|
|
// unsafe { TODO: call gst_sys:gst_bin_add_many() }
|
2017-05-12 12:24:03 +00:00
|
|
|
//}
|
|
|
|
|
|
|
|
fn find_unlinked_pad(&self, direction: PadDirection) -> Option<Pad> {
|
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
from_glib_full(gst_sys::gst_bin_find_unlinked_pad(self.as_ref().to_glib_none().0, direction.to_glib()))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_by_interface(&self, iface: glib::types::Type) -> Option<Element> {
|
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
from_glib_full(gst_sys::gst_bin_get_by_interface(self.as_ref().to_glib_none().0, iface.to_glib()))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_by_name(&self, name: &str) -> Option<Element> {
|
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
from_glib_full(gst_sys::gst_bin_get_by_name(self.as_ref().to_glib_none().0, name.to_glib_none().0))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_by_name_recurse_up(&self, name: &str) -> Option<Element> {
|
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
from_glib_full(gst_sys::gst_bin_get_by_name_recurse_up(self.as_ref().to_glib_none().0, name.to_glib_none().0))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-01 13:52:15 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
2017-08-14 19:15:37 +00:00
|
|
|
fn get_suppressed_flags(&self) -> ElementFlags {
|
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
from_glib(gst_sys::gst_bin_get_suppressed_flags(self.as_ref().to_glib_none().0))
|
2017-08-14 19:15:37 +00:00
|
|
|
}
|
|
|
|
}
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-17 15:41:02 +00:00
|
|
|
//fn iterate_all_by_interface(&self, iface: glib::types::Type) -> /*Ignored*/Option<Iterator> {
|
2019-03-19 07:40:05 +00:00
|
|
|
// unsafe { TODO: call gst_sys:gst_bin_iterate_all_by_interface() }
|
2017-09-17 15:41:02 +00:00
|
|
|
//}
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-17 15:41:02 +00:00
|
|
|
//fn iterate_elements(&self) -> /*Ignored*/Option<Iterator> {
|
2019-03-19 07:40:05 +00:00
|
|
|
// unsafe { TODO: call gst_sys:gst_bin_iterate_elements() }
|
2017-09-17 15:41:02 +00:00
|
|
|
//}
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-17 15:41:02 +00:00
|
|
|
//fn iterate_recurse(&self) -> /*Ignored*/Option<Iterator> {
|
2019-03-19 07:40:05 +00:00
|
|
|
// unsafe { TODO: call gst_sys:gst_bin_iterate_recurse() }
|
2017-09-17 15:41:02 +00:00
|
|
|
//}
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-17 15:41:02 +00:00
|
|
|
//fn iterate_sinks(&self) -> /*Ignored*/Option<Iterator> {
|
2019-03-19 07:40:05 +00:00
|
|
|
// unsafe { TODO: call gst_sys:gst_bin_iterate_sinks() }
|
2017-09-17 15:41:02 +00:00
|
|
|
//}
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-17 15:41:02 +00:00
|
|
|
//fn iterate_sorted(&self) -> /*Ignored*/Option<Iterator> {
|
2019-03-19 07:40:05 +00:00
|
|
|
// unsafe { TODO: call gst_sys:gst_bin_iterate_sorted() }
|
2017-09-17 15:41:02 +00:00
|
|
|
//}
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-09-17 15:41:02 +00:00
|
|
|
//fn iterate_sources(&self) -> /*Ignored*/Option<Iterator> {
|
2019-03-19 07:40:05 +00:00
|
|
|
// unsafe { TODO: call gst_sys:gst_bin_iterate_sources() }
|
2017-09-17 15:41:02 +00:00
|
|
|
//}
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-06-24 09:02:24 +00:00
|
|
|
fn recalculate_latency(&self) -> Result<(), glib::error::BoolError> {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
glib_result_from_gboolean!(gst_sys::gst_bin_recalculate_latency(self.as_ref().to_glib_none().0), "Failed to recalculate latency")
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-06-24 09:02:24 +00:00
|
|
|
fn remove<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError> {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
glib_result_from_gboolean!(gst_sys::gst_bin_remove(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0), "Failed to remove element")
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//fn remove_many<P: IsA<Element>>(&self, element_1: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
|
2019-03-19 07:40:05 +00:00
|
|
|
// unsafe { TODO: call gst_sys:gst_bin_remove_many() }
|
2017-05-12 12:24:03 +00:00
|
|
|
//}
|
|
|
|
|
2017-10-01 13:52:15 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
2017-08-14 19:15:37 +00:00
|
|
|
fn set_suppressed_flags(&self, flags: ElementFlags) {
|
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
gst_sys::gst_bin_set_suppressed_flags(self.as_ref().to_glib_none().0, flags.to_glib());
|
2017-08-14 19:15:37 +00:00
|
|
|
}
|
|
|
|
}
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2017-06-24 09:02:24 +00:00
|
|
|
fn sync_children_states(&self) -> Result<(), glib::error::BoolError> {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
glib_result_from_gboolean!(gst_sys::gst_bin_sync_children_states(self.as_ref().to_glib_none().0), "Failed to sync children states")
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_property_async_handling(&self) -> bool {
|
|
|
|
unsafe {
|
2018-02-06 14:42:34 +00:00
|
|
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
2019-03-19 07:40:05 +00:00
|
|
|
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"async-handling\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
2017-11-27 17:16:34 +00:00
|
|
|
value.get().unwrap()
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn set_property_async_handling(&self, async_handling: bool) {
|
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"async-handling\0".as_ptr() as *const _, Value::from(&async_handling).to_glib_none().0);
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_property_message_forward(&self) -> bool {
|
|
|
|
unsafe {
|
2018-02-06 14:42:34 +00:00
|
|
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
2019-03-19 07:40:05 +00:00
|
|
|
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"message-forward\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
2017-11-27 17:16:34 +00:00
|
|
|
value.get().unwrap()
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn set_property_message_forward(&self, message_forward: bool) {
|
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"message-forward\0".as_ptr() as *const _, Value::from(&message_forward).to_glib_none().0);
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-01 13:52:15 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
2017-09-09 13:01:32 +00:00
|
|
|
fn connect_deep_element_added<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-01-16 11:32:39 +00:00
|
|
|
connect_raw(self.as_ptr() as *mut _, b"deep-element-added\0".as_ptr() as *const _,
|
2019-01-29 13:53:44 +00:00
|
|
|
Some(transmute(deep_element_added_trampoline::<Self, F> as usize)), Box_::into_raw(f))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-01 13:52:15 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
2017-09-09 13:01:32 +00:00
|
|
|
fn connect_deep_element_removed<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-01-16 11:32:39 +00:00
|
|
|
connect_raw(self.as_ptr() as *mut _, b"deep-element-removed\0".as_ptr() as *const _,
|
2019-01-29 13:53:44 +00:00
|
|
|
Some(transmute(deep_element_removed_trampoline::<Self, F> as usize)), Box_::into_raw(f))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-09 13:01:32 +00:00
|
|
|
fn connect_element_added<F: Fn(&Self, &Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-01-16 11:32:39 +00:00
|
|
|
connect_raw(self.as_ptr() as *mut _, b"element-added\0".as_ptr() as *const _,
|
2019-01-29 13:53:44 +00:00
|
|
|
Some(transmute(element_added_trampoline::<Self, F> as usize)), Box_::into_raw(f))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-09 13:01:32 +00:00
|
|
|
fn connect_element_removed<F: Fn(&Self, &Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-01-16 11:32:39 +00:00
|
|
|
connect_raw(self.as_ptr() as *mut _, b"element-removed\0".as_ptr() as *const _,
|
2019-01-29 13:53:44 +00:00
|
|
|
Some(transmute(element_removed_trampoline::<Self, F> as usize)), Box_::into_raw(f))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
2017-08-18 13:29:21 +00:00
|
|
|
|
2017-09-09 13:01:32 +00:00
|
|
|
fn connect_property_async_handling_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
2017-08-18 13:29:21 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-01-16 11:32:39 +00:00
|
|
|
connect_raw(self.as_ptr() as *mut _, b"notify::async-handling\0".as_ptr() as *const _,
|
2019-01-29 13:53:44 +00:00
|
|
|
Some(transmute(notify_async_handling_trampoline::<Self, F> as usize)), Box_::into_raw(f))
|
2017-08-18 13:29:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-09 13:01:32 +00:00
|
|
|
fn connect_property_message_forward_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
2017-08-18 13:29:21 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-01-16 11:32:39 +00:00
|
|
|
connect_raw(self.as_ptr() as *mut _, b"notify::message-forward\0".as_ptr() as *const _,
|
2019-01-29 13:53:44 +00:00
|
|
|
Some(transmute(notify_message_forward_trampoline::<Self, F> as usize)), Box_::into_raw(f))
|
2017-08-18 13:29:21 +00:00
|
|
|
}
|
|
|
|
}
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
|
2017-10-01 13:52:15 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
2019-03-19 07:40:05 +00:00
|
|
|
unsafe extern "C" fn deep_element_added_trampoline<P, F: Fn(&P, &Bin, &Element) + Send + Sync + 'static>(this: *mut gst_sys::GstBin, sub_bin: *mut gst_sys::GstBin, element: *mut gst_sys::GstElement, f: glib_sys::gpointer)
|
2017-05-12 12:24:03 +00:00
|
|
|
where P: IsA<Bin> {
|
2019-02-22 09:51:17 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-01-16 11:32:39 +00:00
|
|
|
f(&Bin::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(sub_bin), &from_glib_borrow(element))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
|
2017-10-01 13:52:15 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
2019-03-19 07:40:05 +00:00
|
|
|
unsafe extern "C" fn deep_element_removed_trampoline<P, F: Fn(&P, &Bin, &Element) + Send + Sync + 'static>(this: *mut gst_sys::GstBin, sub_bin: *mut gst_sys::GstBin, element: *mut gst_sys::GstElement, f: glib_sys::gpointer)
|
2017-05-12 12:24:03 +00:00
|
|
|
where P: IsA<Bin> {
|
2019-02-22 09:51:17 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-01-16 11:32:39 +00:00
|
|
|
f(&Bin::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(sub_bin), &from_glib_borrow(element))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
|
2019-03-19 07:40:05 +00:00
|
|
|
unsafe extern "C" fn element_added_trampoline<P, F: Fn(&P, &Element) + Send + Sync + 'static>(this: *mut gst_sys::GstBin, element: *mut gst_sys::GstElement, f: glib_sys::gpointer)
|
2017-05-12 12:24:03 +00:00
|
|
|
where P: IsA<Bin> {
|
2019-02-22 09:51:17 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-01-16 11:32:39 +00:00
|
|
|
f(&Bin::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(element))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
|
2019-03-19 07:40:05 +00:00
|
|
|
unsafe extern "C" fn element_removed_trampoline<P, F: Fn(&P, &Element) + Send + Sync + 'static>(this: *mut gst_sys::GstBin, element: *mut gst_sys::GstElement, f: glib_sys::gpointer)
|
2017-05-12 12:24:03 +00:00
|
|
|
where P: IsA<Bin> {
|
2019-02-22 09:51:17 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-01-16 11:32:39 +00:00
|
|
|
f(&Bin::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(element))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
2017-08-18 13:29:21 +00:00
|
|
|
|
2019-03-19 07:40:05 +00:00
|
|
|
unsafe extern "C" fn notify_async_handling_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_sys::GstBin, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
2017-08-18 13:29:21 +00:00
|
|
|
where P: IsA<Bin> {
|
2019-02-22 09:51:17 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-01-16 11:32:39 +00:00
|
|
|
f(&Bin::from_glib_borrow(this).unsafe_cast())
|
2017-08-18 13:29:21 +00:00
|
|
|
}
|
|
|
|
|
2019-03-19 07:40:05 +00:00
|
|
|
unsafe extern "C" fn notify_message_forward_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_sys::GstBin, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
2017-08-18 13:29:21 +00:00
|
|
|
where P: IsA<Bin> {
|
2019-02-22 09:51:17 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-01-16 11:32:39 +00:00
|
|
|
f(&Bin::from_glib_borrow(this).unsafe_cast())
|
2017-08-18 13:29:21 +00:00
|
|
|
}
|