Commit 342d5ab9 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Add signal connectors for property notifications

Have to hide some properties again at a later time, which have actual
getter/setter functions already. We only need the notification signals
for those.

Depends on the GIR patch in https://github.com/gtk-rs/gir/pull/441
parent 337f00a8
......@@ -40,6 +40,8 @@ generate = [
"Gst.StructureChangeType",
"Gst.StreamStatusType",
"Gst.DeviceProvider",
"Gst.Device",
"Gst.DeviceMonitor",
"Gst.StreamType",
"Gst.StreamFlags",
"Gst.PadLinkReturn",
......@@ -292,38 +294,6 @@ name = "Gst.DeviceProviderFactory"
status = "generate"
trait = false
[[object]]
name = "Gst.Device"
status = "generate"
[[object.property]]
name = "properties"
# Structure is not a GObject
ignore = true
[[object.property]]
name = "caps"
# Caps is not a GObject
ignore = true
[[object.property]]
name = "device-class"
# Has getter/setter functions
ignore = true
[[object.property]]
name = "display-name"
# Has getter/setter functions
ignore = true
[[object]]
name = "Gst.DeviceMonitor"
status = "generate"
[[object.property]]
name = "show-all"
# Has getter/setter functions
ignore = true
[[object]]
name = "Gst.Object"
# For renaming the trait...
......@@ -387,11 +357,6 @@ status = "generate"
[object.function.return]
bool_return_is_error = "Failed to activate mode pad"
[[object.property]]
name = "caps"
# Caps is not a GObject
ignore = true
[[object.function]]
name = "remove_probe"
# Don't use a ulong
......@@ -417,11 +382,6 @@ status = "generate"
# Buffer can be NULL
ignore = true
[[object.property]]
name = "template"
# Has getter/setter functions
ignore = true
[[object.function]]
name = "query"
# Correct mutability
......@@ -506,41 +466,11 @@ name = "Gst.Stream"
status = "generate"
trait = false
[[object.property]]
name = "caps"
# Caps is not a GObject
ignore = true
[[object.property]]
name = "tags"
# TagList is not a GObject
ignore = true
[[object.property]]
name = "stream-flags"
# Has setter/getter functions
ignore = true
[[object.property]]
name = "stream-id"
# Has setter/getter functions
ignore = true
[[object.property]]
name = "stream-type"
# Has setter/getter functions
ignore = true
[[object]]
name = "Gst.StreamCollection"
status = "generate"
trait = false
[[object.property]]
name = "upstream-id"
# Has setter/getter functions
ignore = true
[[object]]
name = "Gst.Plugin"
status = "generate"
......
......@@ -32,16 +32,6 @@ name = "GstApp.AppSink"
status = "generate"
trait = false
[[object.property]]
name = "buffer-list"
# Has getter function
ignore = true
[[object.property]]
name = "eos"
# Has getter function
ignore = true
[[object.signal]]
name = "pull-sample"
# Action signal
......@@ -87,32 +77,6 @@ trait = false
# Action signal
ignore = true
[[object.property]]
name = "current-level-bytes"
# Has getter function
ignore = true
[[object.property]]
name = "duration"
# Has getter function
ignore = true
[[object.property]]
name = "max-latency"
# Has getter function
ignore = true
[[object.property]]
name = "min-latency"
# Has getter function
ignore = true
[[object.property]]
name = "stream-type"
# Has getter function
ignore = true
[[object]]
name = "Gst.Structure"
status = "manual"
......
// This file was generated by gir (3294959) from gir-files (???)
// This file was generated by gir (cfd99ec+) from gir-files (???)
// DO NOT EDIT
use ffi;
use glib::Value;
use glib::signal::connect;
use glib::translate::*;
use glib_ffi;
......@@ -135,6 +136,28 @@ impl AppSink {
}
}
pub fn get_property_buffer_list(&self) -> bool {
let mut value = Value::from(&false);
unsafe {
gobject_ffi::g_object_get_property(self.to_glib_none().0, "buffer-list".to_glib_none().0, value.to_glib_none_mut().0);
}
value.get().unwrap()
}
pub fn set_property_buffer_list(&self, buffer_list: bool) {
unsafe {
gobject_ffi::g_object_set_property(self.to_glib_none().0, "buffer-list".to_glib_none().0, Value::from(&buffer_list).to_glib_none().0);
}
}
pub fn get_property_eos(&self) -> bool {
let mut value = Value::from(&false);
unsafe {
gobject_ffi::g_object_get_property(self.to_glib_none().0, "eos".to_glib_none().0, value.to_glib_none_mut().0);
}
value.get().unwrap()
}
pub fn connect_eos<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
......@@ -158,6 +181,62 @@ impl AppSink {
transmute(new_sample_trampoline as usize), Box_::into_raw(f) as *mut _)
}
}
pub fn connect_property_buffer_list_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::buffer-list",
transmute(notify_buffer_list_trampoline as usize), Box_::into_raw(f) as *mut _)
}
}
pub fn connect_property_caps_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::caps",
transmute(notify_caps_trampoline as usize), Box_::into_raw(f) as *mut _)
}
}
pub fn connect_property_drop_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::drop",
transmute(notify_drop_trampoline as usize), Box_::into_raw(f) as *mut _)
}
}
pub fn connect_property_emit_signals_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::emit-signals",
transmute(notify_emit_signals_trampoline as usize), Box_::into_raw(f) as *mut _)
}
}
pub fn connect_property_eos_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::eos",
transmute(notify_eos_trampoline as usize), Box_::into_raw(f) as *mut _)
}
}
pub fn connect_property_max_buffers_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::max-buffers",
transmute(notify_max_buffers_trampoline as usize), Box_::into_raw(f) as *mut _)
}
}
pub fn connect_property_wait_on_eos_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::wait-on-eos",
transmute(notify_wait_on_eos_trampoline as usize), Box_::into_raw(f) as *mut _)
}
}
}
unsafe impl Send for AppSink {}
......@@ -180,3 +259,45 @@ unsafe extern "C" fn new_sample_trampoline(this: *mut ffi::GstAppSink, f: glib_f
let f: &&(Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this)).to_glib()
}
unsafe extern "C" fn notify_buffer_list_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
}
unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
}
unsafe extern "C" fn notify_drop_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
}
unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
}
unsafe extern "C" fn notify_eos_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
}
unsafe extern "C" fn notify_max_buffers_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
}
unsafe extern "C" fn notify_wait_on_eos_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
}
This diff is collapsed.
// This file was generated by gir (3294959) from gir-files (???)
// This file was generated by gir (cfd99ec+) from gir-files (???)
// DO NOT EDIT
use ffi;
......
// This file was generated by gir (3294959) from gir-files (???)
// This file was generated by gir (cfd99ec+) from gir-files (???)
// DO NOT EDIT
use ffi;
......
// This file was generated by gir (3294959) from gir-files (???)
// This file was generated by gir (cfd99ec+) from gir-files (???)
// DO NOT EDIT
mod app_sink;
......
// This file was generated by gir (651da6e) from gir-files (???)
// This file was generated by gir (cfd99ec+) from gir-files (???)
// DO NOT EDIT
#[allow(unused_imports)]
......
// This file was generated by gir (651da6e) from gir-files (???)
// This file was generated by gir (cfd99ec+) from gir-files (???)
// DO NOT EDIT
use ChildProxy;
......@@ -103,6 +103,10 @@ pub trait BinExt {
fn connect_element_added<F: Fn(&Self, &Element) + Send + Sync + 'static>(&self, f: F) -> u64;
fn connect_element_removed<F: Fn(&Self, &Element) + Send + Sync + 'static>(&self, f: F) -> u64;
fn connect_property_async_handling_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
fn connect_property_message_forward_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
}
impl<O: IsA<Bin> + IsA<glib::object::Object>> BinExt for O {
......@@ -281,6 +285,22 @@ impl<O: IsA<Bin> + IsA<glib::object::Object>> BinExt for O {
transmute(element_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_async_handling_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::async-handling",
transmute(notify_async_handling_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_message_forward_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::message-forward",
transmute(notify_message_forward_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
}
#[cfg(feature = "v1_10")]
......@@ -319,3 +339,17 @@ where P: IsA<Bin> {
let f: &&(Fn(&P, &Element) + Send + Sync + 'static) = transmute(f);
f(&Bin::from_glib_none(this).downcast_unchecked(), &from_glib_none(element))
}
unsafe extern "C" fn notify_async_handling_trampoline<P>(this: *mut ffi::GstBin, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Bin> {
callback_guard!();
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
f(&Bin::from_glib_none(this).downcast_unchecked())
}
unsafe extern "C" fn notify_message_forward_trampoline<P>(this: *mut ffi::GstBin, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Bin> {
callback_guard!();
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
f(&Bin::from_glib_none(this).downcast_unchecked())
}
// This file was generated by gir (651da6e) from gir-files (???)
// This file was generated by gir (cfd99ec+) from gir-files (???)
// DO NOT EDIT
use ClockTime;
......@@ -131,6 +131,14 @@ impl Bus {
transmute(sync_message_trampoline as usize), Box_::into_raw(f) as *mut _)
}
}
pub fn connect_property_enable_async_notify<F: Fn(&Bus) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&Bus) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::enable-async",
transmute(notify_enable_async_trampoline as usize), Box_::into_raw(f) as *mut _)
}
}
}
impl Default for Bus {
......@@ -153,3 +161,9 @@ unsafe extern "C" fn sync_message_trampoline(this: *mut ffi::GstBus, message: *m
let f: &&(Fn(&Bus, &Message) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this), &from_glib_none(message))
}
unsafe extern "C" fn notify_enable_async_trampoline(this: *mut ffi::GstBus, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&Bus) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
}
// This file was generated by gir (651da6e) from gir-files (???)
// This file was generated by gir (cfd99ec+) from gir-files (???)
// DO NOT EDIT
use ffi;
......
// This file was generated by gir (651da6e) from gir-files (???)
// This file was generated by gir (cfd99ec+) from gir-files (???)
// DO NOT EDIT
use ClockTime;
......@@ -114,6 +114,12 @@ pub trait ClockExt {
fn set_property_window_threshold(&self, window_threshold: i32);
fn connect_synced<F: Fn(&Self, bool) + Send + Sync + 'static>(&self, f: F) -> u64;
fn connect_property_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
fn connect_property_window_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
fn connect_property_window_threshold_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
}
impl<O: IsA<Clock> + IsA<glib::object::Object>> ClockExt for O {
......@@ -297,6 +303,30 @@ impl<O: IsA<Clock> + IsA<glib::object::Object>> ClockExt for O {
transmute(synced_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::timeout",
transmute(notify_timeout_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_window_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::window-size",
transmute(notify_window_size_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_window_threshold_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::window-threshold",
transmute(notify_window_threshold_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
}
unsafe extern "C" fn synced_trampoline<P>(this: *mut ffi::GstClock, synced: glib_ffi::gboolean, f: glib_ffi::gpointer)
......@@ -305,3 +335,24 @@ where P: IsA<Clock> {
let f: &&(Fn(&P, bool) + Send + Sync + 'static) = transmute(f);
f(&Clock::from_glib_none(this).downcast_unchecked(), from_glib(synced))
}
unsafe extern "C" fn notify_timeout_trampoline<P>(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Clock> {
callback_guard!();
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
f(&Clock::from_glib_none(this).downcast_unchecked())
}
unsafe extern "C" fn notify_window_size_trampoline<P>(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Clock> {
callback_guard!();
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
f(&Clock::from_glib_none(this).downcast_unchecked())
}
unsafe extern "C" fn notify_window_threshold_trampoline<P>(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Clock> {
callback_guard!();
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
f(&Clock::from_glib_none(this).downcast_unchecked())
}
// This file was generated by gir (651da6e) from gir-files (???)
// This file was generated by gir (cfd99ec+) from gir-files (???)
// DO NOT EDIT
use ffi;
......
// This file was generated by gir (651da6e) from gir-files (???)
// This file was generated by gir (cfd99ec+) from gir-files (???)
// DO NOT EDIT
use Caps;
......@@ -7,6 +7,7 @@ use Object;
use Structure;
use ffi;
use glib;
use glib::Value;
use glib::object::Downcast;
use glib::object::IsA;
use glib::signal::connect;
......@@ -46,7 +47,23 @@ pub trait DeviceExt {
fn reconfigure_element<P: IsA<Element>>(&self, element: &P) -> bool;
fn get_property_caps(&self) -> Option<Caps>;
fn get_property_device_class(&self) -> Option<String>;
fn get_property_display_name(&self) -> Option<String>;
fn get_property_properties(&self) -> Option<Structure>;
fn connect_removed<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
fn connect_property_caps_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
fn connect_property_device_class_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
fn connect_property_display_name_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
fn connect_property_properties_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
}
impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {
......@@ -100,6 +117,38 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {
}
}
fn get_property_caps(&self) -> Option<Caps> {
let mut value = Value::from(None::<&Caps>);
unsafe {
gobject_ffi::g_object_get_property(self.to_glib_none().0, "caps".to_glib_none().0, value.to_glib_none_mut().0);
}
value.get()
}
fn get_property_device_class(&self) -> Option<String> {
let mut value = Value::from(None::<&str>);
unsafe {
gobject_ffi::g_object_get_property(self.to_glib_none().0, "device-class".to_glib_none().0, value.to_glib_none_mut().0);
}
value.get()
}
fn get_property_display_name(&self) -> Option<String> {
let mut value = Value::from(None::<&str>);
unsafe {
gobject_ffi::g_object_get_property(self.to_glib_none().0, "display-name".to_glib_none().0, value.to_glib_none_mut().0);
}
value.get()
}
fn get_property_properties(&self) -> Option<Structure> {
let mut value = Value::from(None::<&Structure>);
unsafe {
gobject_ffi::g_object_get_property(self.to_glib_none().0, "properties".to_glib_none().0, value.to_glib_none_mut().0);
}
value.get()
}
fn connect_removed<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
......@@ -107,6 +156,38 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {
transmute(removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_caps_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::caps",
transmute(notify_caps_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_device_class_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::device-class",
transmute(notify_device_class_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_display_name_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::display-name",
transmute(notify_display_name_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_properties_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64 {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::properties",
transmute(notify_properties_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
}
unsafe extern "C" fn removed_trampoline<P>(this: *mut ffi::GstDevice, f: glib_ffi::gpointer)
......@@ -115,3 +196,31 @@ where P: IsA<Device> {
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
f(&Device::from_glib_none(this).downcast_unchecked())
}
unsafe extern "C" fn notify_caps_trampoline<P>(this: *mut ffi::GstDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Device> {
callback_guard!();
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
f(&Device::from_glib_none(this).downcast_unchecked())
}
unsafe extern "C" fn notify_device_class_trampoline<P>(this: *mut ffi::GstDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Device> {
callback_guard!();
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
f(&Device::from_glib_none(this).downcast_unchecked())
}
unsafe extern "C" fn notify_display_name_trampoline<P>(this: *mut ffi::GstDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Device> {