forked from mirrors/gstreamer-rs
Regenerate with latest gir and configure default concurrency to send+sync
This commit is contained in:
parent
e41fb76d2d
commit
b792f4b5da
16 changed files with 155 additions and 127 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -18,7 +18,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "glib"
|
name = "glib"
|
||||||
version = "0.1.3"
|
version = "0.1.3"
|
||||||
source = "git+https://github.com/gtk-rs/glib#46658ce0f51fa8f46468720cb3f2d03cef4e4b93"
|
source = "git+https://github.com/gtk-rs/glib#d3aed89e92d6162f385b699ccd546ee799612c93"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
|
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
|
||||||
|
@ -51,7 +51,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gstreamer-sys"
|
name = "gstreamer-sys"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
source = "git+https://github.com/sdroege/gstreamer-sys#01d79cc53ccdb1b06b09656fde04f3868c9dc246"
|
source = "git+https://github.com/sdroege/gstreamer-sys#0d5b1c60a6d74150a55de4b5f980e09dd67014f2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
|
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
|
||||||
|
|
|
@ -5,6 +5,7 @@ version = "1.0"
|
||||||
min_cfg_version = "1.0"
|
min_cfg_version = "1.0"
|
||||||
target_path = "gstreamer"
|
target_path = "gstreamer"
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
|
concurrency = "send+sync"
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
pub type ClockTime = u64;
|
pub type ClockTime = u64;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use Element;
|
use Element;
|
||||||
|
@ -35,6 +35,9 @@ impl Bin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsafe impl Send for Bin {}
|
||||||
|
unsafe impl Sync for Bin {}
|
||||||
|
|
||||||
pub trait BinExt {
|
pub trait BinExt {
|
||||||
fn add<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError>;
|
fn add<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
|
@ -84,16 +87,16 @@ pub trait BinExt {
|
||||||
fn set_property_message_forward(&self, message_forward: bool);
|
fn set_property_message_forward(&self, message_forward: bool);
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(feature = "v1_10")]
|
||||||
fn connect_deep_element_added<F: Fn(&Self, &Bin, &Element) + 'static>(&self, f: F) -> u64;
|
fn connect_deep_element_added<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(feature = "v1_10")]
|
||||||
fn connect_deep_element_removed<F: Fn(&Self, &Bin, &Element) + 'static>(&self, f: F) -> u64;
|
fn connect_deep_element_removed<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||||
|
|
||||||
fn connect_do_latency<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> u64;
|
fn connect_do_latency<F: Fn(&Self) -> bool + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||||
|
|
||||||
fn connect_element_added<F: Fn(&Self, &Element) + 'static>(&self, f: F) -> u64;
|
fn connect_element_added<F: Fn(&Self, &Element) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||||
|
|
||||||
fn connect_element_removed<F: Fn(&Self, &Element) + 'static>(&self, f: F) -> u64;
|
fn connect_element_removed<F: Fn(&Self, &Element) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Bin> + IsA<glib::object::Object>> BinExt for O {
|
impl<O: IsA<Bin> + IsA<glib::object::Object>> BinExt for O {
|
||||||
|
@ -217,42 +220,42 @@ impl<O: IsA<Bin> + IsA<glib::object::Object>> BinExt for O {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(feature = "v1_10")]
|
||||||
fn connect_deep_element_added<F: Fn(&Self, &Bin, &Element) + 'static>(&self, f: F) -> u64 {
|
fn connect_deep_element_added<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Bin, &Element) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Bin, &Element) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "deep-element-added",
|
connect(self.to_glib_none().0, "deep-element-added",
|
||||||
transmute(deep_element_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(deep_element_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(feature = "v1_10")]
|
||||||
fn connect_deep_element_removed<F: Fn(&Self, &Bin, &Element) + 'static>(&self, f: F) -> u64 {
|
fn connect_deep_element_removed<F: Fn(&Self, &Bin, &Element) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Bin, &Element) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Bin, &Element) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "deep-element-removed",
|
connect(self.to_glib_none().0, "deep-element-removed",
|
||||||
transmute(deep_element_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(deep_element_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_do_latency<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> u64 {
|
fn connect_do_latency<F: Fn(&Self) -> bool + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) -> bool + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) -> bool + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "do-latency",
|
connect(self.to_glib_none().0, "do-latency",
|
||||||
transmute(do_latency_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(do_latency_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_element_added<F: Fn(&Self, &Element) + 'static>(&self, f: F) -> u64 {
|
fn connect_element_added<F: Fn(&Self, &Element) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Element) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Element) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "element-added",
|
connect(self.to_glib_none().0, "element-added",
|
||||||
transmute(element_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(element_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_element_removed<F: Fn(&Self, &Element) + 'static>(&self, f: F) -> u64 {
|
fn connect_element_removed<F: Fn(&Self, &Element) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Element) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Element) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "element-removed",
|
connect(self.to_glib_none().0, "element-removed",
|
||||||
transmute(element_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(element_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
|
@ -263,7 +266,7 @@ impl<O: IsA<Bin> + IsA<glib::object::Object>> BinExt for O {
|
||||||
unsafe extern "C" fn deep_element_added_trampoline<P>(this: *mut ffi::GstBin, sub_bin: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer)
|
unsafe extern "C" fn deep_element_added_trampoline<P>(this: *mut ffi::GstBin, sub_bin: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer)
|
||||||
where P: IsA<Bin> {
|
where P: IsA<Bin> {
|
||||||
callback_guard!();
|
callback_guard!();
|
||||||
let f: &Box_<Fn(&P, &Bin, &Element) + 'static> = transmute(f);
|
let f: &Box_<Fn(&P, &Bin, &Element) + Send + Sync + 'static> = transmute(f);
|
||||||
f(&Bin::from_glib_none(this).downcast_unchecked(), &from_glib_none(sub_bin), &from_glib_none(element))
|
f(&Bin::from_glib_none(this).downcast_unchecked(), &from_glib_none(sub_bin), &from_glib_none(element))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,27 +274,27 @@ where P: IsA<Bin> {
|
||||||
unsafe extern "C" fn deep_element_removed_trampoline<P>(this: *mut ffi::GstBin, sub_bin: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer)
|
unsafe extern "C" fn deep_element_removed_trampoline<P>(this: *mut ffi::GstBin, sub_bin: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer)
|
||||||
where P: IsA<Bin> {
|
where P: IsA<Bin> {
|
||||||
callback_guard!();
|
callback_guard!();
|
||||||
let f: &Box_<Fn(&P, &Bin, &Element) + 'static> = transmute(f);
|
let f: &Box_<Fn(&P, &Bin, &Element) + Send + Sync + 'static> = transmute(f);
|
||||||
f(&Bin::from_glib_none(this).downcast_unchecked(), &from_glib_none(sub_bin), &from_glib_none(element))
|
f(&Bin::from_glib_none(this).downcast_unchecked(), &from_glib_none(sub_bin), &from_glib_none(element))
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe extern "C" fn do_latency_trampoline<P>(this: *mut ffi::GstBin, f: glib_ffi::gpointer) -> glib_ffi::gboolean
|
unsafe extern "C" fn do_latency_trampoline<P>(this: *mut ffi::GstBin, f: glib_ffi::gpointer) -> glib_ffi::gboolean
|
||||||
where P: IsA<Bin> {
|
where P: IsA<Bin> {
|
||||||
callback_guard!();
|
callback_guard!();
|
||||||
let f: &Box_<Fn(&P) -> bool + 'static> = transmute(f);
|
let f: &Box_<Fn(&P) -> bool + Send + Sync + 'static> = transmute(f);
|
||||||
f(&Bin::from_glib_none(this).downcast_unchecked()).to_glib()
|
f(&Bin::from_glib_none(this).downcast_unchecked()).to_glib()
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe extern "C" fn element_added_trampoline<P>(this: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer)
|
unsafe extern "C" fn element_added_trampoline<P>(this: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer)
|
||||||
where P: IsA<Bin> {
|
where P: IsA<Bin> {
|
||||||
callback_guard!();
|
callback_guard!();
|
||||||
let f: &Box_<Fn(&P, &Element) + 'static> = transmute(f);
|
let f: &Box_<Fn(&P, &Element) + Send + Sync + 'static> = transmute(f);
|
||||||
f(&Bin::from_glib_none(this).downcast_unchecked(), &from_glib_none(element))
|
f(&Bin::from_glib_none(this).downcast_unchecked(), &from_glib_none(element))
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe extern "C" fn element_removed_trampoline<P>(this: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer)
|
unsafe extern "C" fn element_removed_trampoline<P>(this: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer)
|
||||||
where P: IsA<Bin> {
|
where P: IsA<Bin> {
|
||||||
callback_guard!();
|
callback_guard!();
|
||||||
let f: &Box_<Fn(&P, &Element) + 'static> = transmute(f);
|
let f: &Box_<Fn(&P, &Element) + Send + Sync + 'static> = transmute(f);
|
||||||
f(&Bin::from_glib_none(this).downcast_unchecked(), &from_glib_none(element))
|
f(&Bin::from_glib_none(this).downcast_unchecked(), &from_glib_none(element))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use Object;
|
use Object;
|
||||||
|
@ -22,6 +22,9 @@ impl Bus {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsafe impl Send for Bus {}
|
||||||
|
unsafe impl Sync for Bus {}
|
||||||
|
|
||||||
pub trait BusExt {
|
pub trait BusExt {
|
||||||
fn add_signal_watch(&self);
|
fn add_signal_watch(&self);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use ClockTime;
|
use ClockTime;
|
||||||
|
@ -60,6 +60,9 @@ impl Clock {
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsafe impl Send for Clock {}
|
||||||
|
unsafe impl Sync for Clock {}
|
||||||
|
|
||||||
pub trait ClockExt {
|
pub trait ClockExt {
|
||||||
fn add_observation(&self, slave: ClockTime, master: ClockTime) -> Option<f64>;
|
fn add_observation(&self, slave: ClockTime, master: ClockTime) -> Option<f64>;
|
||||||
|
|
||||||
|
@ -122,7 +125,7 @@ pub trait ClockExt {
|
||||||
fn set_property_window_threshold(&self, window_threshold: i32);
|
fn set_property_window_threshold(&self, window_threshold: i32);
|
||||||
|
|
||||||
#[cfg(feature = "v1_6")]
|
#[cfg(feature = "v1_6")]
|
||||||
fn connect_synced<F: Fn(&Self, bool) + 'static>(&self, f: F) -> u64;
|
fn connect_synced<F: Fn(&Self, bool) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Clock> + IsA<glib::object::Object>> ClockExt for O {
|
impl<O: IsA<Clock> + IsA<glib::object::Object>> ClockExt for O {
|
||||||
|
@ -306,9 +309,9 @@ impl<O: IsA<Clock> + IsA<glib::object::Object>> ClockExt for O {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_6")]
|
#[cfg(feature = "v1_6")]
|
||||||
fn connect_synced<F: Fn(&Self, bool) + 'static>(&self, f: F) -> u64 {
|
fn connect_synced<F: Fn(&Self, bool) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, bool) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, bool) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "synced",
|
connect(self.to_glib_none().0, "synced",
|
||||||
transmute(synced_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(synced_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
|
@ -319,6 +322,6 @@ impl<O: IsA<Clock> + IsA<glib::object::Object>> ClockExt for O {
|
||||||
unsafe extern "C" fn synced_trampoline<P>(this: *mut ffi::GstClock, synced: glib_ffi::gboolean, f: glib_ffi::gpointer)
|
unsafe extern "C" fn synced_trampoline<P>(this: *mut ffi::GstClock, synced: glib_ffi::gboolean, f: glib_ffi::gpointer)
|
||||||
where P: IsA<Clock> {
|
where P: IsA<Clock> {
|
||||||
callback_guard!();
|
callback_guard!();
|
||||||
let f: &Box_<Fn(&P, bool) + 'static> = transmute(f);
|
let f: &Box_<Fn(&P, bool) + Send + Sync + 'static> = transmute(f);
|
||||||
f(&Clock::from_glib_none(this).downcast_unchecked(), from_glib(synced))
|
f(&Clock::from_glib_none(this).downcast_unchecked(), from_glib(synced))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use Bus;
|
use Bus;
|
||||||
|
@ -66,6 +66,9 @@ impl Element {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsafe impl Send for Element {}
|
||||||
|
unsafe impl Sync for Element {}
|
||||||
|
|
||||||
pub trait ElementExt {
|
pub trait ElementExt {
|
||||||
fn abort_state(&self);
|
fn abort_state(&self);
|
||||||
|
|
||||||
|
@ -193,11 +196,11 @@ pub trait ElementExt {
|
||||||
|
|
||||||
fn unlink_pads<P: IsA<Element>>(&self, srcpadname: &str, dest: &P, destpadname: &str);
|
fn unlink_pads<P: IsA<Element>>(&self, srcpadname: &str, dest: &P, destpadname: &str);
|
||||||
|
|
||||||
fn connect_no_more_pads<F: Fn(&Self) + 'static>(&self, f: F) -> u64;
|
fn connect_no_more_pads<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||||
|
|
||||||
fn connect_pad_added<F: Fn(&Self, &Pad) + 'static>(&self, f: F) -> u64;
|
fn connect_pad_added<F: Fn(&Self, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||||
|
|
||||||
fn connect_pad_removed<F: Fn(&Self, &Pad) + 'static>(&self, f: F) -> u64;
|
fn connect_pad_removed<F: Fn(&Self, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Element> + IsA<glib::object::Object>> ElementExt for O {
|
impl<O: IsA<Element> + IsA<glib::object::Object>> ElementExt for O {
|
||||||
|
@ -540,25 +543,25 @@ impl<O: IsA<Element> + IsA<glib::object::Object>> ElementExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_no_more_pads<F: Fn(&Self) + 'static>(&self, f: F) -> u64 {
|
fn connect_no_more_pads<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "no-more-pads",
|
connect(self.to_glib_none().0, "no-more-pads",
|
||||||
transmute(no_more_pads_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(no_more_pads_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_pad_added<F: Fn(&Self, &Pad) + 'static>(&self, f: F) -> u64 {
|
fn connect_pad_added<F: Fn(&Self, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Pad) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Pad) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pad-added",
|
connect(self.to_glib_none().0, "pad-added",
|
||||||
transmute(pad_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pad_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_pad_removed<F: Fn(&Self, &Pad) + 'static>(&self, f: F) -> u64 {
|
fn connect_pad_removed<F: Fn(&Self, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Pad) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Pad) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pad-removed",
|
connect(self.to_glib_none().0, "pad-removed",
|
||||||
transmute(pad_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pad_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
|
@ -568,20 +571,20 @@ impl<O: IsA<Element> + IsA<glib::object::Object>> ElementExt for O {
|
||||||
unsafe extern "C" fn no_more_pads_trampoline<P>(this: *mut ffi::GstElement, f: glib_ffi::gpointer)
|
unsafe extern "C" fn no_more_pads_trampoline<P>(this: *mut ffi::GstElement, f: glib_ffi::gpointer)
|
||||||
where P: IsA<Element> {
|
where P: IsA<Element> {
|
||||||
callback_guard!();
|
callback_guard!();
|
||||||
let f: &Box_<Fn(&P) + 'static> = transmute(f);
|
let f: &Box_<Fn(&P) + Send + Sync + 'static> = transmute(f);
|
||||||
f(&Element::from_glib_none(this).downcast_unchecked())
|
f(&Element::from_glib_none(this).downcast_unchecked())
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe extern "C" fn pad_added_trampoline<P>(this: *mut ffi::GstElement, new_pad: *mut ffi::GstPad, f: glib_ffi::gpointer)
|
unsafe extern "C" fn pad_added_trampoline<P>(this: *mut ffi::GstElement, new_pad: *mut ffi::GstPad, f: glib_ffi::gpointer)
|
||||||
where P: IsA<Element> {
|
where P: IsA<Element> {
|
||||||
callback_guard!();
|
callback_guard!();
|
||||||
let f: &Box_<Fn(&P, &Pad) + 'static> = transmute(f);
|
let f: &Box_<Fn(&P, &Pad) + Send + Sync + 'static> = transmute(f);
|
||||||
f(&Element::from_glib_none(this).downcast_unchecked(), &from_glib_none(new_pad))
|
f(&Element::from_glib_none(this).downcast_unchecked(), &from_glib_none(new_pad))
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe extern "C" fn pad_removed_trampoline<P>(this: *mut ffi::GstElement, old_pad: *mut ffi::GstPad, f: glib_ffi::gpointer)
|
unsafe extern "C" fn pad_removed_trampoline<P>(this: *mut ffi::GstElement, old_pad: *mut ffi::GstPad, f: glib_ffi::gpointer)
|
||||||
where P: IsA<Element> {
|
where P: IsA<Element> {
|
||||||
callback_guard!();
|
callback_guard!();
|
||||||
let f: &Box_<Fn(&P, &Pad) + 'static> = transmute(f);
|
let f: &Box_<Fn(&P, &Pad) + Send + Sync + 'static> = transmute(f);
|
||||||
f(&Element::from_glib_none(this).downcast_unchecked(), &from_glib_none(old_pad))
|
f(&Element::from_glib_none(this).downcast_unchecked(), &from_glib_none(old_pad))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use Element;
|
use Element;
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
|
use std;
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||||
pub enum FlowReturn {
|
pub enum FlowReturn {
|
||||||
|
@ -20,7 +21,7 @@ pub enum FlowReturn {
|
||||||
CustomError1,
|
CustomError1,
|
||||||
CustomError2,
|
CustomError2,
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
__Nonexhaustive(()),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
@ -42,7 +43,7 @@ impl ToGlib for FlowReturn {
|
||||||
FlowReturn::CustomError => ffi::GST_FLOW_CUSTOM_ERROR,
|
FlowReturn::CustomError => ffi::GST_FLOW_CUSTOM_ERROR,
|
||||||
FlowReturn::CustomError1 => ffi::GST_FLOW_CUSTOM_ERROR_1,
|
FlowReturn::CustomError1 => ffi::GST_FLOW_CUSTOM_ERROR_1,
|
||||||
FlowReturn::CustomError2 => ffi::GST_FLOW_CUSTOM_ERROR_2,
|
FlowReturn::CustomError2 => ffi::GST_FLOW_CUSTOM_ERROR_2,
|
||||||
FlowReturn::__Nonexhaustive(_) => panic!(),
|
FlowReturn::__Unknown(value) => unsafe{std::mem::transmute(value)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,20 +51,21 @@ impl ToGlib for FlowReturn {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::GstFlowReturn> for FlowReturn {
|
impl FromGlib<ffi::GstFlowReturn> for FlowReturn {
|
||||||
fn from_glib(value: ffi::GstFlowReturn) -> Self {
|
fn from_glib(value: ffi::GstFlowReturn) -> Self {
|
||||||
match value {
|
match value as i32 {
|
||||||
ffi::GST_FLOW_CUSTOM_SUCCESS_2 => FlowReturn::CustomSuccess2,
|
102 => FlowReturn::CustomSuccess2,
|
||||||
ffi::GST_FLOW_CUSTOM_SUCCESS_1 => FlowReturn::CustomSuccess1,
|
101 => FlowReturn::CustomSuccess1,
|
||||||
ffi::GST_FLOW_CUSTOM_SUCCESS => FlowReturn::CustomSuccess,
|
100 => FlowReturn::CustomSuccess,
|
||||||
ffi::GST_FLOW_OK => FlowReturn::Ok,
|
0 => FlowReturn::Ok,
|
||||||
ffi::GST_FLOW_NOT_LINKED => FlowReturn::NotLinked,
|
-1 => FlowReturn::NotLinked,
|
||||||
ffi::GST_FLOW_FLUSHING => FlowReturn::Flushing,
|
-2 => FlowReturn::Flushing,
|
||||||
ffi::GST_FLOW_EOS => FlowReturn::Eos,
|
-3 => FlowReturn::Eos,
|
||||||
ffi::GST_FLOW_NOT_NEGOTIATED => FlowReturn::NotNegotiated,
|
-4 => FlowReturn::NotNegotiated,
|
||||||
ffi::GST_FLOW_ERROR => FlowReturn::Error,
|
-5 => FlowReturn::Error,
|
||||||
ffi::GST_FLOW_NOT_SUPPORTED => FlowReturn::NotSupported,
|
-6 => FlowReturn::NotSupported,
|
||||||
ffi::GST_FLOW_CUSTOM_ERROR => FlowReturn::CustomError,
|
-100 => FlowReturn::CustomError,
|
||||||
ffi::GST_FLOW_CUSTOM_ERROR_1 => FlowReturn::CustomError1,
|
-101 => FlowReturn::CustomError1,
|
||||||
ffi::GST_FLOW_CUSTOM_ERROR_2 => FlowReturn::CustomError2,
|
-102 => FlowReturn::CustomError2,
|
||||||
|
value => FlowReturn::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +79,7 @@ pub enum Format {
|
||||||
Buffers,
|
Buffers,
|
||||||
Percent,
|
Percent,
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
__Nonexhaustive(()),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
@ -92,7 +94,7 @@ impl ToGlib for Format {
|
||||||
Format::Time => ffi::GST_FORMAT_TIME,
|
Format::Time => ffi::GST_FORMAT_TIME,
|
||||||
Format::Buffers => ffi::GST_FORMAT_BUFFERS,
|
Format::Buffers => ffi::GST_FORMAT_BUFFERS,
|
||||||
Format::Percent => ffi::GST_FORMAT_PERCENT,
|
Format::Percent => ffi::GST_FORMAT_PERCENT,
|
||||||
Format::__Nonexhaustive(_) => panic!(),
|
Format::__Unknown(value) => unsafe{std::mem::transmute(value)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,13 +102,14 @@ impl ToGlib for Format {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::GstFormat> for Format {
|
impl FromGlib<ffi::GstFormat> for Format {
|
||||||
fn from_glib(value: ffi::GstFormat) -> Self {
|
fn from_glib(value: ffi::GstFormat) -> Self {
|
||||||
match value {
|
match value as i32 {
|
||||||
ffi::GST_FORMAT_UNDEFINED => Format::Undefined,
|
0 => Format::Undefined,
|
||||||
ffi::GST_FORMAT_DEFAULT => Format::Default,
|
1 => Format::Default,
|
||||||
ffi::GST_FORMAT_BYTES => Format::Bytes,
|
2 => Format::Bytes,
|
||||||
ffi::GST_FORMAT_TIME => Format::Time,
|
3 => Format::Time,
|
||||||
ffi::GST_FORMAT_BUFFERS => Format::Buffers,
|
4 => Format::Buffers,
|
||||||
ffi::GST_FORMAT_PERCENT => Format::Percent,
|
5 => Format::Percent,
|
||||||
|
value => Format::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,7 +120,7 @@ pub enum PadDirection {
|
||||||
Src,
|
Src,
|
||||||
Sink,
|
Sink,
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
__Nonexhaustive(()),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
@ -129,7 +132,7 @@ impl ToGlib for PadDirection {
|
||||||
PadDirection::Unknown => ffi::GST_PAD_UNKNOWN,
|
PadDirection::Unknown => ffi::GST_PAD_UNKNOWN,
|
||||||
PadDirection::Src => ffi::GST_PAD_SRC,
|
PadDirection::Src => ffi::GST_PAD_SRC,
|
||||||
PadDirection::Sink => ffi::GST_PAD_SINK,
|
PadDirection::Sink => ffi::GST_PAD_SINK,
|
||||||
PadDirection::__Nonexhaustive(_) => panic!(),
|
PadDirection::__Unknown(value) => unsafe{std::mem::transmute(value)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,10 +140,11 @@ impl ToGlib for PadDirection {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::GstPadDirection> for PadDirection {
|
impl FromGlib<ffi::GstPadDirection> for PadDirection {
|
||||||
fn from_glib(value: ffi::GstPadDirection) -> Self {
|
fn from_glib(value: ffi::GstPadDirection) -> Self {
|
||||||
match value {
|
match value as i32 {
|
||||||
ffi::GST_PAD_UNKNOWN => PadDirection::Unknown,
|
0 => PadDirection::Unknown,
|
||||||
ffi::GST_PAD_SRC => PadDirection::Src,
|
1 => PadDirection::Src,
|
||||||
ffi::GST_PAD_SINK => PadDirection::Sink,
|
2 => PadDirection::Sink,
|
||||||
|
value => PadDirection::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,7 +155,7 @@ pub enum SeekType {
|
||||||
Set,
|
Set,
|
||||||
End,
|
End,
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
__Nonexhaustive(()),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
@ -163,7 +167,7 @@ impl ToGlib for SeekType {
|
||||||
SeekType::None => ffi::GST_SEEK_TYPE_NONE,
|
SeekType::None => ffi::GST_SEEK_TYPE_NONE,
|
||||||
SeekType::Set => ffi::GST_SEEK_TYPE_SET,
|
SeekType::Set => ffi::GST_SEEK_TYPE_SET,
|
||||||
SeekType::End => ffi::GST_SEEK_TYPE_END,
|
SeekType::End => ffi::GST_SEEK_TYPE_END,
|
||||||
SeekType::__Nonexhaustive(_) => panic!(),
|
SeekType::__Unknown(value) => unsafe{std::mem::transmute(value)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,10 +175,11 @@ impl ToGlib for SeekType {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::GstSeekType> for SeekType {
|
impl FromGlib<ffi::GstSeekType> for SeekType {
|
||||||
fn from_glib(value: ffi::GstSeekType) -> Self {
|
fn from_glib(value: ffi::GstSeekType) -> Self {
|
||||||
match value {
|
match value as i32 {
|
||||||
ffi::GST_SEEK_TYPE_NONE => SeekType::None,
|
0 => SeekType::None,
|
||||||
ffi::GST_SEEK_TYPE_SET => SeekType::Set,
|
1 => SeekType::Set,
|
||||||
ffi::GST_SEEK_TYPE_END => SeekType::End,
|
2 => SeekType::End,
|
||||||
|
value => SeekType::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -187,7 +192,7 @@ pub enum State {
|
||||||
Paused,
|
Paused,
|
||||||
Playing,
|
Playing,
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
__Nonexhaustive(()),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
@ -201,7 +206,7 @@ impl ToGlib for State {
|
||||||
State::Ready => ffi::GST_STATE_READY,
|
State::Ready => ffi::GST_STATE_READY,
|
||||||
State::Paused => ffi::GST_STATE_PAUSED,
|
State::Paused => ffi::GST_STATE_PAUSED,
|
||||||
State::Playing => ffi::GST_STATE_PLAYING,
|
State::Playing => ffi::GST_STATE_PLAYING,
|
||||||
State::__Nonexhaustive(_) => panic!(),
|
State::__Unknown(value) => unsafe{std::mem::transmute(value)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,12 +214,13 @@ impl ToGlib for State {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::GstState> for State {
|
impl FromGlib<ffi::GstState> for State {
|
||||||
fn from_glib(value: ffi::GstState) -> Self {
|
fn from_glib(value: ffi::GstState) -> Self {
|
||||||
match value {
|
match value as i32 {
|
||||||
ffi::GST_STATE_VOID_PENDING => State::VoidPending,
|
0 => State::VoidPending,
|
||||||
ffi::GST_STATE_NULL => State::Null,
|
1 => State::Null,
|
||||||
ffi::GST_STATE_READY => State::Ready,
|
2 => State::Ready,
|
||||||
ffi::GST_STATE_PAUSED => State::Paused,
|
3 => State::Paused,
|
||||||
ffi::GST_STATE_PLAYING => State::Playing,
|
4 => State::Playing,
|
||||||
|
value => State::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,7 +234,7 @@ pub enum StateChange {
|
||||||
PausedToReady,
|
PausedToReady,
|
||||||
ReadyToNull,
|
ReadyToNull,
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
__Nonexhaustive(()),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
@ -243,7 +249,7 @@ impl ToGlib for StateChange {
|
||||||
StateChange::PlayingToPaused => ffi::GST_STATE_CHANGE_PLAYING_TO_PAUSED,
|
StateChange::PlayingToPaused => ffi::GST_STATE_CHANGE_PLAYING_TO_PAUSED,
|
||||||
StateChange::PausedToReady => ffi::GST_STATE_CHANGE_PAUSED_TO_READY,
|
StateChange::PausedToReady => ffi::GST_STATE_CHANGE_PAUSED_TO_READY,
|
||||||
StateChange::ReadyToNull => ffi::GST_STATE_CHANGE_READY_TO_NULL,
|
StateChange::ReadyToNull => ffi::GST_STATE_CHANGE_READY_TO_NULL,
|
||||||
StateChange::__Nonexhaustive(_) => panic!(),
|
StateChange::__Unknown(value) => unsafe{std::mem::transmute(value)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -251,13 +257,14 @@ impl ToGlib for StateChange {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::GstStateChange> for StateChange {
|
impl FromGlib<ffi::GstStateChange> for StateChange {
|
||||||
fn from_glib(value: ffi::GstStateChange) -> Self {
|
fn from_glib(value: ffi::GstStateChange) -> Self {
|
||||||
match value {
|
match value as i32 {
|
||||||
ffi::GST_STATE_CHANGE_NULL_TO_READY => StateChange::NullToReady,
|
10 => StateChange::NullToReady,
|
||||||
ffi::GST_STATE_CHANGE_READY_TO_PAUSED => StateChange::ReadyToPaused,
|
19 => StateChange::ReadyToPaused,
|
||||||
ffi::GST_STATE_CHANGE_PAUSED_TO_PLAYING => StateChange::PausedToPlaying,
|
28 => StateChange::PausedToPlaying,
|
||||||
ffi::GST_STATE_CHANGE_PLAYING_TO_PAUSED => StateChange::PlayingToPaused,
|
35 => StateChange::PlayingToPaused,
|
||||||
ffi::GST_STATE_CHANGE_PAUSED_TO_READY => StateChange::PausedToReady,
|
26 => StateChange::PausedToReady,
|
||||||
ffi::GST_STATE_CHANGE_READY_TO_NULL => StateChange::ReadyToNull,
|
17 => StateChange::ReadyToNull,
|
||||||
|
value => StateChange::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -269,7 +276,7 @@ pub enum StateChangeReturn {
|
||||||
Async,
|
Async,
|
||||||
NoPreroll,
|
NoPreroll,
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
__Nonexhaustive(()),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
@ -282,7 +289,7 @@ impl ToGlib for StateChangeReturn {
|
||||||
StateChangeReturn::Success => ffi::GST_STATE_CHANGE_SUCCESS,
|
StateChangeReturn::Success => ffi::GST_STATE_CHANGE_SUCCESS,
|
||||||
StateChangeReturn::Async => ffi::GST_STATE_CHANGE_ASYNC,
|
StateChangeReturn::Async => ffi::GST_STATE_CHANGE_ASYNC,
|
||||||
StateChangeReturn::NoPreroll => ffi::GST_STATE_CHANGE_NO_PREROLL,
|
StateChangeReturn::NoPreroll => ffi::GST_STATE_CHANGE_NO_PREROLL,
|
||||||
StateChangeReturn::__Nonexhaustive(_) => panic!(),
|
StateChangeReturn::__Unknown(value) => unsafe{std::mem::transmute(value)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -290,11 +297,12 @@ impl ToGlib for StateChangeReturn {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::GstStateChangeReturn> for StateChangeReturn {
|
impl FromGlib<ffi::GstStateChangeReturn> for StateChangeReturn {
|
||||||
fn from_glib(value: ffi::GstStateChangeReturn) -> Self {
|
fn from_glib(value: ffi::GstStateChangeReturn) -> Self {
|
||||||
match value {
|
match value as i32 {
|
||||||
ffi::GST_STATE_CHANGE_FAILURE => StateChangeReturn::Failure,
|
0 => StateChangeReturn::Failure,
|
||||||
ffi::GST_STATE_CHANGE_SUCCESS => StateChangeReturn::Success,
|
1 => StateChangeReturn::Success,
|
||||||
ffi::GST_STATE_CHANGE_ASYNC => StateChangeReturn::Async,
|
2 => StateChangeReturn::Async,
|
||||||
ffi::GST_STATE_CHANGE_NO_PREROLL => StateChangeReturn::NoPreroll,
|
3 => StateChangeReturn::NoPreroll,
|
||||||
|
value => StateChangeReturn::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -305,7 +313,7 @@ pub enum URIType {
|
||||||
Sink,
|
Sink,
|
||||||
Src,
|
Src,
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
__Nonexhaustive(()),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
@ -317,7 +325,7 @@ impl ToGlib for URIType {
|
||||||
URIType::Unknown => ffi::GST_URI_UNKNOWN,
|
URIType::Unknown => ffi::GST_URI_UNKNOWN,
|
||||||
URIType::Sink => ffi::GST_URI_SINK,
|
URIType::Sink => ffi::GST_URI_SINK,
|
||||||
URIType::Src => ffi::GST_URI_SRC,
|
URIType::Src => ffi::GST_URI_SRC,
|
||||||
URIType::__Nonexhaustive(_) => panic!(),
|
URIType::__Unknown(value) => unsafe{std::mem::transmute(value)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -325,10 +333,11 @@ impl ToGlib for URIType {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::GstURIType> for URIType {
|
impl FromGlib<ffi::GstURIType> for URIType {
|
||||||
fn from_glib(value: ffi::GstURIType) -> Self {
|
fn from_glib(value: ffi::GstURIType) -> Self {
|
||||||
match value {
|
match value as i32 {
|
||||||
ffi::GST_URI_UNKNOWN => URIType::Unknown,
|
0 => URIType::Unknown,
|
||||||
ffi::GST_URI_SINK => URIType::Sink,
|
1 => URIType::Sink,
|
||||||
ffi::GST_URI_SRC => URIType::Src,
|
2 => URIType::Src,
|
||||||
|
value => URIType::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use ffi;
|
use ffi;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
mod bin;
|
mod bin;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use ClockTime;
|
use ClockTime;
|
||||||
|
@ -36,6 +36,9 @@ impl Object {
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsafe impl Send for Object {}
|
||||||
|
unsafe impl Sync for Object {}
|
||||||
|
|
||||||
pub trait ObjectExt {
|
pub trait ObjectExt {
|
||||||
//fn add_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool;
|
//fn add_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use Element;
|
use Element;
|
||||||
|
@ -57,6 +57,9 @@ impl Pad {
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsafe impl Send for Pad {}
|
||||||
|
unsafe impl Sync for Pad {}
|
||||||
|
|
||||||
pub trait PadExt {
|
pub trait PadExt {
|
||||||
//fn activate_mode(&self, mode: /*Ignored*/PadMode, active: bool) -> bool;
|
//fn activate_mode(&self, mode: /*Ignored*/PadMode, active: bool) -> bool;
|
||||||
|
|
||||||
|
@ -234,9 +237,9 @@ pub trait PadExt {
|
||||||
|
|
||||||
fn set_property_template(&self, template: Option<&PadTemplate>);
|
fn set_property_template(&self, template: Option<&PadTemplate>);
|
||||||
|
|
||||||
fn connect_linked<F: Fn(&Self, &Pad) + 'static>(&self, f: F) -> u64;
|
fn connect_linked<F: Fn(&Self, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||||
|
|
||||||
fn connect_unlinked<F: Fn(&Self, &Pad) + 'static>(&self, f: F) -> u64;
|
fn connect_unlinked<F: Fn(&Self, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Pad> + IsA<glib::object::Object>> PadExt for O {
|
impl<O: IsA<Pad> + IsA<glib::object::Object>> PadExt for O {
|
||||||
|
@ -670,17 +673,17 @@ impl<O: IsA<Pad> + IsA<glib::object::Object>> PadExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_linked<F: Fn(&Self, &Pad) + 'static>(&self, f: F) -> u64 {
|
fn connect_linked<F: Fn(&Self, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Pad) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Pad) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "linked",
|
connect(self.to_glib_none().0, "linked",
|
||||||
transmute(linked_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(linked_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_unlinked<F: Fn(&Self, &Pad) + 'static>(&self, f: F) -> u64 {
|
fn connect_unlinked<F: Fn(&Self, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Pad) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Pad) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "unlinked",
|
connect(self.to_glib_none().0, "unlinked",
|
||||||
transmute(unlinked_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(unlinked_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
|
@ -690,13 +693,13 @@ impl<O: IsA<Pad> + IsA<glib::object::Object>> PadExt for O {
|
||||||
unsafe extern "C" fn linked_trampoline<P>(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer)
|
unsafe extern "C" fn linked_trampoline<P>(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer)
|
||||||
where P: IsA<Pad> {
|
where P: IsA<Pad> {
|
||||||
callback_guard!();
|
callback_guard!();
|
||||||
let f: &Box_<Fn(&P, &Pad) + 'static> = transmute(f);
|
let f: &Box_<Fn(&P, &Pad) + Send + Sync + 'static> = transmute(f);
|
||||||
f(&Pad::from_glib_none(this).downcast_unchecked(), &from_glib_none(peer))
|
f(&Pad::from_glib_none(this).downcast_unchecked(), &from_glib_none(peer))
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe extern "C" fn unlinked_trampoline<P>(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer)
|
unsafe extern "C" fn unlinked_trampoline<P>(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer)
|
||||||
where P: IsA<Pad> {
|
where P: IsA<Pad> {
|
||||||
callback_guard!();
|
callback_guard!();
|
||||||
let f: &Box_<Fn(&P, &Pad) + 'static> = transmute(f);
|
let f: &Box_<Fn(&P, &Pad) + Send + Sync + 'static> = transmute(f);
|
||||||
f(&Pad::from_glib_none(this).downcast_unchecked(), &from_glib_none(peer))
|
f(&Pad::from_glib_none(this).downcast_unchecked(), &from_glib_none(peer))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use Object;
|
use Object;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use Bin;
|
use Bin;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (b155303) from gir-files (???)
|
// This file was generated by gir (531f8d9) from gir-files (???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use Error;
|
use Error;
|
||||||
|
|
Loading…
Reference in a new issue