mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 01:21:05 +00:00
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
This commit is contained in:
parent
337f00a85c
commit
342d5ab935
37 changed files with 1080 additions and 150 deletions
74
Gir_Gst.toml
74
Gir_Gst.toml
|
@ -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"
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
// 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))
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use AppStreamType;
|
||||
|
@ -153,6 +153,28 @@ impl AppSrc {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_property_current_level_bytes(&self) -> u64 {
|
||||
let mut value = Value::from(&0u64);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "current-level-bytes".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get().unwrap()
|
||||
}
|
||||
|
||||
pub fn get_property_duration(&self) -> u64 {
|
||||
let mut value = Value::from(&0u64);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "duration".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get().unwrap()
|
||||
}
|
||||
|
||||
pub fn set_property_duration(&self, duration: u64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "duration".to_glib_none().0, Value::from(&duration).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_format(&self) -> gst::Format {
|
||||
let mut value = Value::from(&0);
|
||||
unsafe {
|
||||
|
@ -182,6 +204,34 @@ impl AppSrc {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_property_max_latency(&self) -> i64 {
|
||||
let mut value = Value::from(&0i64);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "max-latency".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get().unwrap()
|
||||
}
|
||||
|
||||
pub fn set_property_max_latency(&self, max_latency: i64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "max-latency".to_glib_none().0, Value::from(&max_latency).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_min_latency(&self) -> i64 {
|
||||
let mut value = Value::from(&0i64);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "min-latency".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get().unwrap()
|
||||
}
|
||||
|
||||
pub fn set_property_min_latency(&self, min_latency: i64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "min-latency".to_glib_none().0, Value::from(&min_latency).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_min_percent(&self) -> u32 {
|
||||
let mut value = Value::from(&0u32);
|
||||
unsafe {
|
||||
|
@ -219,6 +269,110 @@ impl AppSrc {
|
|||
transmute(seek_data_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_block_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::block",
|
||||
transmute(notify_block_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_caps_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + 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_current_level_bytes_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::current-level-bytes",
|
||||
transmute(notify_current_level_bytes_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_duration_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::duration",
|
||||
transmute(notify_duration_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_emit_signals_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + 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_format_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::format",
|
||||
transmute(notify_format_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_is_live_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::is-live",
|
||||
transmute(notify_is_live_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_max_bytes_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::max-bytes",
|
||||
transmute(notify_max_bytes_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_max_latency_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::max-latency",
|
||||
transmute(notify_max_latency_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_min_latency_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::min-latency",
|
||||
transmute(notify_min_latency_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_min_percent_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::min-percent",
|
||||
transmute(notify_min_percent_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_size_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::size",
|
||||
transmute(notify_size_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_stream_type_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::stream-type",
|
||||
transmute(notify_stream_type_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for AppSrc {}
|
||||
|
@ -241,3 +395,81 @@ unsafe extern "C" fn seek_data_trampoline(this: *mut ffi::GstAppSrc, offset: u64
|
|||
let f: &&(Fn(&AppSrc, u64) -> bool + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this), offset).to_glib()
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_block_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_current_level_bytes_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_format_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_is_live_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_max_bytes_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_max_latency_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_min_latency_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_min_percent_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_size_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_stream_type_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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())
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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))
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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())
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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> {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||
f(&Device::from_glib_none(this).downcast_unchecked())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_properties_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())
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Bus;
|
||||
|
@ -6,11 +6,17 @@ use Caps;
|
|||
use Device;
|
||||
use Object;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::Value;
|
||||
use glib::object::Downcast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
|
@ -57,9 +63,15 @@ pub trait DeviceMonitorExt {
|
|||
fn start(&self) -> bool;
|
||||
|
||||
fn stop(&self);
|
||||
|
||||
fn get_property_show_all(&self) -> bool;
|
||||
|
||||
fn set_property_show_all(&self, show_all: bool);
|
||||
|
||||
fn connect_property_show_all_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||
}
|
||||
|
||||
impl<O: IsA<DeviceMonitor>> DeviceMonitorExt for O {
|
||||
impl<O: IsA<DeviceMonitor> + IsA<glib::object::Object>> DeviceMonitorExt for O {
|
||||
fn add_filter<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Caps>>>(&self, classes: P, caps: Q) -> u32 {
|
||||
let classes = classes.into();
|
||||
let classes = classes.to_glib_none();
|
||||
|
@ -117,4 +129,33 @@ impl<O: IsA<DeviceMonitor>> DeviceMonitorExt for O {
|
|||
ffi::gst_device_monitor_stop(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_show_all(&self) -> bool {
|
||||
let mut value = Value::from(&false);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "show-all".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get().unwrap()
|
||||
}
|
||||
|
||||
fn set_property_show_all(&self, show_all: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "show-all".to_glib_none().0, Value::from(&show_all).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_show_all_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::show-all",
|
||||
transmute(notify_show_all_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_show_all_trampoline<P>(this: *mut ffi::GstDeviceMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
where P: IsA<DeviceMonitor> {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||
f(&DeviceMonitor::from_glib_none(this).downcast_unchecked())
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Bus;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use DeviceProvider;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Bus;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Bin;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Object;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
mod bin;
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
// 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;
|
||||
use Error;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::object::Downcast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
|
@ -92,9 +96,13 @@ pub trait GstObjectExt {
|
|||
fn unparent(&self);
|
||||
|
||||
//fn connect_deep_notify<Unsupported or ignored types>(&self, f: F) -> u64;
|
||||
|
||||
fn connect_property_name_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||
|
||||
fn connect_property_parent_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||
}
|
||||
|
||||
impl<O: IsA<Object>> GstObjectExt for O {
|
||||
impl<O: IsA<Object> + IsA<glib::object::Object>> GstObjectExt for O {
|
||||
//fn add_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool {
|
||||
// unsafe { TODO: call ffi::gst_object_add_control_binding() }
|
||||
//}
|
||||
|
@ -228,4 +236,34 @@ impl<O: IsA<Object>> GstObjectExt for O {
|
|||
//fn connect_deep_notify<Unsupported or ignored types>(&self, f: F) -> u64 {
|
||||
// Ignored prop: GObject.ParamSpec
|
||||
//}
|
||||
|
||||
fn connect_property_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::name",
|
||||
transmute(notify_name_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_parent_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::parent",
|
||||
transmute(notify_parent_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_name_trampoline<P>(this: *mut ffi::GstObject, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
where P: IsA<Object> {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||
f(&Object::from_glib_none(this).downcast_unchecked())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_parent_trampoline<P>(this: *mut ffi::GstObject, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
where P: IsA<Object> {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||
f(&Object::from_glib_none(this).downcast_unchecked())
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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;
|
||||
|
@ -18,6 +18,7 @@ use PadTemplate;
|
|||
use Stream;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::Value;
|
||||
use glib::object::Downcast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect;
|
||||
|
@ -212,9 +213,23 @@ pub trait PadExt {
|
|||
|
||||
fn use_fixed_caps(&self);
|
||||
|
||||
fn get_property_caps(&self) -> Option<Caps>;
|
||||
|
||||
fn get_property_template(&self) -> Option<PadTemplate>;
|
||||
|
||||
fn set_property_template(&self, template: Option<&PadTemplate>);
|
||||
|
||||
fn connect_linked<F: Fn(&Self, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||
|
||||
fn connect_unlinked<F: Fn(&Self, &Pad) + 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_direction_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||
|
||||
fn connect_property_offset_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||
|
||||
fn connect_property_template_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||
}
|
||||
|
||||
impl<O: IsA<Pad> + IsA<glib::object::Object>> PadExt for O {
|
||||
|
@ -606,6 +621,28 @@ impl<O: IsA<Pad> + IsA<glib::object::Object>> PadExt 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_template(&self) -> Option<PadTemplate> {
|
||||
let mut value = Value::from(None::<&PadTemplate>);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "template".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get()
|
||||
}
|
||||
|
||||
fn set_property_template(&self, template: Option<&PadTemplate>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "template".to_glib_none().0, Value::from(template).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_linked<F: Fn(&Self, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&Self, &Pad) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
|
@ -621,6 +658,38 @@ impl<O: IsA<Pad> + IsA<glib::object::Object>> PadExt for O {
|
|||
transmute(unlinked_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_direction_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::direction",
|
||||
transmute(notify_direction_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_offset_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::offset",
|
||||
transmute(notify_offset_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_template_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::template",
|
||||
transmute(notify_template_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn linked_trampoline<P>(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer)
|
||||
|
@ -636,3 +705,31 @@ where P: IsA<Pad> {
|
|||
let f: &&(Fn(&P, &Pad) + Send + Sync + 'static) = transmute(f);
|
||||
f(&Pad::from_glib_none(this).downcast_unchecked(), &from_glib_none(peer))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_caps_trampoline<P>(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
where P: IsA<Pad> {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||
f(&Pad::from_glib_none(this).downcast_unchecked())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_direction_trampoline<P>(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
where P: IsA<Pad> {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||
f(&Pad::from_glib_none(this).downcast_unchecked())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_offset_trampoline<P>(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
where P: IsA<Pad> {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||
f(&Pad::from_glib_none(this).downcast_unchecked())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_template_trampoline<P>(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
where P: IsA<Pad> {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||
f(&Pad::from_glib_none(this).downcast_unchecked())
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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;
|
||||
|
@ -77,6 +77,38 @@ impl PadTemplate {
|
|||
transmute(pad_created_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_caps_notify<F: Fn(&PadTemplate) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&PadTemplate) + 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_direction_notify<F: Fn(&PadTemplate) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&PadTemplate) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::direction",
|
||||
transmute(notify_direction_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_name_template_notify<F: Fn(&PadTemplate) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&PadTemplate) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::name-template",
|
||||
transmute(notify_name_template_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_presence_notify<F: Fn(&PadTemplate) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&PadTemplate) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::presence",
|
||||
transmute(notify_presence_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for PadTemplate {}
|
||||
|
@ -87,3 +119,27 @@ unsafe extern "C" fn pad_created_trampoline(this: *mut ffi::GstPadTemplate, pad:
|
|||
let f: &&(Fn(&PadTemplate, &Pad) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this), &from_glib_none(pad))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstPadTemplate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&PadTemplate) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_direction_trampoline(this: *mut ffi::GstPadTemplate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&PadTemplate) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_name_template_trampoline(this: *mut ffi::GstPadTemplate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&PadTemplate) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_presence_trampoline(this: *mut ffi::GstPadTemplate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&PadTemplate) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Bin;
|
||||
|
@ -8,12 +8,16 @@ use ClockTime;
|
|||
use Element;
|
||||
use Object;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::object::Downcast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
|
@ -56,9 +60,15 @@ pub trait PipelineExt {
|
|||
fn set_latency(&self, latency: ClockTime);
|
||||
|
||||
fn use_clock<'a, P: IsA<Clock> + 'a, Q: Into<Option<&'a P>>>(&self, clock: Q);
|
||||
|
||||
fn connect_property_auto_flush_bus_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||
|
||||
fn connect_property_delay_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||
|
||||
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||
}
|
||||
|
||||
impl<O: IsA<Pipeline>> PipelineExt for O {
|
||||
impl<O: IsA<Pipeline> + IsA<glib::object::Object>> PipelineExt for O {
|
||||
fn auto_clock(&self) {
|
||||
unsafe {
|
||||
ffi::gst_pipeline_auto_clock(self.to_glib_none().0);
|
||||
|
@ -114,4 +124,49 @@ impl<O: IsA<Pipeline>> PipelineExt for O {
|
|||
ffi::gst_pipeline_use_clock(self.to_glib_none().0, clock.0);
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_auto_flush_bus_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::auto-flush-bus",
|
||||
transmute(notify_auto_flush_bus_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_delay_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::delay",
|
||||
transmute(notify_delay_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_latency_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::latency",
|
||||
transmute(notify_latency_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_auto_flush_bus_trampoline<P>(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
where P: IsA<Pipeline> {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||
f(&Pipeline::from_glib_none(this).downcast_unchecked())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_delay_trampoline<P>(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
where P: IsA<Pipeline> {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||
f(&Pipeline::from_glib_none(this).downcast_unchecked())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_latency_trampoline<P>(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
where P: IsA<Pipeline> {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||
f(&Pipeline::from_glib_none(this).downcast_unchecked())
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Iterator;
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
use Caps;
|
||||
use Object;
|
||||
#[cfg(feature = "v1_10")]
|
||||
use StreamFlags;
|
||||
#[cfg(feature = "v1_10")]
|
||||
use StreamType;
|
||||
#[cfg(feature = "v1_10")]
|
||||
use TagList;
|
||||
use ffi;
|
||||
use glib::Value;
|
||||
use glib::signal::connect;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
|
@ -104,7 +104,143 @@ impl Stream {
|
|||
ffi::gst_stream_set_tags(self.to_glib_none().0, tags.0);
|
||||
}
|
||||
}
|
||||
|
||||
pub 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()
|
||||
}
|
||||
|
||||
pub fn set_property_caps(&self, caps: Option<&Caps>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "caps".to_glib_none().0, Value::from(caps).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_stream_flags(&self) -> StreamFlags {
|
||||
let mut value = Value::from(&0u32);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "stream-flags".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
from_glib(transmute(value.get::<u32>().unwrap()))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_stream_flags(&self, stream_flags: StreamFlags) {
|
||||
let stream_flags = stream_flags.to_glib().bits() as u32;
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "stream-flags".to_glib_none().0, Value::from(&stream_flags).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_stream_id(&self) -> Option<String> {
|
||||
let mut value = Value::from(None::<&str>);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "stream-id".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get()
|
||||
}
|
||||
|
||||
pub fn get_property_stream_type(&self) -> StreamType {
|
||||
let mut value = Value::from(&0u32);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "stream-type".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
from_glib(transmute(value.get::<u32>().unwrap()))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_stream_type(&self, stream_type: StreamType) {
|
||||
let stream_type = stream_type.to_glib().bits() as u32;
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "stream-type".to_glib_none().0, Value::from(&stream_type).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_tags(&self) -> Option<TagList> {
|
||||
let mut value = Value::from(None::<&TagList>);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "tags".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get()
|
||||
}
|
||||
|
||||
pub fn set_property_tags(&self, tags: Option<&TagList>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "tags".to_glib_none().0, Value::from(tags).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_caps_notify<F: Fn(&Stream) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&Stream) + 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_stream_flags_notify<F: Fn(&Stream) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&Stream) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::stream-flags",
|
||||
transmute(notify_stream_flags_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_stream_id_notify<F: Fn(&Stream) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&Stream) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::stream-id",
|
||||
transmute(notify_stream_id_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_stream_type_notify<F: Fn(&Stream) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&Stream) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::stream-type",
|
||||
transmute(notify_stream_type_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_tags_notify<F: Fn(&Stream) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&Stream) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::tags",
|
||||
transmute(notify_tags_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for Stream {}
|
||||
unsafe impl Sync for Stream {}
|
||||
|
||||
unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&Stream) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_stream_flags_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&Stream) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_stream_id_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&Stream) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_stream_type_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&Stream) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_tags_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&Stream) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Object;
|
||||
#[cfg(feature = "v1_10")]
|
||||
use Stream;
|
||||
use ffi;
|
||||
use glib::Value;
|
||||
use glib::signal::connect;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
|
@ -58,10 +62,38 @@ impl StreamCollection {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_property_upstream_id(&self) -> Option<String> {
|
||||
let mut value = Value::from(None::<&str>);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "upstream-id".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get()
|
||||
}
|
||||
|
||||
pub fn set_property_upstream_id(&self, upstream_id: Option<&str>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "upstream-id".to_glib_none().0, Value::from(upstream_id).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn connect_stream_notify<Unsupported or ignored types>(&self, f: F) -> u64 {
|
||||
// Ignored p0: GObject.ParamSpec
|
||||
//}
|
||||
|
||||
pub fn connect_property_upstream_id_notify<F: Fn(&StreamCollection) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&StreamCollection) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::upstream-id",
|
||||
transmute(notify_upstream_id_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for StreamCollection {}
|
||||
unsafe impl Sync for StreamCollection {}
|
||||
|
||||
unsafe extern "C" fn notify_upstream_id_trampoline(this: *mut ffi::GstStreamCollection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&StreamCollection) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this))
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Clock;
|
||||
|
@ -7,10 +7,13 @@ use Object;
|
|||
use ffi;
|
||||
use glib;
|
||||
use glib::Value;
|
||||
use glib::object::Downcast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
@ -46,6 +49,8 @@ pub trait SystemClockExt {
|
|||
fn get_property_clock_type(&self) -> ClockType;
|
||||
|
||||
fn set_property_clock_type(&self, clock_type: ClockType);
|
||||
|
||||
fn connect_property_clock_type_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||
}
|
||||
|
||||
impl<O: IsA<SystemClock> + IsA<glib::object::Object>> SystemClockExt for O {
|
||||
|
@ -63,4 +68,19 @@ impl<O: IsA<SystemClock> + IsA<glib::object::Object>> SystemClockExt for O {
|
|||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "clock-type".to_glib_none().0, Value::from(&clock_type).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_clock_type_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::clock-type",
|
||||
transmute(notify_clock_type_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_clock_type_trampoline<P>(this: *mut ffi::GstSystemClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
where P: IsA<SystemClock> {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||
f(&SystemClock::from_glib_none(this).downcast_unchecked())
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Element;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Element;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// This file was generated by gir (cfd99ec+) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Error;
|
||||
|
|
Loading…
Reference in a new issue