diff --git a/Gir_Gst.toml b/Gir_Gst.toml index 27ddf3220..2dda60f72 100644 --- a/Gir_Gst.toml +++ b/Gir_Gst.toml @@ -8,6 +8,7 @@ work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true single_version_file = true +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstApp.toml b/Gir_GstApp.toml index 825f24806..7bf5b13c0 100644 --- a/Gir_GstApp.toml +++ b/Gir_GstApp.toml @@ -8,6 +8,7 @@ work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true single_version_file = true +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstAudio.toml b/Gir_GstAudio.toml index 2251ac268..1a0b8873a 100644 --- a/Gir_GstAudio.toml +++ b/Gir_GstAudio.toml @@ -8,6 +8,7 @@ work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true single_version_file = true +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstBase.toml b/Gir_GstBase.toml index de9b128da..dfe5d6ed5 100644 --- a/Gir_GstBase.toml +++ b/Gir_GstBase.toml @@ -8,6 +8,7 @@ work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true single_version_file = true +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstCheck.toml b/Gir_GstCheck.toml index 7f71d3bab..7b272d72c 100644 --- a/Gir_GstCheck.toml +++ b/Gir_GstCheck.toml @@ -8,6 +8,7 @@ work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true single_version_file = true +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstEditingServices.toml b/Gir_GstEditingServices.toml index 88d480826..b8b584c99 100644 --- a/Gir_GstEditingServices.toml +++ b/Gir_GstEditingServices.toml @@ -7,6 +7,7 @@ target_path = "gstreamer-editing-services" work_mode = "normal" generate_safety_asserts = true single_version_file = true +generate_display_trait = false external_libraries = [ "GLib", @@ -169,4 +170,4 @@ trait_name = "GESTrackExt" [[object.function]] name = "remove_element" [object.function.return] - bool_return_is_error = "Failed to remove element" \ No newline at end of file + bool_return_is_error = "Failed to remove element" diff --git a/Gir_GstGL.toml b/Gir_GstGL.toml index 9efddf1ae..ec1e69282 100644 --- a/Gir_GstGL.toml +++ b/Gir_GstGL.toml @@ -8,6 +8,7 @@ work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true single_version_file = true +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstNet.toml b/Gir_GstNet.toml index 278bf0e17..2b1a51e8d 100644 --- a/Gir_GstNet.toml +++ b/Gir_GstNet.toml @@ -8,6 +8,7 @@ work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true single_version_file = true +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstPbutils.toml b/Gir_GstPbutils.toml index 4289fd138..17edcbef6 100644 --- a/Gir_GstPbutils.toml +++ b/Gir_GstPbutils.toml @@ -8,6 +8,7 @@ work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true single_version_file = true +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstPlayer.toml b/Gir_GstPlayer.toml index 81b53125e..40a794ece 100644 --- a/Gir_GstPlayer.toml +++ b/Gir_GstPlayer.toml @@ -8,6 +8,7 @@ work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true single_version_file = true +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstRtsp.toml b/Gir_GstRtsp.toml index a562fe4b5..7db7960b7 100644 --- a/Gir_GstRtsp.toml +++ b/Gir_GstRtsp.toml @@ -9,6 +9,7 @@ concurrency = "send+sync" generate_safety_asserts = true single_version_file = true doc_target_path = "docs/gstreamer-rtsp/docs.md" +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstRtspServer.toml b/Gir_GstRtspServer.toml index 8305553b5..9d325607e 100644 --- a/Gir_GstRtspServer.toml +++ b/Gir_GstRtspServer.toml @@ -9,6 +9,7 @@ concurrency = "send+sync" generate_safety_asserts = true single_version_file = true doc_target_path = "docs/gstreamer-rtsp-server/docs.md" +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstSdp.toml b/Gir_GstSdp.toml index 88c8d134e..87c14e29a 100644 --- a/Gir_GstSdp.toml +++ b/Gir_GstSdp.toml @@ -9,6 +9,7 @@ concurrency = "send" generate_safety_asserts = true single_version_file = true doc_target_path = "docs/gstreamer-sdp/docs.md" +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstVideo.toml b/Gir_GstVideo.toml index e99f4767a..56a6a52c9 100644 --- a/Gir_GstVideo.toml +++ b/Gir_GstVideo.toml @@ -8,6 +8,7 @@ work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true single_version_file = true +generate_display_trait = false external_libraries = [ "GLib", diff --git a/Gir_GstWebRTC.toml b/Gir_GstWebRTC.toml index 9501e05b1..be750bbb2 100644 --- a/Gir_GstWebRTC.toml +++ b/Gir_GstWebRTC.toml @@ -8,6 +8,7 @@ work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true single_version_file = true +generate_display_trait = false external_libraries = [ "GLib", diff --git a/gstreamer-app/src/auto/app_sink.rs b/gstreamer-app/src/auto/app_sink.rs index a0155d1b5..609c0865d 100644 --- a/gstreamer-app/src/auto/app_sink.rs +++ b/gstreamer-app/src/auto/app_sink.rs @@ -6,7 +6,7 @@ use ffi; use glib::StaticType; use glib::Value; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; @@ -15,9 +15,7 @@ use gst_base; use gst_base_ffi; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct AppSink(Object): [ @@ -148,21 +146,21 @@ impl AppSink { pub fn get_property_buffer_list(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "buffer-list".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"buffer-list\0".as_ptr() as *const _, 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"buffer-list\0".as_ptr() as *const _, Value::from(&buffer_list).to_glib_none().0); } } pub fn get_property_eos(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "eos".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"eos\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -170,7 +168,7 @@ impl AppSink { pub fn connect_eos(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "eos", + connect_raw(self.to_glib_none().0, b"eos\0".as_ptr() as *const _, transmute(eos_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -178,7 +176,7 @@ impl AppSink { pub fn connect_new_preroll gst::FlowReturn + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ gst::FlowReturn + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "new-preroll", + connect_raw(self.to_glib_none().0, b"new-preroll\0".as_ptr() as *const _, transmute(new_preroll_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -186,7 +184,7 @@ impl AppSink { pub fn connect_new_sample gst::FlowReturn + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ gst::FlowReturn + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "new-sample", + connect_raw(self.to_glib_none().0, b"new-sample\0".as_ptr() as *const _, transmute(new_sample_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -194,7 +192,7 @@ impl AppSink { pub fn connect_property_buffer_list_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::buffer-list", + connect_raw(self.to_glib_none().0, b"notify::buffer-list\0".as_ptr() as *const _, transmute(notify_buffer_list_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -202,7 +200,7 @@ impl AppSink { pub fn connect_property_caps_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::caps", + connect_raw(self.to_glib_none().0, b"notify::caps\0".as_ptr() as *const _, transmute(notify_caps_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -210,7 +208,7 @@ impl AppSink { pub fn connect_property_drop_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::drop", + connect_raw(self.to_glib_none().0, b"notify::drop\0".as_ptr() as *const _, transmute(notify_drop_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -218,7 +216,7 @@ impl AppSink { pub fn connect_property_emit_signals_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::emit-signals", + connect_raw(self.to_glib_none().0, b"notify::emit-signals\0".as_ptr() as *const _, transmute(notify_emit_signals_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -226,7 +224,7 @@ impl AppSink { pub fn connect_property_eos_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::eos", + connect_raw(self.to_glib_none().0, b"notify::eos\0".as_ptr() as *const _, transmute(notify_eos_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -234,7 +232,7 @@ impl AppSink { pub fn connect_property_max_buffers_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::max-buffers", + connect_raw(self.to_glib_none().0, b"notify::max-buffers\0".as_ptr() as *const _, transmute(notify_max_buffers_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -242,7 +240,7 @@ impl AppSink { pub fn connect_property_wait_on_eos_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::wait-on-eos", + connect_raw(self.to_glib_none().0, b"notify::wait-on-eos\0".as_ptr() as *const _, transmute(notify_wait_on_eos_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-app/src/auto/app_src.rs b/gstreamer-app/src/auto/app_src.rs index e490a6f66..22370df04 100644 --- a/gstreamer-app/src/auto/app_src.rs +++ b/gstreamer-app/src/auto/app_src.rs @@ -7,7 +7,7 @@ use ffi; use glib::StaticType; use glib::Value; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; @@ -17,9 +17,7 @@ use gst_base_ffi; use gst_ffi; use libc; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct AppSrc(Object): [ @@ -136,105 +134,105 @@ impl AppSrc { pub fn get_property_block(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "block".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"block\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_block(&self, block: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "block".to_glib_none().0, Value::from(&block).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"block\0".as_ptr() as *const _, Value::from(&block).to_glib_none().0); } } pub fn get_property_duration(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "duration".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"duration\0".as_ptr() as *const _, 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0); } } pub fn get_property_format(&self) -> gst::Format { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "format".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"format\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_format(&self, format: gst::Format) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "format".to_glib_none().0, Value::from(&format).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"format\0".as_ptr() as *const _, Value::from(&format).to_glib_none().0); } } pub fn get_property_is_live(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "is-live".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"is-live\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_is_live(&self, is_live: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "is-live".to_glib_none().0, Value::from(&is_live).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"is-live\0".as_ptr() as *const _, Value::from(&is_live).to_glib_none().0); } } pub fn get_property_max_latency(&self) -> i64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "max-latency".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"max-latency\0".as_ptr() as *const _, 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"max-latency\0".as_ptr() as *const _, Value::from(&max_latency).to_glib_none().0); } } pub fn get_property_min_latency(&self) -> i64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "min-latency".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"min-latency\0".as_ptr() as *const _, 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"min-latency\0".as_ptr() as *const _, Value::from(&min_latency).to_glib_none().0); } } pub fn get_property_min_percent(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "min-percent".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"min-percent\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_min_percent(&self, min_percent: u32) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "min-percent".to_glib_none().0, Value::from(&min_percent).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"min-percent\0".as_ptr() as *const _, Value::from(&min_percent).to_glib_none().0); } } pub fn connect_enough_data(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "enough-data", + connect_raw(self.to_glib_none().0, b"enough-data\0".as_ptr() as *const _, transmute(enough_data_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -242,7 +240,7 @@ impl AppSrc { pub fn connect_need_data(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "need-data", + connect_raw(self.to_glib_none().0, b"need-data\0".as_ptr() as *const _, transmute(need_data_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -250,7 +248,7 @@ impl AppSrc { pub fn connect_seek_data bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ bool + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "seek-data", + connect_raw(self.to_glib_none().0, b"seek-data\0".as_ptr() as *const _, transmute(seek_data_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -258,7 +256,7 @@ impl AppSrc { pub fn connect_property_block_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::block", + connect_raw(self.to_glib_none().0, b"notify::block\0".as_ptr() as *const _, transmute(notify_block_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -266,7 +264,7 @@ impl AppSrc { pub fn connect_property_caps_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::caps", + connect_raw(self.to_glib_none().0, b"notify::caps\0".as_ptr() as *const _, transmute(notify_caps_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -274,7 +272,7 @@ impl AppSrc { pub fn connect_property_current_level_bytes_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::current-level-bytes", + connect_raw(self.to_glib_none().0, b"notify::current-level-bytes\0".as_ptr() as *const _, transmute(notify_current_level_bytes_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -282,7 +280,7 @@ impl AppSrc { pub fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::duration", + connect_raw(self.to_glib_none().0, b"notify::duration\0".as_ptr() as *const _, transmute(notify_duration_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -290,7 +288,7 @@ impl AppSrc { pub fn connect_property_emit_signals_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::emit-signals", + connect_raw(self.to_glib_none().0, b"notify::emit-signals\0".as_ptr() as *const _, transmute(notify_emit_signals_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -298,7 +296,7 @@ impl AppSrc { pub fn connect_property_format_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::format", + connect_raw(self.to_glib_none().0, b"notify::format\0".as_ptr() as *const _, transmute(notify_format_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -306,7 +304,7 @@ impl AppSrc { pub fn connect_property_is_live_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::is-live", + connect_raw(self.to_glib_none().0, b"notify::is-live\0".as_ptr() as *const _, transmute(notify_is_live_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -314,7 +312,7 @@ impl AppSrc { pub fn connect_property_max_bytes_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::max-bytes", + connect_raw(self.to_glib_none().0, b"notify::max-bytes\0".as_ptr() as *const _, transmute(notify_max_bytes_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -322,7 +320,7 @@ impl AppSrc { pub fn connect_property_max_latency_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::max-latency", + connect_raw(self.to_glib_none().0, b"notify::max-latency\0".as_ptr() as *const _, transmute(notify_max_latency_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -330,7 +328,7 @@ impl AppSrc { pub fn connect_property_min_latency_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::min-latency", + connect_raw(self.to_glib_none().0, b"notify::min-latency\0".as_ptr() as *const _, transmute(notify_min_latency_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -338,7 +336,7 @@ impl AppSrc { pub fn connect_property_min_percent_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::min-percent", + connect_raw(self.to_glib_none().0, b"notify::min-percent\0".as_ptr() as *const _, transmute(notify_min_percent_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -346,7 +344,7 @@ impl AppSrc { pub fn connect_property_size_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::size", + connect_raw(self.to_glib_none().0, b"notify::size\0".as_ptr() as *const _, transmute(notify_size_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -354,7 +352,7 @@ impl AppSrc { pub fn connect_property_stream_type_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::stream-type", + connect_raw(self.to_glib_none().0, b"notify::stream-type\0".as_ptr() as *const _, transmute(notify_stream_type_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-app/src/auto/versions.txt b/gstreamer-app/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-app/src/auto/versions.txt +++ b/gstreamer-app/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-audio/src/auto/audio_stream_align.rs b/gstreamer-audio/src/auto/audio_stream_align.rs index 9fead9394..4175aa93c 100644 --- a/gstreamer-audio/src/auto/audio_stream_align.rs +++ b/gstreamer-audio/src/auto/audio_stream_align.rs @@ -3,13 +3,10 @@ // DO NOT EDIT use ffi; +#[cfg(any(feature = "v1_14", feature = "dox"))] use glib::translate::*; -use glib_ffi; -use gobject_ffi; #[cfg(any(feature = "v1_14", feature = "dox"))] use gst; -use std::mem; -use std::ptr; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/gstreamer-audio/src/auto/stream_volume.rs b/gstreamer-audio/src/auto/stream_volume.rs index aba3294ef..ae5e5ad7c 100644 --- a/gstreamer-audio/src/auto/stream_volume.rs +++ b/gstreamer-audio/src/auto/stream_volume.rs @@ -4,18 +4,14 @@ use StreamVolumeFormat; use ffi; -use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct StreamVolume(Object); @@ -37,7 +33,7 @@ impl StreamVolume { unsafe impl Send for StreamVolume {} unsafe impl Sync for StreamVolume {} -pub trait StreamVolumeExt { +pub trait StreamVolumeExt: 'static { fn get_mute(&self) -> bool; fn get_volume(&self, format: StreamVolumeFormat) -> f64; @@ -51,7 +47,7 @@ pub trait StreamVolumeExt { fn connect_property_volume_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> StreamVolumeExt for O { +impl> StreamVolumeExt for O { fn get_mute(&self) -> bool { unsafe { from_glib(ffi::gst_stream_volume_get_mute(self.to_glib_none().0)) @@ -79,7 +75,7 @@ impl + IsA> StreamVolumeExt for O { fn connect_property_mute_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::mute", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::mute\0".as_ptr() as *const _, transmute(notify_mute_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -87,7 +83,7 @@ impl + IsA> StreamVolumeExt for O { fn connect_property_volume_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::volume", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::volume\0".as_ptr() as *const _, transmute(notify_volume_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-audio/src/auto/versions.txt b/gstreamer-audio/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-audio/src/auto/versions.txt +++ b/gstreamer-audio/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-base/src/auto/adapter.rs b/gstreamer-base/src/auto/adapter.rs index dc4a1c712..ac5a50fba 100644 --- a/gstreamer-base/src/auto/adapter.rs +++ b/gstreamer-base/src/auto/adapter.rs @@ -6,11 +6,8 @@ use ffi; use glib; use glib::ObjectExt; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use std::mem; -use std::ptr; glib_wrapper! { pub struct Adapter(Object); diff --git a/gstreamer-base/src/auto/aggregator.rs b/gstreamer-base/src/auto/aggregator.rs index 1286b302c..a5c999011 100644 --- a/gstreamer-base/src/auto/aggregator.rs +++ b/gstreamer-base/src/auto/aggregator.rs @@ -4,22 +4,19 @@ use AggregatorClass; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct Aggregator(Object): [ @@ -35,7 +32,7 @@ glib_wrapper! { unsafe impl Send for Aggregator {} unsafe impl Sync for Aggregator {} -pub trait AggregatorExt { +pub trait AggregatorExt: 'static { //#[cfg(any(feature = "v1_14", feature = "dox"))] //fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams); @@ -61,7 +58,7 @@ pub trait AggregatorExt { fn connect_property_start_time_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> AggregatorExt for O { +impl> AggregatorExt for O { //#[cfg(any(feature = "v1_14", feature = "dox"))] //fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) { // unsafe { TODO: call ffi::gst_aggregator_get_allocator() } @@ -98,14 +95,14 @@ impl + IsA> AggregatorExt for O { fn get_property_start_time(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "start-time".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start-time\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_start_time(&self, start_time: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "start-time".to_glib_none().0, Value::from(&start_time).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start-time\0".as_ptr() as *const _, Value::from(&start_time).to_glib_none().0); } } @@ -113,7 +110,7 @@ impl + IsA> AggregatorExt for O { fn connect_property_latency_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::latency", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::latency\0".as_ptr() as *const _, transmute(notify_latency_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -121,7 +118,7 @@ impl + IsA> AggregatorExt for O { fn connect_property_start_time_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::start-time", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::start-time\0".as_ptr() as *const _, transmute(notify_start_time_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-base/src/auto/aggregator_pad.rs b/gstreamer-base/src/auto/aggregator_pad.rs index 86b349a42..0221644af 100644 --- a/gstreamer-base/src/auto/aggregator_pad.rs +++ b/gstreamer-base/src/auto/aggregator_pad.rs @@ -6,12 +6,8 @@ use AggregatorPadClass; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct AggregatorPad(Object): [ @@ -27,7 +23,7 @@ glib_wrapper! { unsafe impl Send for AggregatorPad {} unsafe impl Sync for AggregatorPad {} -pub trait AggregatorPadExt { +pub trait AggregatorPadExt: 'static { #[cfg(any(feature = "v1_14", feature = "dox"))] fn drop_buffer(&self) -> bool; diff --git a/gstreamer-base/src/auto/base_sink.rs b/gstreamer-base/src/auto/base_sink.rs index ee4e434a3..9f76eb6fb 100644 --- a/gstreamer-base/src/auto/base_sink.rs +++ b/gstreamer-base/src/auto/base_sink.rs @@ -4,13 +4,12 @@ use BaseSinkClass; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; @@ -19,7 +18,6 @@ use gst_ffi; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct BaseSink(Object): [ @@ -35,7 +33,7 @@ glib_wrapper! { unsafe impl Send for BaseSink {} unsafe impl Sync for BaseSink {} -pub trait BaseSinkExt { +pub trait BaseSinkExt: 'static { //fn do_preroll(&self, obj: /*Ignored*/&gst::MiniObject) -> gst::FlowReturn; fn get_blocksize(&self) -> u32; @@ -131,7 +129,7 @@ pub trait BaseSinkExt { fn connect_property_ts_offset_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> BaseSinkExt for O { +impl> BaseSinkExt for O { //fn do_preroll(&self, obj: /*Ignored*/&gst::MiniObject) -> gst::FlowReturn { // unsafe { TODO: call ffi::gst_base_sink_do_preroll() } //} @@ -318,49 +316,49 @@ impl + IsA> BaseSinkExt for O { fn get_property_async(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "async".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"async\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_async(&self, async: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "async".to_glib_none().0, Value::from(&async).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"async\0".as_ptr() as *const _, Value::from(&async).to_glib_none().0); } } fn get_property_enable_last_sample(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "enable-last-sample".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"enable-last-sample\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_enable_last_sample(&self, enable_last_sample: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "enable-last-sample".to_glib_none().0, Value::from(&enable_last_sample).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"enable-last-sample\0".as_ptr() as *const _, Value::from(&enable_last_sample).to_glib_none().0); } } fn get_property_qos(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "qos".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_qos(&self, qos: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "qos".to_glib_none().0, Value::from(&qos).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, Value::from(&qos).to_glib_none().0); } } fn connect_property_async_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::async", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::async\0".as_ptr() as *const _, transmute(notify_async_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -368,7 +366,7 @@ impl + IsA> BaseSinkExt for O { fn connect_property_blocksize_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::blocksize", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::blocksize\0".as_ptr() as *const _, transmute(notify_blocksize_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -376,7 +374,7 @@ impl + IsA> BaseSinkExt for O { fn connect_property_enable_last_sample_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::enable-last-sample", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::enable-last-sample\0".as_ptr() as *const _, transmute(notify_enable_last_sample_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -384,7 +382,7 @@ impl + IsA> BaseSinkExt for O { fn connect_property_last_sample_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::last-sample", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::last-sample\0".as_ptr() as *const _, transmute(notify_last_sample_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -392,7 +390,7 @@ impl + IsA> BaseSinkExt for O { fn connect_property_max_bitrate_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::max-bitrate", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::max-bitrate\0".as_ptr() as *const _, transmute(notify_max_bitrate_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -400,7 +398,7 @@ impl + IsA> BaseSinkExt for O { fn connect_property_max_lateness_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::max-lateness", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::max-lateness\0".as_ptr() as *const _, transmute(notify_max_lateness_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -408,7 +406,7 @@ impl + IsA> BaseSinkExt for O { fn connect_property_qos_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::qos", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::qos\0".as_ptr() as *const _, transmute(notify_qos_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -416,7 +414,7 @@ impl + IsA> BaseSinkExt for O { fn connect_property_render_delay_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::render-delay", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::render-delay\0".as_ptr() as *const _, transmute(notify_render_delay_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -424,7 +422,7 @@ impl + IsA> BaseSinkExt for O { fn connect_property_sync_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::sync", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::sync\0".as_ptr() as *const _, transmute(notify_sync_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -432,7 +430,7 @@ impl + IsA> BaseSinkExt for O { fn connect_property_throttle_time_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::throttle-time", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::throttle-time\0".as_ptr() as *const _, transmute(notify_throttle_time_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -440,7 +438,7 @@ impl + IsA> BaseSinkExt for O { fn connect_property_ts_offset_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::ts-offset", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::ts-offset\0".as_ptr() as *const _, transmute(notify_ts_offset_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-base/src/auto/base_src.rs b/gstreamer-base/src/auto/base_src.rs index 71032b9b1..39396d646 100644 --- a/gstreamer-base/src/auto/base_src.rs +++ b/gstreamer-base/src/auto/base_src.rs @@ -4,13 +4,12 @@ use BaseSrcClass; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; @@ -19,7 +18,6 @@ use gst_ffi; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct BaseSrc(Object): [ @@ -35,7 +33,7 @@ glib_wrapper! { unsafe impl Send for BaseSrc {} unsafe impl Sync for BaseSrc {} -pub trait BaseSrcExt { +pub trait BaseSrcExt: 'static { //fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams); fn get_blocksize(&self) -> u32; @@ -91,7 +89,7 @@ pub trait BaseSrcExt { fn connect_property_typefind_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> BaseSrcExt for O { +impl> BaseSrcExt for O { //fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) { // unsafe { TODO: call ffi::gst_base_src_get_allocator() } //} @@ -211,35 +209,35 @@ impl + IsA> BaseSrcExt for O { fn get_property_num_buffers(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "num-buffers".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"num-buffers\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_num_buffers(&self, num_buffers: i32) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "num-buffers".to_glib_none().0, Value::from(&num_buffers).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"num-buffers\0".as_ptr() as *const _, Value::from(&num_buffers).to_glib_none().0); } } fn get_property_typefind(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "typefind".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"typefind\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_typefind(&self, typefind: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "typefind".to_glib_none().0, Value::from(&typefind).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"typefind\0".as_ptr() as *const _, Value::from(&typefind).to_glib_none().0); } } fn connect_property_blocksize_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::blocksize", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::blocksize\0".as_ptr() as *const _, transmute(notify_blocksize_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -247,7 +245,7 @@ impl + IsA> BaseSrcExt for O { fn connect_property_do_timestamp_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::do-timestamp", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::do-timestamp\0".as_ptr() as *const _, transmute(notify_do_timestamp_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -255,7 +253,7 @@ impl + IsA> BaseSrcExt for O { fn connect_property_num_buffers_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::num-buffers", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::num-buffers\0".as_ptr() as *const _, transmute(notify_num_buffers_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -263,7 +261,7 @@ impl + IsA> BaseSrcExt for O { fn connect_property_typefind_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::typefind", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::typefind\0".as_ptr() as *const _, transmute(notify_typefind_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-base/src/auto/base_transform.rs b/gstreamer-base/src/auto/base_transform.rs index 775c55f6d..43d3816c5 100644 --- a/gstreamer-base/src/auto/base_transform.rs +++ b/gstreamer-base/src/auto/base_transform.rs @@ -4,22 +4,19 @@ use BaseTransformClass; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct BaseTransform(Object): [ @@ -35,7 +32,7 @@ glib_wrapper! { unsafe impl Send for BaseTransform {} unsafe impl Sync for BaseTransform {} -pub trait BaseTransformExt { +pub trait BaseTransformExt: 'static { //fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams); fn get_buffer_pool(&self) -> Option; @@ -71,7 +68,7 @@ pub trait BaseTransformExt { fn connect_property_qos_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> BaseTransformExt for O { +impl> BaseTransformExt for O { //fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) { // unsafe { TODO: call ffi::gst_base_transform_get_allocator() } //} @@ -157,21 +154,21 @@ impl + IsA> BaseTransformExt for O { fn get_property_qos(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "qos".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_qos(&self, qos: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "qos".to_glib_none().0, Value::from(&qos).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, Value::from(&qos).to_glib_none().0); } } fn connect_property_qos_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::qos", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::qos\0".as_ptr() as *const _, transmute(notify_qos_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-base/src/auto/push_src.rs b/gstreamer-base/src/auto/push_src.rs index 8db214151..9032e4734 100644 --- a/gstreamer-base/src/auto/push_src.rs +++ b/gstreamer-base/src/auto/push_src.rs @@ -5,12 +5,8 @@ use BaseSrc; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct PushSrc(Object): [ diff --git a/gstreamer-base/src/auto/versions.txt b/gstreamer-base/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-base/src/auto/versions.txt +++ b/gstreamer-base/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-base/src/flow_combiner.rs b/gstreamer-base/src/flow_combiner.rs index e9a7f1493..e833a1c02 100644 --- a/gstreamer-base/src/flow_combiner.rs +++ b/gstreamer-base/src/flow_combiner.rs @@ -9,11 +9,8 @@ use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; use gobject_ffi; use gst; -use std::mem; -use std::ptr; glib_wrapper! { pub struct FlowCombiner(Shared); diff --git a/gstreamer-check/src/auto/test_clock.rs b/gstreamer-check/src/auto/test_clock.rs index 219b75678..1ee985b94 100644 --- a/gstreamer-check/src/auto/test_clock.rs +++ b/gstreamer-check/src/auto/test_clock.rs @@ -7,16 +7,14 @@ use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct TestClock(Object): [ @@ -107,21 +105,21 @@ impl TestClock { pub fn get_property_clock_type(&self) -> gst::ClockType { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "clock-type".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"clock-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_clock_type(&self, clock_type: gst::ClockType) { unsafe { - 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"clock-type\0".as_ptr() as *const _, Value::from(&clock_type).to_glib_none().0); } } pub fn get_property_start_time(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "start-time".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"start-time\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -133,7 +131,7 @@ impl TestClock { pub fn connect_property_clock_type_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::clock-type", + connect_raw(self.to_glib_none().0, b"notify::clock-type\0".as_ptr() as *const _, transmute(notify_clock_type_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-check/src/auto/versions.txt b/gstreamer-check/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-check/src/auto/versions.txt +++ b/gstreamer-check/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-editing-services/src/auto/asset.rs b/gstreamer-editing-services/src/auto/asset.rs index a3361fc51..30d2f9678 100644 --- a/gstreamer-editing-services/src/auto/asset.rs +++ b/gstreamer-editing-services/src/auto/asset.rs @@ -14,12 +14,11 @@ use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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; @@ -92,7 +91,7 @@ impl Asset { } } -pub trait AssetExt { +pub trait AssetExt: 'static { fn extract(&self) -> Result, Error>; fn get_error(&self) -> Option; @@ -111,14 +110,14 @@ pub trait AssetExt { fn unproxy>(&self, proxy: &P) -> bool; - fn set_property_proxy_target + IsA + glib::value::SetValueOptional>(&self, proxy_target: Option<&P>); + fn set_property_proxy_target + glib::value::SetValueOptional>(&self, proxy_target: Option<&P>); fn connect_property_proxy_notify(&self, f: F) -> SignalHandlerId; fn connect_property_proxy_target_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> AssetExt for O { +impl> AssetExt for O { fn extract(&self) -> Result, Error> { unsafe { let mut error = ptr::null_mut(); @@ -177,16 +176,16 @@ impl + IsA> AssetExt for O { } } - fn set_property_proxy_target + IsA + glib::value::SetValueOptional>(&self, proxy_target: Option<&P>) { + fn set_property_proxy_target + glib::value::SetValueOptional>(&self, proxy_target: Option<&P>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "proxy-target".to_glib_none().0, Value::from(proxy_target).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"proxy-target\0".as_ptr() as *const _, Value::from(proxy_target).to_glib_none().0); } } fn connect_property_proxy_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::proxy", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::proxy\0".as_ptr() as *const _, transmute(notify_proxy_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -194,7 +193,7 @@ impl + IsA> AssetExt for O { fn connect_property_proxy_target_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::proxy-target", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::proxy-target\0".as_ptr() as *const _, transmute(notify_proxy_target_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/base_effect.rs b/gstreamer-editing-services/src/auto/base_effect.rs index a2bd4206e..cc62805ad 100644 --- a/gstreamer-editing-services/src/auto/base_effect.rs +++ b/gstreamer-editing-services/src/auto/base_effect.rs @@ -7,10 +7,6 @@ use TimelineElement; use TrackElement; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct BaseEffect(Object): TrackElement, TimelineElement, Extractable; diff --git a/gstreamer-editing-services/src/auto/clip.rs b/gstreamer-editing-services/src/auto/clip.rs index 960c701c5..3cef9fd55 100644 --- a/gstreamer-editing-services/src/auto/clip.rs +++ b/gstreamer-editing-services/src/auto/clip.rs @@ -16,14 +16,11 @@ use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct Clip(Object): Container, TimelineElement, Extractable; @@ -33,7 +30,7 @@ glib_wrapper! { } } -pub trait ClipExt { +pub trait ClipExt: 'static { fn add_asset>(&self, asset: &P) -> Option; fn find_track_element<'a, P: IsA + 'a, Q: Into>>(&self, track: Q, type_: glib::types::Type) -> Option; @@ -65,7 +62,7 @@ pub trait ClipExt { fn connect_property_supported_formats_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> ClipExt for O { +impl> ClipExt for O { fn add_asset>(&self, asset: &P) -> Option { unsafe { from_glib_none(ffi::ges_clip_add_asset(self.to_glib_none().0, asset.to_glib_none().0)) @@ -151,7 +148,7 @@ impl + IsA> ClipExt for O { fn connect_property_layer_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::layer", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::layer\0".as_ptr() as *const _, transmute(notify_layer_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -159,7 +156,7 @@ impl + IsA> ClipExt for O { fn connect_property_supported_formats_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::supported-formats", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::supported-formats\0".as_ptr() as *const _, transmute(notify_supported_formats_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/container.rs b/gstreamer-editing-services/src/auto/container.rs index 2329747a9..325b0ccaa 100644 --- a/gstreamer-editing-services/src/auto/container.rs +++ b/gstreamer-editing-services/src/auto/container.rs @@ -14,14 +14,12 @@ use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct Container(Object): TimelineElement, Extractable; @@ -40,7 +38,7 @@ impl Container { } } -pub trait GESContainerExt { +pub trait GESContainerExt: 'static { fn add>(&self, child: &P) -> Result<(), glib::error::BoolError>; fn edit(&self, layers: &[Layer], new_layer_priority: i32, mode: EditMode, edge: Edge, position: u64) -> Result<(), glib::error::BoolError>; @@ -60,7 +58,7 @@ pub trait GESContainerExt { fn connect_property_height_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> GESContainerExt for O { +impl> GESContainerExt for O { fn add>(&self, child: &P) -> Result<(), glib::error::BoolError> { unsafe { glib::error::BoolError::from_glib(ffi::ges_container_add(self.to_glib_none().0, child.to_glib_none().0), "Failed to add element") @@ -94,7 +92,7 @@ impl + IsA> GESContainerExt for O { fn get_property_height(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "height".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"height\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -102,7 +100,7 @@ impl + IsA> GESContainerExt for O { fn connect_child_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "child-added", + connect_raw(self.to_glib_none().0 as *mut _, b"child-added\0".as_ptr() as *const _, transmute(child_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -110,7 +108,7 @@ impl + IsA> GESContainerExt for O { fn connect_child_removed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "child-removed", + connect_raw(self.to_glib_none().0 as *mut _, b"child-removed\0".as_ptr() as *const _, transmute(child_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -118,7 +116,7 @@ impl + IsA> GESContainerExt for O { fn connect_property_height_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::height", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::height\0".as_ptr() as *const _, transmute(notify_height_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/effect.rs b/gstreamer-editing-services/src/auto/effect.rs index e8c1b9532..8e7daaf81 100644 --- a/gstreamer-editing-services/src/auto/effect.rs +++ b/gstreamer-editing-services/src/auto/effect.rs @@ -7,15 +7,11 @@ use Extractable; use TimelineElement; use TrackElement; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::IsA; use glib::translate::*; -use glib_ffi; use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct Effect(Object): BaseEffect, TrackElement, TimelineElement, Extractable; @@ -34,15 +30,15 @@ impl Effect { } } -pub trait EffectExt { +pub trait EffectExt: 'static { fn get_property_bin_description(&self) -> Option; } -impl + IsA> EffectExt for O { +impl> EffectExt for O { fn get_property_bin_description(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "bin-description".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"bin-description\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } diff --git a/gstreamer-editing-services/src/auto/extractable.rs b/gstreamer-editing-services/src/auto/extractable.rs index ec4fdeede..c505e361c 100644 --- a/gstreamer-editing-services/src/auto/extractable.rs +++ b/gstreamer-editing-services/src/auto/extractable.rs @@ -6,10 +6,6 @@ use Asset; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct Extractable(Object); @@ -19,7 +15,7 @@ glib_wrapper! { } } -pub trait ExtractableExt { +pub trait ExtractableExt: 'static { fn get_asset(&self) -> Option; fn get_id(&self) -> Option; diff --git a/gstreamer-editing-services/src/auto/group.rs b/gstreamer-editing-services/src/auto/group.rs index d0f897c38..114439d4d 100644 --- a/gstreamer-editing-services/src/auto/group.rs +++ b/gstreamer-editing-services/src/auto/group.rs @@ -6,20 +6,17 @@ use Container; use Extractable; use TimelineElement; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct Group(Object): Container, TimelineElement, Extractable; @@ -44,7 +41,7 @@ impl Default for Group { } } -pub trait GroupExt { +pub trait GroupExt: 'static { fn get_property_duration(&self) -> u64; fn set_property_duration(&self, duration: u64); @@ -76,81 +73,81 @@ pub trait GroupExt { fn connect_property_start_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> GroupExt for O { +impl> GroupExt for O { fn get_property_duration(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "duration".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0); } } fn get_property_in_point(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "in-point".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_in_point(&self, in_point: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "in-point".to_glib_none().0, Value::from(&in_point).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0); } } fn get_property_max_duration(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "max-duration".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"max-duration\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_max_duration(&self, max_duration: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "max-duration".to_glib_none().0, Value::from(&max_duration).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"max-duration\0".as_ptr() as *const _, Value::from(&max_duration).to_glib_none().0); } } fn get_property_priority(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "priority".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"priority\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_priority(&self, priority: u32) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "priority".to_glib_none().0, Value::from(&priority).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"priority\0".as_ptr() as *const _, Value::from(&priority).to_glib_none().0); } } fn get_property_start(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "start".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_start(&self, start: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "start".to_glib_none().0, Value::from(&start).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start\0".as_ptr() as *const _, Value::from(&start).to_glib_none().0); } } fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::duration", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::duration\0".as_ptr() as *const _, transmute(notify_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -158,7 +155,7 @@ impl + IsA> GroupExt for O { fn connect_property_in_point_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::in-point", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::in-point\0".as_ptr() as *const _, transmute(notify_in_point_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -166,7 +163,7 @@ impl + IsA> GroupExt for O { fn connect_property_max_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::max-duration", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::max-duration\0".as_ptr() as *const _, transmute(notify_max_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -174,7 +171,7 @@ impl + IsA> GroupExt for O { fn connect_property_priority_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::priority", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::priority\0".as_ptr() as *const _, transmute(notify_priority_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -182,7 +179,7 @@ impl + IsA> GroupExt for O { fn connect_property_start_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::start", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::start\0".as_ptr() as *const _, transmute(notify_start_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/layer.rs b/gstreamer-editing-services/src/auto/layer.rs index acf9fd276..1bf52332c 100644 --- a/gstreamer-editing-services/src/auto/layer.rs +++ b/gstreamer-editing-services/src/auto/layer.rs @@ -8,19 +8,15 @@ use Extractable; use Timeline; use TrackType; use ffi; -use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; -use gobject_ffi; use gst; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct Layer(Object): Extractable; @@ -45,7 +41,7 @@ impl Default for Layer { } } -pub trait LayerExt { +pub trait LayerExt: 'static { fn add_asset>(&self, asset: &P, start: gst::ClockTime, inpoint: gst::ClockTime, duration: gst::ClockTime, track_types: TrackType) -> Option; fn add_clip>(&self, clip: &P) -> bool; @@ -83,7 +79,7 @@ pub trait LayerExt { fn connect_property_priority_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> LayerExt for O { +impl> LayerExt for O { fn add_asset>(&self, asset: &P, start: gst::ClockTime, inpoint: gst::ClockTime, duration: gst::ClockTime, track_types: TrackType) -> Option { unsafe { from_glib_none(ffi::ges_layer_add_asset(self.to_glib_none().0, asset.to_glib_none().0, start.to_glib(), inpoint.to_glib(), duration.to_glib(), track_types.to_glib())) @@ -165,7 +161,7 @@ impl + IsA> LayerExt for O { fn connect_clip_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "clip-added", + connect_raw(self.to_glib_none().0 as *mut _, b"clip-added\0".as_ptr() as *const _, transmute(clip_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -173,7 +169,7 @@ impl + IsA> LayerExt for O { fn connect_clip_removed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "clip-removed", + connect_raw(self.to_glib_none().0 as *mut _, b"clip-removed\0".as_ptr() as *const _, transmute(clip_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -181,7 +177,7 @@ impl + IsA> LayerExt for O { fn connect_property_auto_transition_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::auto-transition", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::auto-transition\0".as_ptr() as *const _, transmute(notify_auto_transition_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -189,7 +185,7 @@ impl + IsA> LayerExt for O { fn connect_property_priority_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::priority", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::priority\0".as_ptr() as *const _, transmute(notify_priority_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/pipeline.rs b/gstreamer-editing-services/src/auto/pipeline.rs index b87e88d82..7ddc27874 100644 --- a/gstreamer-editing-services/src/auto/pipeline.rs +++ b/gstreamer-editing-services/src/auto/pipeline.rs @@ -12,7 +12,7 @@ use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; @@ -20,7 +20,6 @@ use gst; use gst_ffi; use gst_pbutils; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; use std::ptr; @@ -51,7 +50,7 @@ impl Default for Pipeline { } } -pub trait GESPipelineExt { +pub trait GESPipelineExt: 'static { fn get_mode(&self) -> PipelineFlags; fn get_thumbnail(&self, caps: &gst::Caps) -> Option; @@ -76,21 +75,21 @@ pub trait GESPipelineExt { fn get_property_audio_filter(&self) -> Option; - fn set_property_audio_filter + IsA + glib::value::SetValueOptional>(&self, audio_filter: Option<&P>); + fn set_property_audio_filter + glib::value::SetValueOptional>(&self, audio_filter: Option<&P>); fn get_property_audio_sink(&self) -> Option; - fn set_property_audio_sink + IsA + glib::value::SetValueOptional>(&self, audio_sink: Option<&P>); + fn set_property_audio_sink + glib::value::SetValueOptional>(&self, audio_sink: Option<&P>); fn get_property_timeline(&self) -> Option; fn get_property_video_filter(&self) -> Option; - fn set_property_video_filter + IsA + glib::value::SetValueOptional>(&self, video_filter: Option<&P>); + fn set_property_video_filter + glib::value::SetValueOptional>(&self, video_filter: Option<&P>); fn get_property_video_sink(&self) -> Option; - fn set_property_video_sink + IsA + glib::value::SetValueOptional>(&self, video_sink: Option<&P>); + fn set_property_video_sink + glib::value::SetValueOptional>(&self, video_sink: Option<&P>); fn connect_property_audio_filter_notify(&self, f: F) -> SignalHandlerId; @@ -105,7 +104,7 @@ pub trait GESPipelineExt { fn connect_property_video_sink_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> GESPipelineExt for O { +impl> GESPipelineExt for O { fn get_mode(&self) -> PipelineFlags { unsafe { from_glib(ffi::ges_pipeline_get_mode(self.to_glib_none().0)) @@ -177,35 +176,35 @@ impl + IsA> GESPipelineExt for O { fn get_property_audio_filter(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "audio-filter".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-filter\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - fn set_property_audio_filter + IsA + glib::value::SetValueOptional>(&self, audio_filter: Option<&P>) { + fn set_property_audio_filter + glib::value::SetValueOptional>(&self, audio_filter: Option<&P>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "audio-filter".to_glib_none().0, Value::from(audio_filter).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-filter\0".as_ptr() as *const _, Value::from(audio_filter).to_glib_none().0); } } fn get_property_audio_sink(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "audio-sink".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - fn set_property_audio_sink + IsA + glib::value::SetValueOptional>(&self, audio_sink: Option<&P>) { + fn set_property_audio_sink + glib::value::SetValueOptional>(&self, audio_sink: Option<&P>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "audio-sink".to_glib_none().0, Value::from(audio_sink).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-sink\0".as_ptr() as *const _, Value::from(audio_sink).to_glib_none().0); } } fn get_property_timeline(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "timeline".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"timeline\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -213,35 +212,35 @@ impl + IsA> GESPipelineExt for O { fn get_property_video_filter(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "video-filter".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-filter\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - fn set_property_video_filter + IsA + glib::value::SetValueOptional>(&self, video_filter: Option<&P>) { + fn set_property_video_filter + glib::value::SetValueOptional>(&self, video_filter: Option<&P>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "video-filter".to_glib_none().0, Value::from(video_filter).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-filter\0".as_ptr() as *const _, Value::from(video_filter).to_glib_none().0); } } fn get_property_video_sink(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "video-sink".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - fn set_property_video_sink + IsA + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) { + fn set_property_video_sink + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "video-sink".to_glib_none().0, Value::from(video_sink).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-sink\0".as_ptr() as *const _, Value::from(video_sink).to_glib_none().0); } } fn connect_property_audio_filter_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::audio-filter", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::audio-filter\0".as_ptr() as *const _, transmute(notify_audio_filter_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -249,7 +248,7 @@ impl + IsA> GESPipelineExt for O { fn connect_property_audio_sink_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::audio-sink", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::audio-sink\0".as_ptr() as *const _, transmute(notify_audio_sink_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -257,7 +256,7 @@ impl + IsA> GESPipelineExt for O { fn connect_property_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::mode", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::mode\0".as_ptr() as *const _, transmute(notify_mode_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -265,7 +264,7 @@ impl + IsA> GESPipelineExt for O { fn connect_property_timeline_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::timeline", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::timeline\0".as_ptr() as *const _, transmute(notify_timeline_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -273,7 +272,7 @@ impl + IsA> GESPipelineExt for O { fn connect_property_video_filter_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::video-filter", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::video-filter\0".as_ptr() as *const _, transmute(notify_video_filter_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -281,7 +280,7 @@ impl + IsA> GESPipelineExt for O { fn connect_property_video_sink_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::video-sink", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::video-sink\0".as_ptr() as *const _, transmute(notify_video_sink_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/project.rs b/gstreamer-editing-services/src/auto/project.rs index 61da874b1..2fa6f58af 100644 --- a/gstreamer-editing-services/src/auto/project.rs +++ b/gstreamer-editing-services/src/auto/project.rs @@ -10,14 +10,12 @@ use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; -use gobject_ffi; use gst_pbutils; use libc; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; use std::ptr; @@ -40,7 +38,7 @@ impl Project { } } -pub trait ProjectExt { +pub trait ProjectExt: 'static { fn add_asset>(&self, asset: &P) -> bool; fn add_encoding_profile>(&self, profile: &P) -> bool; @@ -78,7 +76,7 @@ pub trait ProjectExt { fn connect_missing_uri Option + 'static>(&self, f: F) -> SignalHandlerId; } -impl + IsA> ProjectExt for O { +impl> ProjectExt for O { fn add_asset>(&self, asset: &P) -> bool { unsafe { from_glib(ffi::ges_project_add_asset(self.to_glib_none().0, asset.to_glib_none().0)) @@ -166,7 +164,7 @@ impl + IsA> ProjectExt for O { fn connect_asset_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "asset-added", + connect_raw(self.to_glib_none().0 as *mut _, b"asset-added\0".as_ptr() as *const _, transmute(asset_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -174,7 +172,7 @@ impl + IsA> ProjectExt for O { fn connect_asset_loading(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "asset-loading", + connect_raw(self.to_glib_none().0 as *mut _, b"asset-loading\0".as_ptr() as *const _, transmute(asset_loading_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -182,7 +180,7 @@ impl + IsA> ProjectExt for O { fn connect_asset_removed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "asset-removed", + connect_raw(self.to_glib_none().0 as *mut _, b"asset-removed\0".as_ptr() as *const _, transmute(asset_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -190,7 +188,7 @@ impl + IsA> ProjectExt for O { fn connect_error_loading_asset(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "error-loading-asset", + connect_raw(self.to_glib_none().0 as *mut _, b"error-loading-asset\0".as_ptr() as *const _, transmute(error_loading_asset_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -198,7 +196,7 @@ impl + IsA> ProjectExt for O { fn connect_loaded(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "loaded", + connect_raw(self.to_glib_none().0 as *mut _, b"loaded\0".as_ptr() as *const _, transmute(loaded_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -206,7 +204,7 @@ impl + IsA> ProjectExt for O { fn connect_missing_uri Option + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ Option + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "missing-uri", + connect_raw(self.to_glib_none().0 as *mut _, b"missing-uri\0".as_ptr() as *const _, transmute(missing_uri_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/timeline.rs b/gstreamer-editing-services/src/auto/timeline.rs index 2d016c936..dca20a5b6 100644 --- a/gstreamer-editing-services/src/auto/timeline.rs +++ b/gstreamer-editing-services/src/auto/timeline.rs @@ -15,14 +15,12 @@ use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; use std::ptr; @@ -69,7 +67,7 @@ impl Default for Timeline { } } -pub trait TimelineExt { +pub trait TimelineExt: 'static { fn add_layer(&self, layer: &Layer) -> Result<(), glib::error::BoolError>; fn add_track>(&self, track: &P) -> Result<(), glib::error::BoolError>; @@ -145,7 +143,7 @@ pub trait TimelineExt { fn connect_property_snapping_distance_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> TimelineExt for O { +impl> TimelineExt for O { fn add_layer(&self, layer: &Layer) -> Result<(), glib::error::BoolError> { unsafe { glib::error::BoolError::from_glib(ffi::ges_timeline_add_layer(self.to_glib_none().0, layer.to_glib_none().0), "Failed to add layer") @@ -299,7 +297,7 @@ impl + IsA> TimelineExt for O { fn connect_commited(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "commited", + connect_raw(self.to_glib_none().0 as *mut _, b"commited\0".as_ptr() as *const _, transmute(commited_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -307,7 +305,7 @@ impl + IsA> TimelineExt for O { fn connect_group_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "group-added", + connect_raw(self.to_glib_none().0 as *mut _, b"group-added\0".as_ptr() as *const _, transmute(group_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -319,7 +317,7 @@ impl + IsA> TimelineExt for O { fn connect_layer_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "layer-added", + connect_raw(self.to_glib_none().0 as *mut _, b"layer-added\0".as_ptr() as *const _, transmute(layer_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -327,7 +325,7 @@ impl + IsA> TimelineExt for O { fn connect_layer_removed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "layer-removed", + connect_raw(self.to_glib_none().0 as *mut _, b"layer-removed\0".as_ptr() as *const _, transmute(layer_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -339,7 +337,7 @@ impl + IsA> TimelineExt for O { fn connect_snapping_ended(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "snapping-ended", + connect_raw(self.to_glib_none().0 as *mut _, b"snapping-ended\0".as_ptr() as *const _, transmute(snapping_ended_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -347,7 +345,7 @@ impl + IsA> TimelineExt for O { fn connect_snapping_started(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "snapping-started", + connect_raw(self.to_glib_none().0 as *mut _, b"snapping-started\0".as_ptr() as *const _, transmute(snapping_started_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -355,7 +353,7 @@ impl + IsA> TimelineExt for O { fn connect_track_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "track-added", + connect_raw(self.to_glib_none().0 as *mut _, b"track-added\0".as_ptr() as *const _, transmute(track_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -363,7 +361,7 @@ impl + IsA> TimelineExt for O { fn connect_track_removed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "track-removed", + connect_raw(self.to_glib_none().0 as *mut _, b"track-removed\0".as_ptr() as *const _, transmute(track_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -371,7 +369,7 @@ impl + IsA> TimelineExt for O { fn connect_property_auto_transition_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::auto-transition", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::auto-transition\0".as_ptr() as *const _, transmute(notify_auto_transition_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -379,7 +377,7 @@ impl + IsA> TimelineExt for O { fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::duration", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::duration\0".as_ptr() as *const _, transmute(notify_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -387,7 +385,7 @@ impl + IsA> TimelineExt for O { fn connect_property_snapping_distance_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::snapping-distance", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::snapping-distance\0".as_ptr() as *const _, transmute(notify_snapping_distance_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/timeline_element.rs b/gstreamer-editing-services/src/auto/timeline_element.rs index 71c701a26..7905a9678 100644 --- a/gstreamer-editing-services/src/auto/timeline_element.rs +++ b/gstreamer-editing-services/src/auto/timeline_element.rs @@ -6,21 +6,18 @@ use Extractable; use Timeline; use TrackType; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct TimelineElement(Object): Extractable; @@ -30,7 +27,7 @@ glib_wrapper! { } } -pub trait TimelineElementExt { +pub trait TimelineElementExt: 'static { //fn add_child_property, Q: IsA>(&self, pspec: &P, child: &Q) -> bool; fn copy(&self, deep: bool) -> Option; @@ -134,7 +131,7 @@ pub trait TimelineElementExt { fn connect_property_timeline_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> TimelineElementExt for O { +impl> TimelineElementExt for O { //fn add_child_property, Q: IsA>(&self, pspec: &P, child: &Q) -> bool { // unsafe { TODO: call ffi::ges_timeline_element_add_child_property() } //} @@ -338,28 +335,28 @@ impl + IsA> TimelineElementExt for fn get_property_in_point(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "in-point".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_in_point(&self, in_point: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "in-point".to_glib_none().0, Value::from(&in_point).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0); } } fn get_property_serialize(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "serialize".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"serialize\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_serialize(&self, serialize: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "serialize".to_glib_none().0, Value::from(&serialize).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"serialize\0".as_ptr() as *const _, Value::from(&serialize).to_glib_none().0); } } @@ -370,7 +367,7 @@ impl + IsA> TimelineElementExt for fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::duration", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::duration\0".as_ptr() as *const _, transmute(notify_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -378,7 +375,7 @@ impl + IsA> TimelineElementExt for fn connect_property_in_point_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::in-point", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::in-point\0".as_ptr() as *const _, transmute(notify_in_point_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -386,7 +383,7 @@ impl + IsA> TimelineElementExt for fn connect_property_max_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::max-duration", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::max-duration\0".as_ptr() as *const _, transmute(notify_max_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -394,7 +391,7 @@ impl + IsA> TimelineElementExt for fn connect_property_name_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::name", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::name\0".as_ptr() as *const _, transmute(notify_name_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -402,7 +399,7 @@ impl + IsA> TimelineElementExt for fn connect_property_parent_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::parent", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::parent\0".as_ptr() as *const _, transmute(notify_parent_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -410,7 +407,7 @@ impl + IsA> TimelineElementExt for fn connect_property_priority_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::priority", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::priority\0".as_ptr() as *const _, transmute(notify_priority_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -418,7 +415,7 @@ impl + IsA> TimelineElementExt for fn connect_property_serialize_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::serialize", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::serialize\0".as_ptr() as *const _, transmute(notify_serialize_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -426,7 +423,7 @@ impl + IsA> TimelineElementExt for fn connect_property_start_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::start", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::start\0".as_ptr() as *const _, transmute(notify_start_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -434,7 +431,7 @@ impl + IsA> TimelineElementExt for fn connect_property_timeline_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::timeline", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::timeline\0".as_ptr() as *const _, transmute(notify_timeline_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/track.rs b/gstreamer-editing-services/src/auto/track.rs index 34b024811..4042746a9 100644 --- a/gstreamer-editing-services/src/auto/track.rs +++ b/gstreamer-editing-services/src/auto/track.rs @@ -12,16 +12,14 @@ use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct Track(Object): [ @@ -43,7 +41,7 @@ impl Track { } } -pub trait GESTrackExt { +pub trait GESTrackExt: 'static { fn add_element>(&self, object: &P) -> Result<(), glib::error::BoolError>; fn commit(&self) -> bool; @@ -87,7 +85,7 @@ pub trait GESTrackExt { fn connect_property_restriction_caps_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> GESTrackExt for O { +impl> GESTrackExt for O { fn add_element>(&self, object: &P) -> Result<(), glib::error::BoolError> { unsafe { glib::error::BoolError::from_glib(ffi::ges_track_add_element(self.to_glib_none().0, object.to_glib_none().0), "Failed to add element") @@ -161,7 +159,7 @@ impl + IsA> GESTrackExt for O { fn get_property_duration(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "duration".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -169,7 +167,7 @@ impl + IsA> GESTrackExt for O { fn get_property_restriction_caps(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "restriction-caps".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"restriction-caps\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -177,7 +175,7 @@ impl + IsA> GESTrackExt for O { fn get_property_track_type(&self) -> TrackType { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "track-type".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"track-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -185,7 +183,7 @@ impl + IsA> GESTrackExt for O { fn connect_commited(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "commited", + connect_raw(self.to_glib_none().0 as *mut _, b"commited\0".as_ptr() as *const _, transmute(commited_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -193,7 +191,7 @@ impl + IsA> GESTrackExt for O { fn connect_track_element_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "track-element-added", + connect_raw(self.to_glib_none().0 as *mut _, b"track-element-added\0".as_ptr() as *const _, transmute(track_element_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -201,7 +199,7 @@ impl + IsA> GESTrackExt for O { fn connect_track_element_removed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "track-element-removed", + connect_raw(self.to_glib_none().0 as *mut _, b"track-element-removed\0".as_ptr() as *const _, transmute(track_element_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -209,7 +207,7 @@ impl + IsA> GESTrackExt for O { fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::duration", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::duration\0".as_ptr() as *const _, transmute(notify_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -217,7 +215,7 @@ impl + IsA> GESTrackExt for O { fn connect_property_mixing_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::mixing", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::mixing\0".as_ptr() as *const _, transmute(notify_mixing_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -225,7 +223,7 @@ impl + IsA> GESTrackExt for O { fn connect_property_restriction_caps_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::restriction-caps", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::restriction-caps\0".as_ptr() as *const _, transmute(notify_restriction_caps_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/track_element.rs b/gstreamer-editing-services/src/auto/track_element.rs index 6d4d88ef0..d8d4eedd4 100644 --- a/gstreamer-editing-services/src/auto/track_element.rs +++ b/gstreamer-editing-services/src/auto/track_element.rs @@ -10,21 +10,18 @@ use TimelineElement; use Track; use TrackType; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct TrackElement(Object): TimelineElement, Extractable; @@ -34,7 +31,7 @@ glib_wrapper! { } } -pub trait TrackElementExt { +pub trait TrackElementExt: 'static { fn add_children_props>(&self, element: &P, wanted_categories: &[&str], blacklist: &[&str], whitelist: &[&str]); fn edit(&self, layers: &[Layer], mode: EditMode, edge: Edge, position: u64) -> bool; @@ -78,7 +75,7 @@ pub trait TrackElementExt { fn connect_property_track_type_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> TrackElementExt for O { +impl> TrackElementExt for O { fn add_children_props>(&self, element: &P, wanted_categories: &[&str], blacklist: &[&str], whitelist: &[&str]) { unsafe { ffi::ges_track_element_add_children_props(self.to_glib_none().0, element.to_glib_none().0, wanted_categories.to_glib_none().0, blacklist.to_glib_none().0, whitelist.to_glib_none().0); @@ -164,7 +161,7 @@ impl + IsA> TrackElementExt for O { fn get_property_active(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "active".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -180,7 +177,7 @@ impl + IsA> TrackElementExt for O { fn connect_property_active_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::active", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::active\0".as_ptr() as *const _, transmute(notify_active_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -188,7 +185,7 @@ impl + IsA> TrackElementExt for O { fn connect_property_track_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::track", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::track\0".as_ptr() as *const _, transmute(notify_track_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -196,7 +193,7 @@ impl + IsA> TrackElementExt for O { fn connect_property_track_type_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::track-type", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::track-type\0".as_ptr() as *const _, transmute(notify_track_type_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/uri_clip.rs b/gstreamer-editing-services/src/auto/uri_clip.rs index a59419d9e..1304fd679 100644 --- a/gstreamer-editing-services/src/auto/uri_clip.rs +++ b/gstreamer-editing-services/src/auto/uri_clip.rs @@ -7,20 +7,17 @@ use Container; use Extractable; use TimelineElement; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct UriClip(Object): Clip, Container, TimelineElement, Extractable; @@ -39,7 +36,7 @@ impl UriClip { } } -pub trait UriClipExt { +pub trait UriClipExt: 'static { fn get_uri(&self) -> Option; fn is_image(&self) -> bool; @@ -61,7 +58,7 @@ pub trait UriClipExt { fn connect_property_supported_formats_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> UriClipExt for O { +impl> UriClipExt for O { fn get_uri(&self) -> Option { unsafe { from_glib_none(ffi::ges_uri_clip_get_uri(self.to_glib_none().0)) @@ -95,7 +92,7 @@ impl + IsA> UriClipExt for O { fn get_property_is_image(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "is-image".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"is-image\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -103,7 +100,7 @@ impl + IsA> UriClipExt for O { fn get_property_mute(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "mute".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"mute\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -111,7 +108,7 @@ impl + IsA> UriClipExt for O { fn connect_property_is_image_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::is-image", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::is-image\0".as_ptr() as *const _, transmute(notify_is_image_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -119,7 +116,7 @@ impl + IsA> UriClipExt for O { fn connect_property_mute_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::mute", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::mute\0".as_ptr() as *const _, transmute(notify_mute_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -127,7 +124,7 @@ impl + IsA> UriClipExt for O { fn connect_property_supported_formats_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::supported-formats", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::supported-formats\0".as_ptr() as *const _, transmute(notify_supported_formats_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/uri_clip_asset.rs b/gstreamer-editing-services/src/auto/uri_clip_asset.rs index 188a805eb..67de4c929 100644 --- a/gstreamer-editing-services/src/auto/uri_clip_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_clip_asset.rs @@ -6,19 +6,17 @@ use Asset; use Error; use UriSourceAsset; use ffi; -use glib; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use gst_pbutils; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; use std::ptr; @@ -45,7 +43,7 @@ impl UriClipAsset { } } -pub trait UriClipAssetExt { +pub trait UriClipAssetExt: 'static { fn get_duration(&self) -> gst::ClockTime; fn get_info(&self) -> Option; @@ -59,7 +57,7 @@ pub trait UriClipAssetExt { fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> UriClipAssetExt for O { +impl> UriClipAssetExt for O { fn get_duration(&self) -> gst::ClockTime { unsafe { from_glib(ffi::ges_uri_clip_asset_get_duration(self.to_glib_none().0)) @@ -86,14 +84,14 @@ impl + IsA> UriClipAssetExt for O { 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0); } } fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::duration", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::duration\0".as_ptr() as *const _, transmute(notify_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-editing-services/src/auto/uri_source_asset.rs b/gstreamer-editing-services/src/auto/uri_source_asset.rs index 135027ee0..6e42d1a5d 100644 --- a/gstreamer-editing-services/src/auto/uri_source_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_source_asset.rs @@ -7,11 +7,7 @@ use UriClipAsset; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst_pbutils; -use std::mem; -use std::ptr; glib_wrapper! { pub struct UriSourceAsset(Object): Asset; @@ -21,7 +17,7 @@ glib_wrapper! { } } -pub trait UriSourceAssetExt { +pub trait UriSourceAssetExt: 'static { fn get_filesource_asset(&self) -> Option; fn get_stream_info(&self) -> Option; diff --git a/gstreamer-editing-services/src/auto/versions.txt b/gstreamer-editing-services/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-editing-services/src/auto/versions.txt +++ b/gstreamer-editing-services/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-gl/src/auto/gl_base_filter.rs b/gstreamer-gl/src/auto/gl_base_filter.rs index c0b2d0bbd..d97439094 100644 --- a/gstreamer-gl/src/auto/gl_base_filter.rs +++ b/gstreamer-gl/src/auto/gl_base_filter.rs @@ -4,22 +4,19 @@ use GLContext; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct GLBaseFilter(Object): [ @@ -34,17 +31,17 @@ glib_wrapper! { unsafe impl Send for GLBaseFilter {} unsafe impl Sync for GLBaseFilter {} -pub trait GLBaseFilterExt { +pub trait GLBaseFilterExt: 'static { fn get_property_context(&self) -> Option; fn connect_property_context_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> GLBaseFilterExt for O { +impl> GLBaseFilterExt for O { fn get_property_context(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "context".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"context\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -52,7 +49,7 @@ impl + IsA> GLBaseFilterExt for O { fn connect_property_context_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::context", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::context\0".as_ptr() as *const _, transmute(notify_context_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-gl/src/auto/gl_color_convert.rs b/gstreamer-gl/src/auto/gl_color_convert.rs index 8bc65279b..6b2806bfc 100644 --- a/gstreamer-gl/src/auto/gl_color_convert.rs +++ b/gstreamer-gl/src/auto/gl_color_convert.rs @@ -5,12 +5,8 @@ use GLContext; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct GLColorConvert(Object): [ diff --git a/gstreamer-gl/src/auto/gl_context.rs b/gstreamer-gl/src/auto/gl_context.rs index aa0b0abe8..6f1e09e21 100644 --- a/gstreamer-gl/src/auto/gl_context.rs +++ b/gstreamer-gl/src/auto/gl_context.rs @@ -13,8 +13,6 @@ use ffi; use glib; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; use std::mem; @@ -59,7 +57,7 @@ impl GLContext { unsafe impl Send for GLContext {} unsafe impl Sync for GLContext {} -pub trait GLContextExt { +pub trait GLContextExt: 'static { fn activate(&self, activate: bool) -> Result<(), glib::error::BoolError>; fn can_share(&self, other_context: &GLContext) -> bool; diff --git a/gstreamer-gl/src/auto/gl_display.rs b/gstreamer-gl/src/auto/gl_display.rs index bbf5b7d5b..0ba42e088 100644 --- a/gstreamer-gl/src/auto/gl_display.rs +++ b/gstreamer-gl/src/auto/gl_display.rs @@ -12,14 +12,12 @@ use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; use std::ptr; @@ -51,7 +49,7 @@ impl Default for GLDisplay { unsafe impl Send for GLDisplay {} unsafe impl Sync for GLDisplay {} -pub trait GLDisplayExt { +pub trait GLDisplayExt: 'static { fn add_context(&self, context: &GLContext) -> Result<(), glib::error::BoolError>; fn create_context(&self, other_context: &GLContext) -> Result; @@ -71,7 +69,7 @@ pub trait GLDisplayExt { fn connect_create_context GLContext + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; } -impl + IsA> GLDisplayExt for O { +impl> GLDisplayExt for O { fn add_context(&self, context: &GLContext) -> Result<(), glib::error::BoolError> { unsafe { glib::error::BoolError::from_glib(ffi::gst_gl_display_add_context(self.to_glib_none().0, context.to_glib_none().0), "Failed to add OpenGL context") @@ -126,7 +124,7 @@ impl + IsA> GLDisplayExt for O { fn connect_create_context GLContext + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ GLContext + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "create-context", + connect_raw(self.to_glib_none().0 as *mut _, b"create-context\0".as_ptr() as *const _, transmute(create_context_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-gl/src/auto/gl_display_egl.rs b/gstreamer-gl/src/auto/gl_display_egl.rs index 85288a56d..f2459a99c 100644 --- a/gstreamer-gl/src/auto/gl_display_egl.rs +++ b/gstreamer-gl/src/auto/gl_display_egl.rs @@ -5,12 +5,8 @@ use GLDisplay; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct GLDisplayEGL(Object): [ diff --git a/gstreamer-gl/src/auto/gl_framebuffer.rs b/gstreamer-gl/src/auto/gl_framebuffer.rs index 19e8d471d..42495221f 100644 --- a/gstreamer-gl/src/auto/gl_framebuffer.rs +++ b/gstreamer-gl/src/auto/gl_framebuffer.rs @@ -6,12 +6,9 @@ use GLContext; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; use std::mem; -use std::ptr; glib_wrapper! { pub struct GLFramebuffer(Object): [ @@ -42,7 +39,7 @@ impl GLFramebuffer { unsafe impl Send for GLFramebuffer {} unsafe impl Sync for GLFramebuffer {} -pub trait GLFramebufferExt { +pub trait GLFramebufferExt: 'static { //fn attach(&self, attachment_point: u32, mem: /*Ignored*/&mut GLBaseMemory); fn bind(&self); diff --git a/gstreamer-gl/src/auto/gl_overlay_compositor.rs b/gstreamer-gl/src/auto/gl_overlay_compositor.rs index 1310a766b..69d366a9b 100644 --- a/gstreamer-gl/src/auto/gl_overlay_compositor.rs +++ b/gstreamer-gl/src/auto/gl_overlay_compositor.rs @@ -5,12 +5,8 @@ use GLContext; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct GLOverlayCompositor(Object): [ diff --git a/gstreamer-gl/src/auto/gl_shader.rs b/gstreamer-gl/src/auto/gl_shader.rs index 576be8291..8369480fc 100644 --- a/gstreamer-gl/src/auto/gl_shader.rs +++ b/gstreamer-gl/src/auto/gl_shader.rs @@ -9,14 +9,13 @@ use ffi; use glib::StaticType; use glib::Value; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; use std::ptr; @@ -250,7 +249,7 @@ impl GLShader { pub fn get_property_linked(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "linked".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"linked\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -258,7 +257,7 @@ impl GLShader { pub fn connect_property_linked_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::linked", + connect_raw(self.to_glib_none().0, b"notify::linked\0".as_ptr() as *const _, transmute(notify_linked_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-gl/src/auto/gl_upload.rs b/gstreamer-gl/src/auto/gl_upload.rs index 2d4814e39..8324c5bc4 100644 --- a/gstreamer-gl/src/auto/gl_upload.rs +++ b/gstreamer-gl/src/auto/gl_upload.rs @@ -5,11 +5,8 @@ use GLContext; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; -use std::mem; use std::ptr; glib_wrapper! { diff --git a/gstreamer-gl/src/auto/gl_view_convert.rs b/gstreamer-gl/src/auto/gl_view_convert.rs index 22968cc0f..fcc92fd2b 100644 --- a/gstreamer-gl/src/auto/gl_view_convert.rs +++ b/gstreamer-gl/src/auto/gl_view_convert.rs @@ -8,7 +8,7 @@ use ffi; use glib::StaticType; use glib::Value; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; @@ -16,9 +16,7 @@ use gst; use gst_ffi; use gst_video; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct GLViewConvert(Object): [ @@ -71,77 +69,77 @@ impl GLViewConvert { pub fn get_property_downmix_mode(&self) -> GLStereoDownmix { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "downmix-mode".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"downmix-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_downmix_mode(&self, downmix_mode: GLStereoDownmix) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "downmix-mode".to_glib_none().0, Value::from(&downmix_mode).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"downmix-mode\0".as_ptr() as *const _, Value::from(&downmix_mode).to_glib_none().0); } } pub fn get_property_input_flags_override(&self) -> gst_video::VideoMultiviewFlags { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "input-flags-override".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"input-flags-override\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_input_flags_override(&self, input_flags_override: gst_video::VideoMultiviewFlags) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "input-flags-override".to_glib_none().0, Value::from(&input_flags_override).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"input-flags-override\0".as_ptr() as *const _, Value::from(&input_flags_override).to_glib_none().0); } } pub fn get_property_input_mode_override(&self) -> gst_video::VideoMultiviewMode { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "input-mode-override".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"input-mode-override\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_input_mode_override(&self, input_mode_override: gst_video::VideoMultiviewMode) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "input-mode-override".to_glib_none().0, Value::from(&input_mode_override).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"input-mode-override\0".as_ptr() as *const _, Value::from(&input_mode_override).to_glib_none().0); } } pub fn get_property_output_flags_override(&self) -> gst_video::VideoMultiviewFlags { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "output-flags-override".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"output-flags-override\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_output_flags_override(&self, output_flags_override: gst_video::VideoMultiviewFlags) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "output-flags-override".to_glib_none().0, Value::from(&output_flags_override).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"output-flags-override\0".as_ptr() as *const _, Value::from(&output_flags_override).to_glib_none().0); } } pub fn get_property_output_mode_override(&self) -> gst_video::VideoMultiviewMode { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "output-mode-override".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"output-mode-override\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_output_mode_override(&self, output_mode_override: gst_video::VideoMultiviewMode) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "output-mode-override".to_glib_none().0, Value::from(&output_mode_override).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"output-mode-override\0".as_ptr() as *const _, Value::from(&output_mode_override).to_glib_none().0); } } pub fn connect_property_downmix_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::downmix-mode", + connect_raw(self.to_glib_none().0, b"notify::downmix-mode\0".as_ptr() as *const _, transmute(notify_downmix_mode_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -149,7 +147,7 @@ impl GLViewConvert { pub fn connect_property_input_flags_override_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::input-flags-override", + connect_raw(self.to_glib_none().0, b"notify::input-flags-override\0".as_ptr() as *const _, transmute(notify_input_flags_override_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -157,7 +155,7 @@ impl GLViewConvert { pub fn connect_property_input_mode_override_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::input-mode-override", + connect_raw(self.to_glib_none().0, b"notify::input-mode-override\0".as_ptr() as *const _, transmute(notify_input_mode_override_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -165,7 +163,7 @@ impl GLViewConvert { pub fn connect_property_output_flags_override_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::output-flags-override", + connect_raw(self.to_glib_none().0, b"notify::output-flags-override\0".as_ptr() as *const _, transmute(notify_output_flags_override_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -173,7 +171,7 @@ impl GLViewConvert { pub fn connect_property_output_mode_override_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::output-mode-override", + connect_raw(self.to_glib_none().0, b"notify::output-mode-override\0".as_ptr() as *const _, transmute(notify_output_mode_override_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-gl/src/auto/gl_window.rs b/gstreamer-gl/src/auto/gl_window.rs index bd21ac9eb..90e64164d 100644 --- a/gstreamer-gl/src/auto/gl_window.rs +++ b/gstreamer-gl/src/auto/gl_window.rs @@ -5,21 +5,18 @@ use GLContext; use GLDisplay; use ffi; -use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; use libc; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct GLWindow(Object): [ @@ -43,7 +40,7 @@ impl GLWindow { unsafe impl Send for GLWindow {} unsafe impl Sync for GLWindow {} -pub trait GLWindowExt { +pub trait GLWindowExt: 'static { fn draw(&self); fn get_context(&self) -> Option; @@ -75,7 +72,7 @@ pub trait GLWindowExt { fn connect_mouse_event(&self, f: F) -> SignalHandlerId; } -impl + IsA> GLWindowExt for O { +impl> GLWindowExt for O { fn draw(&self) { unsafe { ffi::gst_gl_window_draw(self.to_glib_none().0); @@ -160,7 +157,7 @@ impl + IsA> GLWindowExt for O { fn connect_key_event(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "key-event", + connect_raw(self.to_glib_none().0 as *mut _, b"key-event\0".as_ptr() as *const _, transmute(key_event_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -168,7 +165,7 @@ impl + IsA> GLWindowExt for O { fn connect_mouse_event(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "mouse-event", + connect_raw(self.to_glib_none().0 as *mut _, b"mouse-event\0".as_ptr() as *const _, transmute(mouse_event_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-gl/src/auto/glsl_stage.rs b/gstreamer-gl/src/auto/glsl_stage.rs index cb102a89f..86eeba14b 100644 --- a/gstreamer-gl/src/auto/glsl_stage.rs +++ b/gstreamer-gl/src/auto/glsl_stage.rs @@ -8,11 +8,8 @@ use GLSLProfile; use GLSLVersion; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; -use std::mem; use std::ptr; glib_wrapper! { diff --git a/gstreamer-gl/src/auto/versions.txt b/gstreamer-gl/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-gl/src/auto/versions.txt +++ b/gstreamer-gl/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-net/src/auto/net_client_clock.rs b/gstreamer-net/src/auto/net_client_clock.rs index c1e7bd6bb..a6349cbda 100644 --- a/gstreamer-net/src/auto/net_client_clock.rs +++ b/gstreamer-net/src/auto/net_client_clock.rs @@ -6,16 +6,14 @@ use ffi; use glib::StaticType; use glib::Value; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct NetClientClock(Object): [ @@ -32,7 +30,7 @@ impl NetClientClock { pub fn get_property_address(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "address".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -40,14 +38,14 @@ impl NetClientClock { pub fn set_property_address<'a, P: Into>>(&self, address: P) { let address = address.into(); unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "address".to_glib_none().0, Value::from(address).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"address\0".as_ptr() as *const _, Value::from(address).to_glib_none().0); } } pub fn get_property_base_time(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "base-time".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"base-time\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -55,21 +53,21 @@ impl NetClientClock { pub fn get_property_bus(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "bus".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"bus\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } pub fn set_property_bus(&self, bus: Option<&gst::Bus>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "bus".to_glib_none().0, Value::from(bus).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"bus\0".as_ptr() as *const _, Value::from(bus).to_glib_none().0); } } pub fn get_property_internal_clock(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "internal-clock".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -77,63 +75,63 @@ impl NetClientClock { pub fn get_property_minimum_update_interval(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "minimum-update-interval".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"minimum-update-interval\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_minimum_update_interval(&self, minimum_update_interval: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "minimum-update-interval".to_glib_none().0, Value::from(&minimum_update_interval).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"minimum-update-interval\0".as_ptr() as *const _, Value::from(&minimum_update_interval).to_glib_none().0); } } pub fn get_property_port(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "port".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_port(&self, port: i32) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "port".to_glib_none().0, Value::from(&port).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"port\0".as_ptr() as *const _, Value::from(&port).to_glib_none().0); } } pub fn get_property_qos_dscp(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "qos-dscp".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_qos_dscp(&self, qos_dscp: i32) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "qos-dscp".to_glib_none().0, Value::from(&qos_dscp).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0); } } pub fn get_property_round_trip_limit(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "round-trip-limit".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"round-trip-limit\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_round_trip_limit(&self, round_trip_limit: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "round-trip-limit".to_glib_none().0, Value::from(&round_trip_limit).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"round-trip-limit\0".as_ptr() as *const _, Value::from(&round_trip_limit).to_glib_none().0); } } pub fn connect_property_address_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::address", + connect_raw(self.to_glib_none().0, b"notify::address\0".as_ptr() as *const _, transmute(notify_address_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -141,7 +139,7 @@ impl NetClientClock { pub fn connect_property_bus_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::bus", + connect_raw(self.to_glib_none().0, b"notify::bus\0".as_ptr() as *const _, transmute(notify_bus_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -149,7 +147,7 @@ impl NetClientClock { pub fn connect_property_internal_clock_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::internal-clock", + connect_raw(self.to_glib_none().0, b"notify::internal-clock\0".as_ptr() as *const _, transmute(notify_internal_clock_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -157,7 +155,7 @@ impl NetClientClock { pub fn connect_property_minimum_update_interval_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::minimum-update-interval", + connect_raw(self.to_glib_none().0, b"notify::minimum-update-interval\0".as_ptr() as *const _, transmute(notify_minimum_update_interval_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -165,7 +163,7 @@ impl NetClientClock { pub fn connect_property_port_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::port", + connect_raw(self.to_glib_none().0, b"notify::port\0".as_ptr() as *const _, transmute(notify_port_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -173,7 +171,7 @@ impl NetClientClock { pub fn connect_property_qos_dscp_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::qos-dscp", + connect_raw(self.to_glib_none().0, b"notify::qos-dscp\0".as_ptr() as *const _, transmute(notify_qos_dscp_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -181,7 +179,7 @@ impl NetClientClock { pub fn connect_property_round_trip_limit_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::round-trip-limit", + connect_raw(self.to_glib_none().0, b"notify::round-trip-limit\0".as_ptr() as *const _, transmute(notify_round_trip_limit_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-net/src/auto/net_time_provider.rs b/gstreamer-net/src/auto/net_time_provider.rs index f53630397..3e149d9c7 100644 --- a/gstreamer-net/src/auto/net_time_provider.rs +++ b/gstreamer-net/src/auto/net_time_provider.rs @@ -6,16 +6,14 @@ use ffi; use glib::StaticType; use glib::Value; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct NetTimeProvider(Object): [ @@ -31,21 +29,21 @@ impl NetTimeProvider { pub fn get_property_active(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "active".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_active(&self, active: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "active".to_glib_none().0, Value::from(&active).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"active\0".as_ptr() as *const _, Value::from(&active).to_glib_none().0); } } pub fn get_property_address(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "address".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -53,7 +51,7 @@ impl NetTimeProvider { pub fn get_property_clock(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "clock".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"clock\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -61,7 +59,7 @@ impl NetTimeProvider { pub fn get_property_port(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "port".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -69,21 +67,21 @@ impl NetTimeProvider { pub fn get_property_qos_dscp(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "qos-dscp".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_qos_dscp(&self, qos_dscp: i32) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "qos-dscp".to_glib_none().0, Value::from(&qos_dscp).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0); } } pub fn connect_property_active_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::active", + connect_raw(self.to_glib_none().0, b"notify::active\0".as_ptr() as *const _, transmute(notify_active_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -91,7 +89,7 @@ impl NetTimeProvider { pub fn connect_property_qos_dscp_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::qos-dscp", + connect_raw(self.to_glib_none().0, b"notify::qos-dscp\0".as_ptr() as *const _, transmute(notify_qos_dscp_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-net/src/auto/ntp_clock.rs b/gstreamer-net/src/auto/ntp_clock.rs index 68e8d3066..d0c068064 100644 --- a/gstreamer-net/src/auto/ntp_clock.rs +++ b/gstreamer-net/src/auto/ntp_clock.rs @@ -5,12 +5,8 @@ use NetClientClock; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct NtpClock(Object): [ diff --git a/gstreamer-net/src/auto/ptp_clock.rs b/gstreamer-net/src/auto/ptp_clock.rs index 2f94a4334..be5e9638e 100644 --- a/gstreamer-net/src/auto/ptp_clock.rs +++ b/gstreamer-net/src/auto/ptp_clock.rs @@ -6,16 +6,14 @@ use ffi; use glib::StaticType; use glib::Value; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct PtpClock(Object): [ @@ -32,7 +30,7 @@ impl PtpClock { pub fn get_property_domain(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "domain".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"domain\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -40,7 +38,7 @@ impl PtpClock { pub fn get_property_grandmaster_clock_id(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "grandmaster-clock-id".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"grandmaster-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -48,7 +46,7 @@ impl PtpClock { pub fn get_property_internal_clock(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "internal-clock".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -56,7 +54,7 @@ impl PtpClock { pub fn get_property_master_clock_id(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "master-clock-id".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"master-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -64,7 +62,7 @@ impl PtpClock { pub fn connect_property_grandmaster_clock_id_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::grandmaster-clock-id", + connect_raw(self.to_glib_none().0, b"notify::grandmaster-clock-id\0".as_ptr() as *const _, transmute(notify_grandmaster_clock_id_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -72,7 +70,7 @@ impl PtpClock { pub fn connect_property_internal_clock_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::internal-clock", + connect_raw(self.to_glib_none().0, b"notify::internal-clock\0".as_ptr() as *const _, transmute(notify_internal_clock_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -80,7 +78,7 @@ impl PtpClock { pub fn connect_property_master_clock_id_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::master-clock-id", + connect_raw(self.to_glib_none().0, b"notify::master-clock-id\0".as_ptr() as *const _, transmute(notify_master_clock_id_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-net/src/auto/versions.txt b/gstreamer-net/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-net/src/auto/versions.txt +++ b/gstreamer-net/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-pbutils/src/auto/discoverer.rs b/gstreamer-pbutils/src/auto/discoverer.rs index 45fc0668e..ed71e7f3b 100644 --- a/gstreamer-pbutils/src/auto/discoverer.rs +++ b/gstreamer-pbutils/src/auto/discoverer.rs @@ -7,14 +7,12 @@ use Error; use ffi; use glib; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; use std::ptr; @@ -65,7 +63,7 @@ impl Discoverer { pub fn connect_discovered) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_) + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "discovered", + connect_raw(self.to_glib_none().0, b"discovered\0".as_ptr() as *const _, transmute(discovered_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -73,7 +71,7 @@ impl Discoverer { pub fn connect_finished(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "finished", + connect_raw(self.to_glib_none().0, b"finished\0".as_ptr() as *const _, transmute(finished_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -81,7 +79,7 @@ impl Discoverer { pub fn connect_source_setup(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "source-setup", + connect_raw(self.to_glib_none().0, b"source-setup\0".as_ptr() as *const _, transmute(source_setup_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -89,7 +87,7 @@ impl Discoverer { pub fn connect_starting(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "starting", + connect_raw(self.to_glib_none().0, b"starting\0".as_ptr() as *const _, transmute(starting_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-pbutils/src/auto/discoverer_audio_info.rs b/gstreamer-pbutils/src/auto/discoverer_audio_info.rs index 2407d875c..2a9a0cbff 100644 --- a/gstreamer-pbutils/src/auto/discoverer_audio_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_audio_info.rs @@ -5,10 +5,6 @@ use DiscovererStreamInfo; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct DiscovererAudioInfo(Object): DiscovererStreamInfo; diff --git a/gstreamer-pbutils/src/auto/discoverer_container_info.rs b/gstreamer-pbutils/src/auto/discoverer_container_info.rs index 53be43a63..2beb4b1ea 100644 --- a/gstreamer-pbutils/src/auto/discoverer_container_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_container_info.rs @@ -5,10 +5,6 @@ use DiscovererStreamInfo; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct DiscovererContainerInfo(Object): DiscovererStreamInfo; diff --git a/gstreamer-pbutils/src/auto/discoverer_info.rs b/gstreamer-pbutils/src/auto/discoverer_info.rs index d7212c24a..de6bf46e1 100644 --- a/gstreamer-pbutils/src/auto/discoverer_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_info.rs @@ -9,11 +9,7 @@ use ffi; use glib; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; -use std::mem; -use std::ptr; glib_wrapper! { pub struct DiscovererInfo(Object); @@ -35,7 +31,7 @@ impl DiscovererInfo { unsafe impl Send for DiscovererInfo {} unsafe impl Sync for DiscovererInfo {} -pub trait DiscovererInfoExt { +pub trait DiscovererInfoExt: 'static { fn copy(&self) -> DiscovererInfo; fn get_audio_streams(&self) -> Vec; diff --git a/gstreamer-pbutils/src/auto/discoverer_stream_info.rs b/gstreamer-pbutils/src/auto/discoverer_stream_info.rs index fd7219f93..04bd14dd6 100644 --- a/gstreamer-pbutils/src/auto/discoverer_stream_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_stream_info.rs @@ -5,11 +5,7 @@ use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; -use std::mem; -use std::ptr; glib_wrapper! { pub struct DiscovererStreamInfo(Object); @@ -22,7 +18,7 @@ glib_wrapper! { unsafe impl Send for DiscovererStreamInfo {} unsafe impl Sync for DiscovererStreamInfo {} -pub trait DiscovererStreamInfoExt { +pub trait DiscovererStreamInfoExt: 'static { fn get_caps(&self) -> Option; fn get_misc(&self) -> Option; diff --git a/gstreamer-pbutils/src/auto/discoverer_subtitle_info.rs b/gstreamer-pbutils/src/auto/discoverer_subtitle_info.rs index 53b1704fb..379c62859 100644 --- a/gstreamer-pbutils/src/auto/discoverer_subtitle_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_subtitle_info.rs @@ -5,10 +5,6 @@ use DiscovererStreamInfo; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct DiscovererSubtitleInfo(Object): DiscovererStreamInfo; diff --git a/gstreamer-pbutils/src/auto/discoverer_video_info.rs b/gstreamer-pbutils/src/auto/discoverer_video_info.rs index 3de2a0dc0..6f5a412bb 100644 --- a/gstreamer-pbutils/src/auto/discoverer_video_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_video_info.rs @@ -5,10 +5,6 @@ use DiscovererStreamInfo; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct DiscovererVideoInfo(Object): DiscovererStreamInfo; diff --git a/gstreamer-pbutils/src/auto/encoding_audio_profile.rs b/gstreamer-pbutils/src/auto/encoding_audio_profile.rs index 4d441b59e..6460549e9 100644 --- a/gstreamer-pbutils/src/auto/encoding_audio_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_audio_profile.rs @@ -5,10 +5,6 @@ use EncodingProfile; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct EncodingAudioProfile(Object): EncodingProfile; diff --git a/gstreamer-pbutils/src/auto/encoding_container_profile.rs b/gstreamer-pbutils/src/auto/encoding_container_profile.rs index 8b39d6481..07219b3c7 100644 --- a/gstreamer-pbutils/src/auto/encoding_container_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_container_profile.rs @@ -6,10 +6,6 @@ use EncodingProfile; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct EncodingContainerProfile(Object): EncodingProfile; @@ -22,7 +18,7 @@ glib_wrapper! { unsafe impl Send for EncodingContainerProfile {} unsafe impl Sync for EncodingContainerProfile {} -pub trait EncodingContainerProfileExt { +pub trait EncodingContainerProfileExt: 'static { fn contains_profile>(&self, profile: &P) -> bool; fn get_profiles(&self) -> Vec; diff --git a/gstreamer-pbutils/src/auto/encoding_profile.rs b/gstreamer-pbutils/src/auto/encoding_profile.rs index 244f0ec39..7eb7e12f6 100644 --- a/gstreamer-pbutils/src/auto/encoding_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_profile.rs @@ -6,11 +6,7 @@ use DiscovererInfo; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; -use std::mem; -use std::ptr; glib_wrapper! { pub struct EncodingProfile(Object); @@ -43,7 +39,7 @@ impl EncodingProfile { unsafe impl Send for EncodingProfile {} unsafe impl Sync for EncodingProfile {} -pub trait EncodingProfileExt { +pub trait EncodingProfileExt: 'static { fn copy(&self) -> EncodingProfile; fn get_allow_dynamic_output(&self) -> bool; diff --git a/gstreamer-pbutils/src/auto/encoding_target.rs b/gstreamer-pbutils/src/auto/encoding_target.rs index 696bf4ea3..80121f516 100644 --- a/gstreamer-pbutils/src/auto/encoding_target.rs +++ b/gstreamer-pbutils/src/auto/encoding_target.rs @@ -7,10 +7,7 @@ use Error; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use std; -use std::mem; use std::ptr; glib_wrapper! { @@ -53,7 +50,7 @@ impl EncodingTarget { unsafe impl Send for EncodingTarget {} unsafe impl Sync for EncodingTarget {} -pub trait EncodingTargetExt { +pub trait EncodingTargetExt: 'static { fn get_category(&self) -> String; fn get_description(&self) -> String; diff --git a/gstreamer-pbutils/src/auto/encoding_video_profile.rs b/gstreamer-pbutils/src/auto/encoding_video_profile.rs index 5aeab3c57..501a69462 100644 --- a/gstreamer-pbutils/src/auto/encoding_video_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_video_profile.rs @@ -5,10 +5,6 @@ use EncodingProfile; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct EncodingVideoProfile(Object): EncodingProfile; diff --git a/gstreamer-pbutils/src/auto/versions.txt b/gstreamer-pbutils/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-pbutils/src/auto/versions.txt +++ b/gstreamer-pbutils/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-player/src/auto/player.rs b/gstreamer-player/src/auto/player.rs index e82e89305..2f73ae987 100644 --- a/gstreamer-player/src/auto/player.rs +++ b/gstreamer-player/src/auto/player.rs @@ -16,7 +16,7 @@ use glib; use glib::StaticType; use glib::Value; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; @@ -25,9 +25,7 @@ use gst_ffi; use gst_video; use libc; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct Player(Object): [ @@ -287,7 +285,7 @@ impl Player { pub fn get_property_suburi(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "suburi".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"suburi\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -295,35 +293,35 @@ impl Player { pub fn set_property_suburi<'a, P: Into>>(&self, suburi: P) { let suburi = suburi.into(); unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "suburi".to_glib_none().0, Value::from(suburi).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"suburi\0".as_ptr() as *const _, Value::from(suburi).to_glib_none().0); } } pub fn get_property_video_multiview_flags(&self) -> gst_video::VideoMultiviewFlags { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "video-multiview-flags".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"video-multiview-flags\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_video_multiview_flags(&self, video_multiview_flags: gst_video::VideoMultiviewFlags) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "video-multiview-flags".to_glib_none().0, Value::from(&video_multiview_flags).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"video-multiview-flags\0".as_ptr() as *const _, Value::from(&video_multiview_flags).to_glib_none().0); } } pub fn get_property_video_multiview_mode(&self) -> gst_video::VideoMultiviewFramePacking { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "video-multiview-mode".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"video-multiview-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_video_multiview_mode(&self, video_multiview_mode: gst_video::VideoMultiviewFramePacking) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "video-multiview-mode".to_glib_none().0, Value::from(&video_multiview_mode).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"video-multiview-mode\0".as_ptr() as *const _, Value::from(&video_multiview_mode).to_glib_none().0); } } @@ -358,7 +356,7 @@ impl Player { pub fn connect_buffering(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "buffering", + connect_raw(self.to_glib_none().0, b"buffering\0".as_ptr() as *const _, transmute(buffering_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -366,7 +364,7 @@ impl Player { pub fn connect_end_of_stream(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "end-of-stream", + connect_raw(self.to_glib_none().0, b"end-of-stream\0".as_ptr() as *const _, transmute(end_of_stream_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -374,7 +372,7 @@ impl Player { pub fn connect_error(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "error", + connect_raw(self.to_glib_none().0, b"error\0".as_ptr() as *const _, transmute(error_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -382,7 +380,7 @@ impl Player { pub fn connect_media_info_updated(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "media-info-updated", + connect_raw(self.to_glib_none().0, b"media-info-updated\0".as_ptr() as *const _, transmute(media_info_updated_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -390,7 +388,7 @@ impl Player { pub fn connect_mute_changed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "mute-changed", + connect_raw(self.to_glib_none().0, b"mute-changed\0".as_ptr() as *const _, transmute(mute_changed_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -398,7 +396,7 @@ impl Player { pub fn connect_state_changed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "state-changed", + connect_raw(self.to_glib_none().0, b"state-changed\0".as_ptr() as *const _, transmute(state_changed_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -406,7 +404,7 @@ impl Player { pub fn connect_uri_loaded(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "uri-loaded", + connect_raw(self.to_glib_none().0, b"uri-loaded\0".as_ptr() as *const _, transmute(uri_loaded_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -414,7 +412,7 @@ impl Player { pub fn connect_video_dimensions_changed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "video-dimensions-changed", + connect_raw(self.to_glib_none().0, b"video-dimensions-changed\0".as_ptr() as *const _, transmute(video_dimensions_changed_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -422,7 +420,7 @@ impl Player { pub fn connect_volume_changed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "volume-changed", + connect_raw(self.to_glib_none().0, b"volume-changed\0".as_ptr() as *const _, transmute(volume_changed_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -430,7 +428,7 @@ impl Player { pub fn connect_warning(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "warning", + connect_raw(self.to_glib_none().0, b"warning\0".as_ptr() as *const _, transmute(warning_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -438,7 +436,7 @@ impl Player { pub fn connect_property_audio_video_offset_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::audio-video-offset", + connect_raw(self.to_glib_none().0, b"notify::audio-video-offset\0".as_ptr() as *const _, transmute(notify_audio_video_offset_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -446,7 +444,7 @@ impl Player { pub fn connect_property_current_audio_track_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::current-audio-track", + connect_raw(self.to_glib_none().0, b"notify::current-audio-track\0".as_ptr() as *const _, transmute(notify_current_audio_track_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -454,7 +452,7 @@ impl Player { pub fn connect_property_current_subtitle_track_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::current-subtitle-track", + connect_raw(self.to_glib_none().0, b"notify::current-subtitle-track\0".as_ptr() as *const _, transmute(notify_current_subtitle_track_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -462,7 +460,7 @@ impl Player { pub fn connect_property_current_video_track_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::current-video-track", + connect_raw(self.to_glib_none().0, b"notify::current-video-track\0".as_ptr() as *const _, transmute(notify_current_video_track_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -470,7 +468,7 @@ impl Player { pub fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::duration", + connect_raw(self.to_glib_none().0, b"notify::duration\0".as_ptr() as *const _, transmute(notify_duration_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -478,7 +476,7 @@ impl Player { pub fn connect_property_media_info_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::media-info", + connect_raw(self.to_glib_none().0, b"notify::media-info\0".as_ptr() as *const _, transmute(notify_media_info_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -486,7 +484,7 @@ impl Player { pub fn connect_property_mute_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::mute", + connect_raw(self.to_glib_none().0, b"notify::mute\0".as_ptr() as *const _, transmute(notify_mute_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -494,7 +492,7 @@ impl Player { pub fn connect_property_pipeline_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::pipeline", + connect_raw(self.to_glib_none().0, b"notify::pipeline\0".as_ptr() as *const _, transmute(notify_pipeline_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -502,7 +500,7 @@ impl Player { pub fn connect_property_position_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::position", + connect_raw(self.to_glib_none().0, b"notify::position\0".as_ptr() as *const _, transmute(notify_position_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -510,7 +508,7 @@ impl Player { pub fn connect_property_rate_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::rate", + connect_raw(self.to_glib_none().0, b"notify::rate\0".as_ptr() as *const _, transmute(notify_rate_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -518,7 +516,7 @@ impl Player { pub fn connect_property_suburi_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::suburi", + connect_raw(self.to_glib_none().0, b"notify::suburi\0".as_ptr() as *const _, transmute(notify_suburi_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -526,7 +524,7 @@ impl Player { pub fn connect_property_uri_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::uri", + connect_raw(self.to_glib_none().0, b"notify::uri\0".as_ptr() as *const _, transmute(notify_uri_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -534,7 +532,7 @@ impl Player { pub fn connect_property_video_multiview_flags_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::video-multiview-flags", + connect_raw(self.to_glib_none().0, b"notify::video-multiview-flags\0".as_ptr() as *const _, transmute(notify_video_multiview_flags_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -542,7 +540,7 @@ impl Player { pub fn connect_property_video_multiview_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::video-multiview-mode", + connect_raw(self.to_glib_none().0, b"notify::video-multiview-mode\0".as_ptr() as *const _, transmute(notify_video_multiview_mode_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -550,7 +548,7 @@ impl Player { pub fn connect_property_volume_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::volume", + connect_raw(self.to_glib_none().0, b"notify::volume\0".as_ptr() as *const _, transmute(notify_volume_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-player/src/auto/player_audio_info.rs b/gstreamer-player/src/auto/player_audio_info.rs index 18b95f30d..6e0900b44 100644 --- a/gstreamer-player/src/auto/player_audio_info.rs +++ b/gstreamer-player/src/auto/player_audio_info.rs @@ -5,10 +5,6 @@ use PlayerStreamInfo; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct PlayerAudioInfo(Object): PlayerStreamInfo; diff --git a/gstreamer-player/src/auto/player_gmain_context_signal_dispatcher.rs b/gstreamer-player/src/auto/player_gmain_context_signal_dispatcher.rs index d7ff572c7..c70a2a94a 100644 --- a/gstreamer-player/src/auto/player_gmain_context_signal_dispatcher.rs +++ b/gstreamer-player/src/auto/player_gmain_context_signal_dispatcher.rs @@ -8,10 +8,7 @@ use glib; use glib::StaticType; use glib::Value; use glib::translate::*; -use glib_ffi; use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct PlayerGMainContextSignalDispatcher(Object): PlayerSignalDispatcher; @@ -25,7 +22,7 @@ impl PlayerGMainContextSignalDispatcher { pub fn get_property_application_context(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "application-context".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"application-context\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } diff --git a/gstreamer-player/src/auto/player_media_info.rs b/gstreamer-player/src/auto/player_media_info.rs index 9c4a3a29d..bf23fdeb2 100644 --- a/gstreamer-player/src/auto/player_media_info.rs +++ b/gstreamer-player/src/auto/player_media_info.rs @@ -8,11 +8,7 @@ use PlayerSubtitleInfo; use PlayerVideoInfo; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; -use std::mem; -use std::ptr; glib_wrapper! { pub struct PlayerMediaInfo(Object); diff --git a/gstreamer-player/src/auto/player_signal_dispatcher.rs b/gstreamer-player/src/auto/player_signal_dispatcher.rs index 9d05a8010..5bf94486e 100644 --- a/gstreamer-player/src/auto/player_signal_dispatcher.rs +++ b/gstreamer-player/src/auto/player_signal_dispatcher.rs @@ -5,10 +5,6 @@ use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct PlayerSignalDispatcher(Object); @@ -21,6 +17,6 @@ glib_wrapper! { unsafe impl Send for PlayerSignalDispatcher {} unsafe impl Sync for PlayerSignalDispatcher {} -pub trait PlayerSignalDispatcherExt {} +pub trait PlayerSignalDispatcherExt: 'static {} impl> PlayerSignalDispatcherExt for O {} diff --git a/gstreamer-player/src/auto/player_stream_info.rs b/gstreamer-player/src/auto/player_stream_info.rs index af71fb380..37d5e10ec 100644 --- a/gstreamer-player/src/auto/player_stream_info.rs +++ b/gstreamer-player/src/auto/player_stream_info.rs @@ -5,11 +5,7 @@ use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; -use std::mem; -use std::ptr; glib_wrapper! { pub struct PlayerStreamInfo(Object); @@ -22,7 +18,7 @@ glib_wrapper! { unsafe impl Send for PlayerStreamInfo {} unsafe impl Sync for PlayerStreamInfo {} -pub trait PlayerStreamInfoExt { +pub trait PlayerStreamInfoExt: 'static { fn get_caps(&self) -> Option; fn get_codec(&self) -> Option; diff --git a/gstreamer-player/src/auto/player_subtitle_info.rs b/gstreamer-player/src/auto/player_subtitle_info.rs index d6cb44d4c..937e0300d 100644 --- a/gstreamer-player/src/auto/player_subtitle_info.rs +++ b/gstreamer-player/src/auto/player_subtitle_info.rs @@ -5,10 +5,6 @@ use PlayerStreamInfo; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct PlayerSubtitleInfo(Object): PlayerStreamInfo; diff --git a/gstreamer-player/src/auto/player_video_info.rs b/gstreamer-player/src/auto/player_video_info.rs index 1c1fd7169..d3337e2b8 100644 --- a/gstreamer-player/src/auto/player_video_info.rs +++ b/gstreamer-player/src/auto/player_video_info.rs @@ -5,10 +5,6 @@ use PlayerStreamInfo; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct PlayerVideoInfo(Object): PlayerStreamInfo; diff --git a/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs b/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs index 0dc679741..b3451ca4e 100644 --- a/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs @@ -9,7 +9,7 @@ use glib::StaticType; use glib::Value; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; @@ -17,7 +17,6 @@ use gst; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct PlayerVideoOverlayVideoRenderer(Object): PlayerVideoRenderer; @@ -62,14 +61,14 @@ impl PlayerVideoOverlayVideoRenderer { pub fn get_property_video_sink(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "video-sink".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"video-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - pub fn set_property_video_sink + IsA + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) { + pub fn set_property_video_sink + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "video-sink".to_glib_none().0, Value::from(video_sink).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"video-sink\0".as_ptr() as *const _, Value::from(video_sink).to_glib_none().0); } } @@ -84,7 +83,7 @@ impl PlayerVideoOverlayVideoRenderer { pub fn connect_property_video_sink_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::video-sink", + connect_raw(self.to_glib_none().0, b"notify::video-sink\0".as_ptr() as *const _, transmute(notify_video_sink_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -92,7 +91,7 @@ impl PlayerVideoOverlayVideoRenderer { pub fn connect_property_window_handle_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::window-handle", + connect_raw(self.to_glib_none().0, b"notify::window-handle\0".as_ptr() as *const _, transmute(notify_window_handle_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-player/src/auto/player_video_renderer.rs b/gstreamer-player/src/auto/player_video_renderer.rs index 4ed506308..1ec0f98fa 100644 --- a/gstreamer-player/src/auto/player_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_renderer.rs @@ -5,10 +5,6 @@ use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct PlayerVideoRenderer(Object); @@ -21,6 +17,6 @@ glib_wrapper! { unsafe impl Send for PlayerVideoRenderer {} unsafe impl Sync for PlayerVideoRenderer {} -pub trait PlayerVideoRendererExt {} +pub trait PlayerVideoRendererExt: 'static {} impl> PlayerVideoRendererExt for O {} diff --git a/gstreamer-player/src/auto/player_visualization.rs b/gstreamer-player/src/auto/player_visualization.rs index a13e96d0e..8769285b6 100644 --- a/gstreamer-player/src/auto/player_visualization.rs +++ b/gstreamer-player/src/auto/player_visualization.rs @@ -4,10 +4,6 @@ use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/gstreamer-player/src/auto/versions.txt b/gstreamer-player/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-player/src/auto/versions.txt +++ b/gstreamer-player/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-rtsp-server/src/auto/rtsp_address.rs b/gstreamer-rtsp-server/src/auto/rtsp_address.rs index 2e591f7ba..406a006a8 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_address.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_address.rs @@ -4,10 +4,6 @@ use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs index f3be7d6ec..7c12ded25 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs @@ -8,10 +8,6 @@ use ffi; use glib; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct RTSPAddressPool(Object); @@ -39,7 +35,7 @@ impl Default for RTSPAddressPool { unsafe impl Send for RTSPAddressPool {} unsafe impl Sync for RTSPAddressPool {} -pub trait RTSPAddressPoolExt { +pub trait RTSPAddressPoolExt: 'static { fn acquire_address(&self, flags: RTSPAddressFlags, n_ports: i32) -> Option; fn add_range(&self, min_address: &str, max_address: &str, min_port: u16, max_port: u16, ttl: u8) -> Result<(), glib::error::BoolError>; diff --git a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs index 29866620b..791d10931 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs @@ -6,20 +6,16 @@ use RTSPToken; use ffi; use gio; use gio_ffi; -use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; -use gobject_ffi; #[cfg(any(feature = "v1_12", feature = "dox"))] use gst_rtsp; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct RTSPAuth(Object); @@ -61,7 +57,7 @@ impl Default for RTSPAuth { unsafe impl Send for RTSPAuth {} unsafe impl Sync for RTSPAuth {} -pub trait RTSPAuthExt { +pub trait RTSPAuthExt: 'static { fn add_basic(&self, basic: &str, token: &RTSPToken); #[cfg(any(feature = "v1_12", feature = "dox"))] @@ -95,7 +91,7 @@ pub trait RTSPAuthExt { fn connect_accept_certificate bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; } -impl + IsA> RTSPAuthExt for O { +impl> RTSPAuthExt for O { fn add_basic(&self, basic: &str, token: &RTSPToken) { unsafe { ffi::gst_rtsp_auth_add_basic(self.to_glib_none().0, basic.to_glib_none().0, token.to_glib_none().0); @@ -185,7 +181,7 @@ impl + IsA> RTSPAuthExt for O { fn connect_accept_certificate bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ bool + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "accept-certificate", + connect_raw(self.to_glib_none().0 as *mut _, b"accept-certificate\0".as_ptr() as *const _, transmute(accept_certificate_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_client.rs b/gstreamer-rtsp-server/src/auto/rtsp_client.rs index b3773b3d2..581d1ce36 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_client.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_client.rs @@ -9,13 +9,12 @@ use RTSPSession; use RTSPSessionPool; use RTSPThreadPool; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; @@ -24,9 +23,7 @@ use gst_rtsp; #[cfg(any(feature = "v1_12", feature = "dox"))] use gst_rtsp_ffi; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct RTSPClient(Object); @@ -54,7 +51,7 @@ impl Default for RTSPClient { unsafe impl Send for RTSPClient {} unsafe impl Sync for RTSPClient {} -pub trait RTSPClientExt { +pub trait RTSPClientExt: 'static { fn close(&self); fn get_auth(&self) -> Option; @@ -156,7 +153,7 @@ pub trait RTSPClientExt { fn connect_property_session_pool_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> RTSPClientExt for O { +impl> RTSPClientExt for O { fn close(&self) { unsafe { ffi::gst_rtsp_client_close(self.to_glib_none().0); @@ -246,21 +243,21 @@ impl + IsA> RTSPClientExt for O { fn get_property_drop_backlog(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "drop-backlog".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"drop-backlog\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_drop_backlog(&self, drop_backlog: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "drop-backlog".to_glib_none().0, Value::from(&drop_backlog).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"drop-backlog\0".as_ptr() as *const _, Value::from(&drop_backlog).to_glib_none().0); } } fn connect_announce_request(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "announce-request", + connect_raw(self.to_glib_none().0 as *mut _, b"announce-request\0".as_ptr() as *const _, transmute(announce_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -272,7 +269,7 @@ impl + IsA> RTSPClientExt for O { fn connect_closed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "closed", + connect_raw(self.to_glib_none().0 as *mut _, b"closed\0".as_ptr() as *const _, transmute(closed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -280,7 +277,7 @@ impl + IsA> RTSPClientExt for O { fn connect_describe_request(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "describe-request", + connect_raw(self.to_glib_none().0 as *mut _, b"describe-request\0".as_ptr() as *const _, transmute(describe_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -288,7 +285,7 @@ impl + IsA> RTSPClientExt for O { fn connect_get_parameter_request(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "get-parameter-request", + connect_raw(self.to_glib_none().0 as *mut _, b"get-parameter-request\0".as_ptr() as *const _, transmute(get_parameter_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -296,7 +293,7 @@ impl + IsA> RTSPClientExt for O { fn connect_handle_response(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "handle-response", + connect_raw(self.to_glib_none().0 as *mut _, b"handle-response\0".as_ptr() as *const _, transmute(handle_response_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -304,7 +301,7 @@ impl + IsA> RTSPClientExt for O { fn connect_new_session(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "new-session", + connect_raw(self.to_glib_none().0 as *mut _, b"new-session\0".as_ptr() as *const _, transmute(new_session_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -312,7 +309,7 @@ impl + IsA> RTSPClientExt for O { fn connect_options_request(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "options-request", + connect_raw(self.to_glib_none().0 as *mut _, b"options-request\0".as_ptr() as *const _, transmute(options_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -320,7 +317,7 @@ impl + IsA> RTSPClientExt for O { fn connect_pause_request(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pause-request", + connect_raw(self.to_glib_none().0 as *mut _, b"pause-request\0".as_ptr() as *const _, transmute(pause_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -328,7 +325,7 @@ impl + IsA> RTSPClientExt for O { fn connect_play_request(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "play-request", + connect_raw(self.to_glib_none().0 as *mut _, b"play-request\0".as_ptr() as *const _, transmute(play_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -337,7 +334,7 @@ impl + IsA> RTSPClientExt for O { fn connect_pre_announce_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pre-announce-request", + connect_raw(self.to_glib_none().0 as *mut _, b"pre-announce-request\0".as_ptr() as *const _, transmute(pre_announce_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -346,7 +343,7 @@ impl + IsA> RTSPClientExt for O { fn connect_pre_describe_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pre-describe-request", + connect_raw(self.to_glib_none().0 as *mut _, b"pre-describe-request\0".as_ptr() as *const _, transmute(pre_describe_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -355,7 +352,7 @@ impl + IsA> RTSPClientExt for O { fn connect_pre_get_parameter_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pre-get-parameter-request", + connect_raw(self.to_glib_none().0 as *mut _, b"pre-get-parameter-request\0".as_ptr() as *const _, transmute(pre_get_parameter_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -364,7 +361,7 @@ impl + IsA> RTSPClientExt for O { fn connect_pre_options_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pre-options-request", + connect_raw(self.to_glib_none().0 as *mut _, b"pre-options-request\0".as_ptr() as *const _, transmute(pre_options_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -373,7 +370,7 @@ impl + IsA> RTSPClientExt for O { fn connect_pre_pause_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pre-pause-request", + connect_raw(self.to_glib_none().0 as *mut _, b"pre-pause-request\0".as_ptr() as *const _, transmute(pre_pause_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -382,7 +379,7 @@ impl + IsA> RTSPClientExt for O { fn connect_pre_play_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pre-play-request", + connect_raw(self.to_glib_none().0 as *mut _, b"pre-play-request\0".as_ptr() as *const _, transmute(pre_play_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -391,7 +388,7 @@ impl + IsA> RTSPClientExt for O { fn connect_pre_record_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pre-record-request", + connect_raw(self.to_glib_none().0 as *mut _, b"pre-record-request\0".as_ptr() as *const _, transmute(pre_record_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -400,7 +397,7 @@ impl + IsA> RTSPClientExt for O { fn connect_pre_set_parameter_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pre-set-parameter-request", + connect_raw(self.to_glib_none().0 as *mut _, b"pre-set-parameter-request\0".as_ptr() as *const _, transmute(pre_set_parameter_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -409,7 +406,7 @@ impl + IsA> RTSPClientExt for O { fn connect_pre_setup_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pre-setup-request", + connect_raw(self.to_glib_none().0 as *mut _, b"pre-setup-request\0".as_ptr() as *const _, transmute(pre_setup_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -418,7 +415,7 @@ impl + IsA> RTSPClientExt for O { fn connect_pre_teardown_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pre-teardown-request", + connect_raw(self.to_glib_none().0 as *mut _, b"pre-teardown-request\0".as_ptr() as *const _, transmute(pre_teardown_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -426,7 +423,7 @@ impl + IsA> RTSPClientExt for O { fn connect_record_request(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "record-request", + connect_raw(self.to_glib_none().0 as *mut _, b"record-request\0".as_ptr() as *const _, transmute(record_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -438,7 +435,7 @@ impl + IsA> RTSPClientExt for O { fn connect_set_parameter_request(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "set-parameter-request", + connect_raw(self.to_glib_none().0 as *mut _, b"set-parameter-request\0".as_ptr() as *const _, transmute(set_parameter_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -446,7 +443,7 @@ impl + IsA> RTSPClientExt for O { fn connect_setup_request(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "setup-request", + connect_raw(self.to_glib_none().0 as *mut _, b"setup-request\0".as_ptr() as *const _, transmute(setup_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -454,7 +451,7 @@ impl + IsA> RTSPClientExt for O { fn connect_teardown_request(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "teardown-request", + connect_raw(self.to_glib_none().0 as *mut _, b"teardown-request\0".as_ptr() as *const _, transmute(teardown_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -462,7 +459,7 @@ impl + IsA> RTSPClientExt for O { fn connect_property_drop_backlog_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::drop-backlog", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::drop-backlog\0".as_ptr() as *const _, transmute(notify_drop_backlog_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -470,7 +467,7 @@ impl + IsA> RTSPClientExt for O { fn connect_property_mount_points_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::mount-points", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::mount-points\0".as_ptr() as *const _, transmute(notify_mount_points_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -478,7 +475,7 @@ impl + IsA> RTSPClientExt for O { fn connect_property_session_pool_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::session-pool", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::session-pool\0".as_ptr() as *const _, transmute(notify_session_pool_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_media.rs index 493bcccbc..8dfaae865 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media.rs @@ -15,7 +15,7 @@ use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; @@ -23,9 +23,7 @@ use gst; use gst_rtsp; use libc; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct RTSPMedia(Object); @@ -47,7 +45,7 @@ impl RTSPMedia { unsafe impl Send for RTSPMedia {} unsafe impl Sync for RTSPMedia {} -pub trait RTSPMediaExt { +pub trait RTSPMediaExt: 'static { fn collect_streams(&self); //fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 9, id: 31 }) -> bool; @@ -209,7 +207,7 @@ pub trait RTSPMediaExt { fn connect_property_transport_mode_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> RTSPMediaExt for O { +impl> RTSPMediaExt for O { fn collect_streams(&self) { unsafe { ffi::gst_rtsp_media_collect_streams(self.to_glib_none().0); @@ -539,7 +537,7 @@ impl + IsA> RTSPMediaExt for O { fn get_property_eos_shutdown(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "eos-shutdown".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"eos-shutdown\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -547,7 +545,7 @@ impl + IsA> RTSPMediaExt for O { fn get_property_reusable(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "reusable".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"reusable\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -555,7 +553,7 @@ impl + IsA> RTSPMediaExt for O { fn get_property_shared(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "shared".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"shared\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -563,21 +561,21 @@ impl + IsA> RTSPMediaExt for O { fn get_property_stop_on_disconnect(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "stop-on-disconnect".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"stop-on-disconnect\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_time_provider(&self, time_provider: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "time-provider".to_glib_none().0, Value::from(&time_provider).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"time-provider\0".as_ptr() as *const _, Value::from(&time_provider).to_glib_none().0); } } fn connect_new_state(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "new-state", + connect_raw(self.to_glib_none().0 as *mut _, b"new-state\0".as_ptr() as *const _, transmute(new_state_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -585,7 +583,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_new_stream(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "new-stream", + connect_raw(self.to_glib_none().0 as *mut _, b"new-stream\0".as_ptr() as *const _, transmute(new_stream_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -593,7 +591,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_prepared(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "prepared", + connect_raw(self.to_glib_none().0 as *mut _, b"prepared\0".as_ptr() as *const _, transmute(prepared_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -601,7 +599,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_removed_stream(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "removed-stream", + connect_raw(self.to_glib_none().0 as *mut _, b"removed-stream\0".as_ptr() as *const _, transmute(removed_stream_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -609,7 +607,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_target_state(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "target-state", + connect_raw(self.to_glib_none().0 as *mut _, b"target-state\0".as_ptr() as *const _, transmute(target_state_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -617,7 +615,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_unprepared(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "unprepared", + connect_raw(self.to_glib_none().0 as *mut _, b"unprepared\0".as_ptr() as *const _, transmute(unprepared_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -625,7 +623,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_property_buffer_size_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::buffer-size", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::buffer-size\0".as_ptr() as *const _, transmute(notify_buffer_size_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -633,7 +631,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_property_clock_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::clock", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::clock\0".as_ptr() as *const _, transmute(notify_clock_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -641,7 +639,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_property_eos_shutdown_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::eos-shutdown", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::eos-shutdown\0".as_ptr() as *const _, transmute(notify_eos_shutdown_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -649,7 +647,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_property_latency_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::latency", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::latency\0".as_ptr() as *const _, transmute(notify_latency_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -657,7 +655,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_property_profiles_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::profiles", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::profiles\0".as_ptr() as *const _, transmute(notify_profiles_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -665,7 +663,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_property_protocols_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::protocols", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::protocols\0".as_ptr() as *const _, transmute(notify_protocols_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -673,7 +671,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_property_reusable_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::reusable", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::reusable\0".as_ptr() as *const _, transmute(notify_reusable_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -681,7 +679,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_property_shared_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::shared", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::shared\0".as_ptr() as *const _, transmute(notify_shared_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -689,7 +687,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_property_stop_on_disconnect_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::stop-on-disconnect", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::stop-on-disconnect\0".as_ptr() as *const _, transmute(notify_stop_on_disconnect_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -697,7 +695,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_property_suspend_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::suspend-mode", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::suspend-mode\0".as_ptr() as *const _, transmute(notify_suspend_mode_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -705,7 +703,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_property_time_provider_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::time-provider", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::time-provider\0".as_ptr() as *const _, transmute(notify_time_provider_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -713,7 +711,7 @@ impl + IsA> RTSPMediaExt for O { fn connect_property_transport_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::transport-mode", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::transport-mode\0".as_ptr() as *const _, transmute(notify_transport_mode_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs index 1d174c7e6..b56a22cf7 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs @@ -14,16 +14,14 @@ use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use gst_rtsp; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct RTSPMediaFactory(Object); @@ -51,7 +49,7 @@ impl Default for RTSPMediaFactory { unsafe impl Send for RTSPMediaFactory {} unsafe impl Sync for RTSPMediaFactory {} -pub trait RTSPMediaFactoryExt { +pub trait RTSPMediaFactoryExt: 'static { //fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs); fn construct(&self, url: &gst_rtsp::RTSPUrl) -> Option; @@ -159,7 +157,7 @@ pub trait RTSPMediaFactoryExt { fn connect_property_transport_mode_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> RTSPMediaFactoryExt for O { +impl> RTSPMediaFactoryExt for O { //fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { // unsafe { TODO: call ffi::gst_rtsp_media_factory_add_role() } //} @@ -385,7 +383,7 @@ impl + IsA> RTSPMediaFactoryExt f fn get_property_eos_shutdown(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "eos-shutdown".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"eos-shutdown\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -393,7 +391,7 @@ impl + IsA> RTSPMediaFactoryExt f fn get_property_shared(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "shared".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"shared\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -401,7 +399,7 @@ impl + IsA> RTSPMediaFactoryExt f fn get_property_stop_on_disconnect(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "stop-on-disconnect".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"stop-on-disconnect\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -409,7 +407,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_media_configure(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "media-configure", + connect_raw(self.to_glib_none().0 as *mut _, b"media-configure\0".as_ptr() as *const _, transmute(media_configure_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -417,7 +415,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_media_constructed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "media-constructed", + connect_raw(self.to_glib_none().0 as *mut _, b"media-constructed\0".as_ptr() as *const _, transmute(media_constructed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -425,7 +423,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_property_buffer_size_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::buffer-size", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::buffer-size\0".as_ptr() as *const _, transmute(notify_buffer_size_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -433,7 +431,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_property_clock_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::clock", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::clock\0".as_ptr() as *const _, transmute(notify_clock_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -441,7 +439,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_property_eos_shutdown_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::eos-shutdown", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::eos-shutdown\0".as_ptr() as *const _, transmute(notify_eos_shutdown_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -449,7 +447,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_property_latency_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::latency", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::latency\0".as_ptr() as *const _, transmute(notify_latency_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -457,7 +455,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_property_launch_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::launch", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::launch\0".as_ptr() as *const _, transmute(notify_launch_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -465,7 +463,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_property_profiles_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::profiles", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::profiles\0".as_ptr() as *const _, transmute(notify_profiles_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -473,7 +471,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_property_protocols_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::protocols", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::protocols\0".as_ptr() as *const _, transmute(notify_protocols_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -481,7 +479,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_property_shared_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::shared", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::shared\0".as_ptr() as *const _, transmute(notify_shared_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -489,7 +487,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_property_stop_on_disconnect_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::stop-on-disconnect", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::stop-on-disconnect\0".as_ptr() as *const _, transmute(notify_stop_on_disconnect_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -497,7 +495,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_property_suspend_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::suspend-mode", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::suspend-mode\0".as_ptr() as *const _, transmute(notify_suspend_mode_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -505,7 +503,7 @@ impl + IsA> RTSPMediaFactoryExt f fn connect_property_transport_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::transport-mode", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::transport-mode\0".as_ptr() as *const _, transmute(notify_transport_mode_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs b/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs index fc53f049a..625bbb104 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs @@ -4,20 +4,17 @@ use RTSPMediaFactory; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct RTSPMediaFactoryURI(Object): RTSPMediaFactory; @@ -45,7 +42,7 @@ impl Default for RTSPMediaFactoryURI { unsafe impl Send for RTSPMediaFactoryURI {} unsafe impl Sync for RTSPMediaFactoryURI {} -pub trait RTSPMediaFactoryURIExt { +pub trait RTSPMediaFactoryURIExt: 'static { fn get_uri(&self) -> Option; fn set_uri(&self, uri: &str); @@ -59,7 +56,7 @@ pub trait RTSPMediaFactoryURIExt { fn connect_property_use_gstpay_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> RTSPMediaFactoryURIExt for O { +impl> RTSPMediaFactoryURIExt for O { fn get_uri(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_media_factory_uri_get_uri(self.to_glib_none().0)) @@ -75,21 +72,21 @@ impl + IsA> RTSPMediaFactoryUR fn get_property_use_gstpay(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "use-gstpay".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"use-gstpay\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_use_gstpay(&self, use_gstpay: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "use-gstpay".to_glib_none().0, Value::from(&use_gstpay).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"use-gstpay\0".as_ptr() as *const _, Value::from(&use_gstpay).to_glib_none().0); } } fn connect_property_uri_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::uri", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::uri\0".as_ptr() as *const _, transmute(notify_uri_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -97,7 +94,7 @@ impl + IsA> RTSPMediaFactoryUR fn connect_property_use_gstpay_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::use-gstpay", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::use-gstpay\0".as_ptr() as *const _, transmute(notify_use_gstpay_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs b/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs index a33b5b255..26360fd4d 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs @@ -6,11 +6,8 @@ use RTSPMediaFactory; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst_rtsp; use std::mem; -use std::ptr; glib_wrapper! { pub struct RTSPMountPoints(Object); @@ -38,7 +35,7 @@ impl Default for RTSPMountPoints { unsafe impl Send for RTSPMountPoints {} unsafe impl Sync for RTSPMountPoints {} -pub trait RTSPMountPointsExt { +pub trait RTSPMountPointsExt: 'static { fn add_factory>(&self, path: &str, factory: &P); fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Option; diff --git a/gstreamer-rtsp-server/src/auto/rtsp_server.rs b/gstreamer-rtsp-server/src/auto/rtsp_server.rs index efac97c51..96a5be423 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_server.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_server.rs @@ -14,12 +14,10 @@ use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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; @@ -56,7 +54,7 @@ impl Default for RTSPServer { unsafe impl Send for RTSPServer {} unsafe impl Sync for RTSPServer {} -pub trait RTSPServerExt { +pub trait RTSPServerExt: 'static { //fn client_filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec; fn create_socket<'a, P: Into>>(&self, cancellable: P) -> Result; @@ -110,7 +108,7 @@ pub trait RTSPServerExt { fn connect_property_session_pool_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> RTSPServerExt for O { +impl> RTSPServerExt for O { //fn client_filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec { // unsafe { TODO: call ffi::gst_rtsp_server_client_filter() } //} @@ -244,7 +242,7 @@ impl + IsA> RTSPServerExt for O { fn connect_client_connected(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "client-connected", + connect_raw(self.to_glib_none().0 as *mut _, b"client-connected\0".as_ptr() as *const _, transmute(client_connected_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -252,7 +250,7 @@ impl + IsA> RTSPServerExt for O { fn connect_property_address_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::address", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::address\0".as_ptr() as *const _, transmute(notify_address_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -260,7 +258,7 @@ impl + IsA> RTSPServerExt for O { fn connect_property_backlog_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::backlog", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::backlog\0".as_ptr() as *const _, transmute(notify_backlog_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -268,7 +266,7 @@ impl + IsA> RTSPServerExt for O { fn connect_property_bound_port_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::bound-port", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::bound-port\0".as_ptr() as *const _, transmute(notify_bound_port_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -276,7 +274,7 @@ impl + IsA> RTSPServerExt for O { fn connect_property_mount_points_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::mount-points", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::mount-points\0".as_ptr() as *const _, transmute(notify_mount_points_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -284,7 +282,7 @@ impl + IsA> RTSPServerExt for O { fn connect_property_service_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::service", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::service\0".as_ptr() as *const _, transmute(notify_service_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -292,7 +290,7 @@ impl + IsA> RTSPServerExt for O { fn connect_property_session_pool_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::session-pool", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::session-pool\0".as_ptr() as *const _, transmute(notify_session_pool_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session.rs b/gstreamer-rtsp-server/src/auto/rtsp_session.rs index f438e57af..a95f2e819 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session.rs @@ -5,20 +5,18 @@ use RTSPMedia; use RTSPSessionMedia; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct RTSPSession(Object); @@ -40,7 +38,7 @@ impl RTSPSession { unsafe impl Send for RTSPSession {} unsafe impl Sync for RTSPSession {} -pub trait RTSPSessionExt { +pub trait RTSPSessionExt: 'static { fn allow_expire(&self); //fn filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec; @@ -80,7 +78,7 @@ pub trait RTSPSessionExt { fn connect_property_timeout_always_visible_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> RTSPSessionExt for O { +impl> RTSPSessionExt for O { fn allow_expire(&self) { unsafe { ffi::gst_rtsp_session_allow_expire(self.to_glib_none().0); @@ -170,21 +168,21 @@ impl + IsA> RTSPSessionExt for O { fn get_property_timeout_always_visible(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "timeout-always-visible".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"timeout-always-visible\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_timeout_always_visible(&self, timeout_always_visible: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "timeout-always-visible".to_glib_none().0, Value::from(&timeout_always_visible).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"timeout-always-visible\0".as_ptr() as *const _, Value::from(&timeout_always_visible).to_glib_none().0); } } fn connect_property_timeout_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::timeout", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::timeout\0".as_ptr() as *const _, transmute(notify_timeout_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -192,7 +190,7 @@ impl + IsA> RTSPSessionExt for O { fn connect_property_timeout_always_visible_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::timeout-always-visible", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::timeout-always-visible\0".as_ptr() as *const _, transmute(notify_timeout_always_visible_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs index 86be1c931..986cb4072 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs @@ -8,11 +8,8 @@ use ffi; use glib; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use std::mem; -use std::ptr; glib_wrapper! { pub struct RTSPSessionMedia(Object); @@ -34,7 +31,7 @@ impl RTSPSessionMedia { unsafe impl Send for RTSPSessionMedia {} unsafe impl Sync for RTSPSessionMedia {} -pub trait RTSPSessionMediaExt { +pub trait RTSPSessionMediaExt: 'static { //fn alloc_channels(&self, range: /*Ignored*/gst_rtsp::RTSPRange) -> bool; fn get_base_time(&self) -> gst::ClockTime; diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs index 73be899af..5f34e5c5f 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs @@ -8,14 +8,11 @@ use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct RTSPSessionPool(Object); @@ -43,7 +40,7 @@ impl Default for RTSPSessionPool { unsafe impl Send for RTSPSessionPool {} unsafe impl Sync for RTSPSessionPool {} -pub trait RTSPSessionPoolExt { +pub trait RTSPSessionPoolExt: 'static { fn cleanup(&self) -> u32; fn create(&self) -> Option; @@ -65,7 +62,7 @@ pub trait RTSPSessionPoolExt { fn connect_property_max_sessions_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> RTSPSessionPoolExt for O { +impl> RTSPSessionPoolExt for O { fn cleanup(&self) -> u32 { unsafe { ffi::gst_rtsp_session_pool_cleanup(self.to_glib_none().0) @@ -115,7 +112,7 @@ impl + IsA> RTSPSessionPoolExt for fn connect_session_removed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "session-removed", + connect_raw(self.to_glib_none().0 as *mut _, b"session-removed\0".as_ptr() as *const _, transmute(session_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -123,7 +120,7 @@ impl + IsA> RTSPSessionPoolExt for fn connect_property_max_sessions_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::max-sessions", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::max-sessions\0".as_ptr() as *const _, transmute(notify_max_sessions_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs index 42d2f3386..7c1921b43 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs @@ -12,17 +12,15 @@ use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; -use gobject_ffi; use gst; use gst_ffi; use gst_rtsp; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct RTSPStream(Object); @@ -44,7 +42,7 @@ impl RTSPStream { unsafe impl Send for RTSPStream {} unsafe impl Sync for RTSPStream {} -pub trait RTSPStreamExt { +pub trait RTSPStreamExt: 'static { fn add_transport(&self, trans: &RTSPStreamTransport) -> Result<(), glib::error::BoolError>; //fn allocate_udp_sockets(&self, family: gio::SocketFamily, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport, use_client_settings: bool) -> bool; @@ -184,7 +182,7 @@ pub trait RTSPStreamExt { fn connect_property_protocols_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> RTSPStreamExt for O { +impl> RTSPStreamExt for O { fn add_transport(&self, trans: &RTSPStreamTransport) -> Result<(), glib::error::BoolError> { unsafe { glib::error::BoolError::from_glib(ffi::gst_rtsp_stream_add_transport(self.to_glib_none().0, trans.to_glib_none().0), "Failed to add transport") @@ -579,7 +577,7 @@ impl + IsA> RTSPStreamExt for O { fn connect_new_rtcp_encoder(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "new-rtcp-encoder", + connect_raw(self.to_glib_none().0 as *mut _, b"new-rtcp-encoder\0".as_ptr() as *const _, transmute(new_rtcp_encoder_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -587,7 +585,7 @@ impl + IsA> RTSPStreamExt for O { fn connect_new_rtp_encoder(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "new-rtp-encoder", + connect_raw(self.to_glib_none().0 as *mut _, b"new-rtp-encoder\0".as_ptr() as *const _, transmute(new_rtp_encoder_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -595,7 +593,7 @@ impl + IsA> RTSPStreamExt for O { fn connect_property_control_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::control", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::control\0".as_ptr() as *const _, transmute(notify_control_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -603,7 +601,7 @@ impl + IsA> RTSPStreamExt for O { fn connect_property_profiles_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::profiles", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::profiles\0".as_ptr() as *const _, transmute(notify_profiles_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -611,7 +609,7 @@ impl + IsA> RTSPStreamExt for O { fn connect_property_protocols_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::protocols", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::protocols\0".as_ptr() as *const _, transmute(notify_protocols_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs index f73bd334d..3fce76479 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs @@ -7,12 +7,8 @@ use ffi; use glib; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use gst_rtsp; -use std::mem; -use std::ptr; glib_wrapper! { pub struct RTSPStreamTransport(Object); @@ -28,7 +24,7 @@ impl RTSPStreamTransport { //} } -pub trait RTSPStreamTransportExt { +pub trait RTSPStreamTransportExt: 'static { fn get_rtpinfo(&self, start_time: gst::ClockTime) -> Option; fn get_stream(&self) -> Option; diff --git a/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs index d10e34efb..c4369977e 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs @@ -3,18 +3,14 @@ // DO NOT EDIT use ffi; -use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct RTSPThreadPool(Object); @@ -49,7 +45,7 @@ impl Default for RTSPThreadPool { unsafe impl Send for RTSPThreadPool {} unsafe impl Sync for RTSPThreadPool {} -pub trait RTSPThreadPoolExt { +pub trait RTSPThreadPoolExt: 'static { fn get_max_threads(&self) -> i32; //fn get_thread(&self, type_: RTSPThreadType, ctx: &RTSPContext) -> /*Ignored*/Option; @@ -59,7 +55,7 @@ pub trait RTSPThreadPoolExt { fn connect_property_max_threads_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> RTSPThreadPoolExt for O { +impl> RTSPThreadPoolExt for O { fn get_max_threads(&self) -> i32 { unsafe { ffi::gst_rtsp_thread_pool_get_max_threads(self.to_glib_none().0) @@ -79,7 +75,7 @@ impl + IsA> RTSPThreadPoolExt for O fn connect_property_max_threads_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::max-threads", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::max-threads\0".as_ptr() as *const _, transmute(notify_max_threads_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-rtsp-server/src/auto/versions.txt b/gstreamer-rtsp-server/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-rtsp-server/src/auto/versions.txt +++ b/gstreamer-rtsp-server/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-rtsp/src/auto/rtsp_auth_param.rs b/gstreamer-rtsp/src/auto/rtsp_auth_param.rs index fe401406e..adda78782 100644 --- a/gstreamer-rtsp/src/auto/rtsp_auth_param.rs +++ b/gstreamer-rtsp/src/auto/rtsp_auth_param.rs @@ -4,10 +4,6 @@ use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/gstreamer-rtsp/src/auto/rtsp_url.rs b/gstreamer-rtsp/src/auto/rtsp_url.rs index c41de260c..7c9e2041a 100644 --- a/gstreamer-rtsp/src/auto/rtsp_url.rs +++ b/gstreamer-rtsp/src/auto/rtsp_url.rs @@ -5,9 +5,6 @@ use RTSPResult; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; use std::ptr; glib_wrapper! { diff --git a/gstreamer-rtsp/src/auto/versions.txt b/gstreamer-rtsp/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-rtsp/src/auto/versions.txt +++ b/gstreamer-rtsp/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-sdp/src/auto/mikey_message.rs b/gstreamer-sdp/src/auto/mikey_message.rs index 8b486123b..660f60795 100644 --- a/gstreamer-sdp/src/auto/mikey_message.rs +++ b/gstreamer-sdp/src/auto/mikey_message.rs @@ -10,11 +10,8 @@ use MIKEYPayloadType; use MIKEYType; use ffi; use glib::translate::*; -use glib_ffi; use gobject_ffi; use gst; -use std::mem; -use std::ptr; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/gstreamer-sdp/src/auto/mikey_payload.rs b/gstreamer-sdp/src/auto/mikey_payload.rs index a5226ec7d..3e1bd03e0 100644 --- a/gstreamer-sdp/src/auto/mikey_payload.rs +++ b/gstreamer-sdp/src/auto/mikey_payload.rs @@ -10,10 +10,7 @@ use MIKEYPayloadType; use MIKEYSecProto; use ffi; use glib::translate::*; -use glib_ffi; use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/gstreamer-sdp/src/auto/versions.txt b/gstreamer-sdp/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-sdp/src/auto/versions.txt +++ b/gstreamer-sdp/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-sdp/src/sdp_media.rs b/gstreamer-sdp/src/sdp_media.rs index 9205de8a1..9cf87dad5 100644 --- a/gstreamer-sdp/src/sdp_media.rs +++ b/gstreamer-sdp/src/sdp_media.rs @@ -12,7 +12,6 @@ use std::ptr; use ffi; use glib::translate::*; -use glib_ffi; use gst; use sdp_attribute::SDPAttribute; diff --git a/gstreamer-sdp/src/sdp_message.rs b/gstreamer-sdp/src/sdp_message.rs index b397fc688..733e5bbf8 100644 --- a/gstreamer-sdp/src/sdp_message.rs +++ b/gstreamer-sdp/src/sdp_message.rs @@ -8,6 +8,7 @@ use std::ffi::CStr; use std::mem; +#[cfg(any(feature = "v1_8_1", feature = "dox"))] use std::ptr; use ffi; diff --git a/gstreamer-video/src/auto/versions.txt b/gstreamer-video/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-video/src/auto/versions.txt +++ b/gstreamer-video/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-video/src/auto/video_filter.rs b/gstreamer-video/src/auto/video_filter.rs index b207f67ed..14efb79a9 100644 --- a/gstreamer-video/src/auto/video_filter.rs +++ b/gstreamer-video/src/auto/video_filter.rs @@ -4,14 +4,10 @@ use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use gst; use gst_base; use gst_base_ffi; use gst_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct VideoFilter(Object): [ diff --git a/gstreamer-video/src/auto/video_overlay.rs b/gstreamer-video/src/auto/video_overlay.rs index f61fb98f3..6aec54911 100644 --- a/gstreamer-video/src/auto/video_overlay.rs +++ b/gstreamer-video/src/auto/video_overlay.rs @@ -6,10 +6,6 @@ use ffi; use glib; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct VideoOverlay(Object); @@ -32,7 +28,7 @@ impl VideoOverlay { unsafe impl Send for VideoOverlay {} unsafe impl Sync for VideoOverlay {} -pub trait VideoOverlayExt { +pub trait VideoOverlayExt: 'static { fn expose(&self); //fn got_window_handle(&self, handle: /*Unimplemented*/Fundamental: UIntPtr); diff --git a/gstreamer-webrtc/src/auto/versions.txt b/gstreamer-webrtc/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer-webrtc/src/auto/versions.txt +++ b/gstreamer-webrtc/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-webrtc/src/auto/web_rtc_session_description.rs b/gstreamer-webrtc/src/auto/web_rtc_session_description.rs index 0a000d839..d04361cdd 100644 --- a/gstreamer-webrtc/src/auto/web_rtc_session_description.rs +++ b/gstreamer-webrtc/src/auto/web_rtc_session_description.rs @@ -4,10 +4,6 @@ use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs b/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs index 110d720e8..fbf1c4bac 100644 --- a/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs @@ -8,14 +8,12 @@ use ffi; use glib::StaticType; use glib::Value; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct WebRTCDTLSTransport(Object); @@ -42,7 +40,7 @@ impl WebRTCDTLSTransport { pub fn get_property_certificate(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "certificate".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"certificate\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -50,28 +48,28 @@ impl WebRTCDTLSTransport { pub fn set_property_certificate<'a, P: Into>>(&self, certificate: P) { let certificate = certificate.into(); unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "certificate".to_glib_none().0, Value::from(certificate).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"certificate\0".as_ptr() as *const _, Value::from(certificate).to_glib_none().0); } } pub fn get_property_client(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "client".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"client\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_client(&self, client: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "client".to_glib_none().0, Value::from(&client).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"client\0".as_ptr() as *const _, Value::from(&client).to_glib_none().0); } } pub fn get_property_remote_certificate(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "remote-certificate".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"remote-certificate\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -79,7 +77,7 @@ impl WebRTCDTLSTransport { pub fn get_property_rtcp(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "rtcp".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"rtcp\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -87,7 +85,7 @@ impl WebRTCDTLSTransport { pub fn get_property_session_id(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "session-id".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"session-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -95,7 +93,7 @@ impl WebRTCDTLSTransport { pub fn get_property_state(&self) -> WebRTCDTLSTransportState { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "state".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"state\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -103,7 +101,7 @@ impl WebRTCDTLSTransport { pub fn get_property_transport(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "transport".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"transport\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -111,7 +109,7 @@ impl WebRTCDTLSTransport { pub fn connect_property_certificate_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::certificate", + connect_raw(self.to_glib_none().0, b"notify::certificate\0".as_ptr() as *const _, transmute(notify_certificate_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -119,7 +117,7 @@ impl WebRTCDTLSTransport { pub fn connect_property_client_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::client", + connect_raw(self.to_glib_none().0, b"notify::client\0".as_ptr() as *const _, transmute(notify_client_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -127,7 +125,7 @@ impl WebRTCDTLSTransport { pub fn connect_property_remote_certificate_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::remote-certificate", + connect_raw(self.to_glib_none().0, b"notify::remote-certificate\0".as_ptr() as *const _, transmute(notify_remote_certificate_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -135,7 +133,7 @@ impl WebRTCDTLSTransport { pub fn connect_property_state_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::state", + connect_raw(self.to_glib_none().0, b"notify::state\0".as_ptr() as *const _, transmute(notify_state_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -143,7 +141,7 @@ impl WebRTCDTLSTransport { pub fn connect_property_transport_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::transport", + connect_raw(self.to_glib_none().0, b"notify::transport\0".as_ptr() as *const _, transmute(notify_transport_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-webrtc/src/auto/web_rtcice_transport.rs b/gstreamer-webrtc/src/auto/web_rtcice_transport.rs index 7b8ae7a02..878fcfb0b 100644 --- a/gstreamer-webrtc/src/auto/web_rtcice_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcice_transport.rs @@ -9,15 +9,13 @@ use ffi; use glib::StaticType; use glib::Value; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use libc; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct WebRTCICETransport(Object); @@ -55,7 +53,7 @@ impl WebRTCICETransport { pub fn get_property_component(&self) -> WebRTCICEComponent { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "component".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"component\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -63,7 +61,7 @@ impl WebRTCICETransport { pub fn get_property_gathering_state(&self) -> WebRTCICEGatheringState { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "gathering-state".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"gathering-state\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -71,7 +69,7 @@ impl WebRTCICETransport { pub fn get_property_state(&self) -> WebRTCICEConnectionState { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "state".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"state\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -79,7 +77,7 @@ impl WebRTCICETransport { pub fn connect_on_new_candidate(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "on-new-candidate", + connect_raw(self.to_glib_none().0, b"on-new-candidate\0".as_ptr() as *const _, transmute(on_new_candidate_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -87,7 +85,7 @@ impl WebRTCICETransport { pub fn connect_on_selected_candidate_pair_change(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "on-selected-candidate-pair-change", + connect_raw(self.to_glib_none().0, b"on-selected-candidate-pair-change\0".as_ptr() as *const _, transmute(on_selected_candidate_pair_change_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -95,7 +93,7 @@ impl WebRTCICETransport { pub fn connect_property_gathering_state_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::gathering-state", + connect_raw(self.to_glib_none().0, b"notify::gathering-state\0".as_ptr() as *const _, transmute(notify_gathering_state_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -103,7 +101,7 @@ impl WebRTCICETransport { pub fn connect_property_state_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::state", + connect_raw(self.to_glib_none().0, b"notify::state\0".as_ptr() as *const _, transmute(notify_state_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs index 656b572bd..5587245e3 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs @@ -5,10 +5,6 @@ use WebRTCDTLSTransport; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct WebRTCRTPReceiver(Object); diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs index d6e746d59..ecc7408dc 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs @@ -5,10 +5,6 @@ use WebRTCDTLSTransport; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct WebRTCRTPSender(Object); diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs index 6039d760f..d08278fa2 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs @@ -8,10 +8,7 @@ use ffi; use glib::StaticType; use glib::Value; use glib::translate::*; -use glib_ffi; use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct WebRTCRTPTransceiver(Object); @@ -25,7 +22,7 @@ impl WebRTCRTPTransceiver { pub fn get_property_mlineindex(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "mlineindex".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"mlineindex\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -33,7 +30,7 @@ impl WebRTCRTPTransceiver { pub fn get_property_receiver(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "receiver".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"receiver\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -41,7 +38,7 @@ impl WebRTCRTPTransceiver { pub fn get_property_sender(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "sender".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"sender\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } diff --git a/gstreamer/src/auto/bin.rs b/gstreamer/src/auto/bin.rs index 10846a765..03f2946a9 100644 --- a/gstreamer/src/auto/bin.rs +++ b/gstreamer/src/auto/bin.rs @@ -17,14 +17,12 @@ use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct Bin(Object): Element, Object, ChildProxy; @@ -48,7 +46,7 @@ impl Bin { unsafe impl Send for Bin {} unsafe impl Sync for Bin {} -pub trait GstBinExt { +pub trait GstBinExt: 'static { fn add>(&self, element: &P) -> Result<(), glib::error::BoolError>; //fn add_many>(&self, element_1: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs); @@ -112,7 +110,7 @@ pub trait GstBinExt { fn connect_property_message_forward_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> GstBinExt for O { +impl> GstBinExt for O { fn add>(&self, element: &P) -> Result<(), glib::error::BoolError> { unsafe { glib::error::BoolError::from_glib(ffi::gst_bin_add(self.to_glib_none().0, element.to_glib_none().0), "Failed to add element") @@ -210,28 +208,28 @@ impl + IsA> GstBinExt for O { fn get_property_async_handling(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "async-handling".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"async-handling\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_async_handling(&self, async_handling: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "async-handling".to_glib_none().0, Value::from(&async_handling).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"async-handling\0".as_ptr() as *const _, Value::from(&async_handling).to_glib_none().0); } } fn get_property_message_forward(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "message-forward".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"message-forward\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_message_forward(&self, message_forward: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "message-forward".to_glib_none().0, Value::from(&message_forward).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"message-forward\0".as_ptr() as *const _, Value::from(&message_forward).to_glib_none().0); } } @@ -239,7 +237,7 @@ impl + IsA> GstBinExt for O { fn connect_deep_element_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "deep-element-added", + connect_raw(self.to_glib_none().0 as *mut _, b"deep-element-added\0".as_ptr() as *const _, transmute(deep_element_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -248,7 +246,7 @@ impl + IsA> GstBinExt for O { fn connect_deep_element_removed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "deep-element-removed", + connect_raw(self.to_glib_none().0 as *mut _, b"deep-element-removed\0".as_ptr() as *const _, transmute(deep_element_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -256,7 +254,7 @@ impl + IsA> GstBinExt for O { fn connect_do_latency bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ bool + Send + Sync + 'static>> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "do-latency", + connect_raw(self.to_glib_none().0 as *mut _, b"do-latency\0".as_ptr() as *const _, transmute(do_latency_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -264,7 +262,7 @@ impl + IsA> GstBinExt for O { fn connect_element_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "element-added", + connect_raw(self.to_glib_none().0 as *mut _, b"element-added\0".as_ptr() as *const _, transmute(element_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -272,7 +270,7 @@ impl + IsA> GstBinExt for O { fn connect_element_removed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "element-removed", + connect_raw(self.to_glib_none().0 as *mut _, b"element-removed\0".as_ptr() as *const _, transmute(element_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -280,7 +278,7 @@ impl + IsA> GstBinExt for O { fn connect_property_async_handling_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::async-handling", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::async-handling\0".as_ptr() as *const _, transmute(notify_async_handling_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -288,7 +286,7 @@ impl + IsA> GstBinExt for O { fn connect_property_message_forward_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::message-forward", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::message-forward\0".as_ptr() as *const _, transmute(notify_message_forward_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/buffer_pool.rs b/gstreamer/src/auto/buffer_pool.rs index 98eb7ebfa..b1f80eae2 100644 --- a/gstreamer/src/auto/buffer_pool.rs +++ b/gstreamer/src/auto/buffer_pool.rs @@ -7,10 +7,6 @@ use ffi; use glib; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct BufferPool(Object): Object; @@ -23,7 +19,7 @@ glib_wrapper! { unsafe impl Send for BufferPool {} unsafe impl Sync for BufferPool {} -pub trait BufferPoolExt { +pub trait BufferPoolExt: 'static { fn get_options(&self) -> Vec; fn has_option(&self, option: &str) -> bool; diff --git a/gstreamer/src/auto/bus.rs b/gstreamer/src/auto/bus.rs index fa00f3fc6..f00c57162 100644 --- a/gstreamer/src/auto/bus.rs +++ b/gstreamer/src/auto/bus.rs @@ -8,14 +8,11 @@ use Object; use ffi; use glib; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct Bus(Object): Object; @@ -127,7 +124,7 @@ impl Bus { pub fn connect_message(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "message", + connect_raw(self.to_glib_none().0, b"message\0".as_ptr() as *const _, transmute(message_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -135,7 +132,7 @@ impl Bus { pub fn connect_sync_message(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "sync-message", + connect_raw(self.to_glib_none().0, b"sync-message\0".as_ptr() as *const _, transmute(sync_message_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/child_proxy.rs b/gstreamer/src/auto/child_proxy.rs index a5fb67cb1..ef0a5a1d3 100644 --- a/gstreamer/src/auto/child_proxy.rs +++ b/gstreamer/src/auto/child_proxy.rs @@ -7,15 +7,13 @@ use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use libc; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct ChildProxy(Object); @@ -28,7 +26,7 @@ glib_wrapper! { unsafe impl Send for ChildProxy {} unsafe impl Sync for ChildProxy {} -pub trait ChildProxyExt { +pub trait ChildProxyExt: 'static { fn child_added>(&self, child: &P, name: &str); fn child_removed>(&self, child: &P, name: &str); @@ -58,7 +56,7 @@ pub trait ChildProxyExt { fn connect_child_removed(&self, f: F) -> SignalHandlerId; } -impl + IsA> ChildProxyExt for O { +impl> ChildProxyExt for O { fn child_added>(&self, child: &P, name: &str) { unsafe { ffi::gst_child_proxy_child_added(self.to_glib_none().0, child.to_glib_none().0, name.to_glib_none().0); @@ -120,7 +118,7 @@ impl + IsA> ChildProxyExt for O { fn connect_child_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "child-added", + connect_raw(self.to_glib_none().0 as *mut _, b"child-added\0".as_ptr() as *const _, transmute(child_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -128,7 +126,7 @@ impl + IsA> ChildProxyExt for O { fn connect_child_removed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "child-removed", + connect_raw(self.to_glib_none().0 as *mut _, b"child-removed\0".as_ptr() as *const _, transmute(child_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/clock.rs b/gstreamer/src/auto/clock.rs index d0ce888d4..1e3ccf281 100644 --- a/gstreamer/src/auto/clock.rs +++ b/gstreamer/src/auto/clock.rs @@ -11,14 +11,13 @@ use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct Clock(Object): Object; @@ -61,7 +60,7 @@ impl Clock { unsafe impl Send for Clock {} unsafe impl Sync for Clock {} -pub trait ClockExt { +pub trait ClockExt: 'static { fn add_observation(&self, slave: ClockTime, master: ClockTime) -> Option; fn add_observation_unapplied(&self, slave: ClockTime, master: ClockTime) -> Option<(f64, ClockTime, ClockTime, ClockTime, ClockTime)>; @@ -121,7 +120,7 @@ pub trait ClockExt { fn connect_property_window_threshold_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> ClockExt for O { +impl> ClockExt for O { fn add_observation(&self, slave: ClockTime, master: ClockTime) -> Option { unsafe { let mut r_squared = mem::uninitialized(); @@ -258,35 +257,35 @@ impl + IsA> ClockExt for O { fn get_property_window_size(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "window-size".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"window-size\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_window_size(&self, window_size: i32) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "window-size".to_glib_none().0, Value::from(&window_size).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"window-size\0".as_ptr() as *const _, Value::from(&window_size).to_glib_none().0); } } fn get_property_window_threshold(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "window-threshold".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"window-threshold\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_window_threshold(&self, window_threshold: i32) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "window-threshold".to_glib_none().0, Value::from(&window_threshold).to_glib_none().0); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"window-threshold\0".as_ptr() as *const _, Value::from(&window_threshold).to_glib_none().0); } } fn connect_synced(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "synced", + connect_raw(self.to_glib_none().0 as *mut _, b"synced\0".as_ptr() as *const _, transmute(synced_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -294,7 +293,7 @@ impl + IsA> ClockExt for O { fn connect_property_timeout_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::timeout", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::timeout\0".as_ptr() as *const _, transmute(notify_timeout_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -302,7 +301,7 @@ impl + IsA> ClockExt for O { fn connect_property_window_size_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::window-size", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::window-size\0".as_ptr() as *const _, transmute(notify_window_size_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -310,7 +309,7 @@ impl + IsA> ClockExt for O { fn connect_property_window_threshold_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::window-threshold", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::window-threshold\0".as_ptr() as *const _, transmute(notify_window_threshold_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/date_time.rs b/gstreamer/src/auto/date_time.rs index 1df707921..c4c4281b9 100644 --- a/gstreamer/src/auto/date_time.rs +++ b/gstreamer/src/auto/date_time.rs @@ -5,10 +5,6 @@ use ffi; use glib; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/gstreamer/src/auto/device.rs b/gstreamer/src/auto/device.rs index e1ed84671..311bc8b17 100644 --- a/gstreamer/src/auto/device.rs +++ b/gstreamer/src/auto/device.rs @@ -7,18 +7,14 @@ use Element; use Object; use Structure; use ffi; -use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct Device(Object): Object; @@ -31,7 +27,7 @@ glib_wrapper! { unsafe impl Send for Device {} unsafe impl Sync for Device {} -pub trait DeviceExt { +pub trait DeviceExt: 'static { fn create_element<'a, P: Into>>(&self, name: P) -> Option; fn get_caps(&self) -> Option; @@ -51,7 +47,7 @@ pub trait DeviceExt { fn connect_removed(&self, f: F) -> SignalHandlerId; } -impl + IsA> DeviceExt for O { +impl> DeviceExt for O { fn create_element<'a, P: Into>>(&self, name: P) -> Option { let name = name.into(); let name = name.to_glib_none(); @@ -105,7 +101,7 @@ impl + IsA> DeviceExt for O { fn connect_removed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "removed", + connect_raw(self.to_glib_none().0 as *mut _, b"removed\0".as_ptr() as *const _, transmute(removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/device_monitor.rs b/gstreamer/src/auto/device_monitor.rs index e00170479..532157406 100644 --- a/gstreamer/src/auto/device_monitor.rs +++ b/gstreamer/src/auto/device_monitor.rs @@ -13,14 +13,12 @@ use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct DeviceMonitor(Object): Object; @@ -33,7 +31,7 @@ glib_wrapper! { unsafe impl Send for DeviceMonitor {} unsafe impl Sync for DeviceMonitor {} -pub trait DeviceMonitorExt { +pub trait DeviceMonitorExt: 'static { fn add_filter<'a, 'b, P: Into>, Q: Into>>(&self, classes: P, caps: Q) -> u32; fn get_bus(&self) -> Bus; @@ -59,7 +57,7 @@ pub trait DeviceMonitorExt { fn connect_property_show_all_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> DeviceMonitorExt for O { +impl> DeviceMonitorExt for O { fn add_filter<'a, 'b, P: Into>, Q: Into>>(&self, classes: P, caps: Q) -> u32 { let classes = classes.into(); let classes = classes.to_glib_none(); @@ -121,21 +119,21 @@ impl + IsA> DeviceMonitorExt for O { fn get_property_show_all(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "show-all".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"show-all\0".as_ptr() as *const _, 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"show-all\0".as_ptr() as *const _, Value::from(&show_all).to_glib_none().0); } } fn connect_property_show_all_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::show-all", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::show-all\0".as_ptr() as *const _, transmute(notify_show_all_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/device_provider.rs b/gstreamer/src/auto/device_provider.rs index 805433f08..01c35a9ff 100644 --- a/gstreamer/src/auto/device_provider.rs +++ b/gstreamer/src/auto/device_provider.rs @@ -12,15 +12,12 @@ use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; -use gobject_ffi; use libc; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct DeviceProvider(Object): Object; @@ -44,7 +41,7 @@ impl DeviceProvider { unsafe impl Send for DeviceProvider {} unsafe impl Sync for DeviceProvider {} -pub trait DeviceProviderExt { +pub trait DeviceProviderExt: 'static { fn can_monitor(&self) -> bool; fn device_add(&self, device: &Device); @@ -72,7 +69,7 @@ pub trait DeviceProviderExt { fn connect_provider_unhidden(&self, f: F) -> SignalHandlerId; } -impl + IsA> DeviceProviderExt for O { +impl> DeviceProviderExt for O { fn can_monitor(&self) -> bool { unsafe { from_glib(ffi::gst_device_provider_can_monitor(self.to_glib_none().0)) @@ -142,7 +139,7 @@ impl + IsA> DeviceProviderExt for O fn connect_provider_hidden(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "provider-hidden", + connect_raw(self.to_glib_none().0 as *mut _, b"provider-hidden\0".as_ptr() as *const _, transmute(provider_hidden_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -150,7 +147,7 @@ impl + IsA> DeviceProviderExt for O fn connect_provider_unhidden(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "provider-unhidden", + connect_raw(self.to_glib_none().0 as *mut _, b"provider-unhidden\0".as_ptr() as *const _, transmute(provider_unhidden_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/device_provider_factory.rs b/gstreamer/src/auto/device_provider_factory.rs index 2db70f2e2..326edd159 100644 --- a/gstreamer/src/auto/device_provider_factory.rs +++ b/gstreamer/src/auto/device_provider_factory.rs @@ -9,10 +9,6 @@ use Rank; use ffi; use glib; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct DeviceProviderFactory(Object): PluginFeature, Object; diff --git a/gstreamer/src/auto/element.rs b/gstreamer/src/auto/element.rs index 6d089e99d..1baf6a772 100644 --- a/gstreamer/src/auto/element.rs +++ b/gstreamer/src/auto/element.rs @@ -7,6 +7,7 @@ use Caps; use Clock; use ClockTime; use Context; +use ElementClass; use ElementFactory; use Error; use Message; @@ -24,17 +25,14 @@ use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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; -use ElementClass; - glib_wrapper! { pub struct Element(Object): Object; @@ -68,7 +66,7 @@ impl Element { unsafe impl Send for Element {} unsafe impl Sync for Element {} -pub trait ElementExt { +pub trait ElementExt: 'static { fn abort_state(&self); fn add_pad>(&self, pad: &P) -> Result<(), glib::error::BoolError>; @@ -183,7 +181,7 @@ pub trait ElementExt { fn connect_pad_removed(&self, f: F) -> SignalHandlerId; } -impl + IsA> ElementExt for O { +impl> ElementExt for O { fn abort_state(&self) { unsafe { ffi::gst_element_abort_state(self.to_glib_none().0); @@ -505,7 +503,7 @@ impl + IsA> ElementExt for O { fn connect_no_more_pads(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "no-more-pads", + connect_raw(self.to_glib_none().0 as *mut _, b"no-more-pads\0".as_ptr() as *const _, transmute(no_more_pads_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -513,7 +511,7 @@ impl + IsA> ElementExt for O { fn connect_pad_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pad-added", + connect_raw(self.to_glib_none().0 as *mut _, b"pad-added\0".as_ptr() as *const _, transmute(pad_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -521,7 +519,7 @@ impl + IsA> ElementExt for O { fn connect_pad_removed(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pad-removed", + connect_raw(self.to_glib_none().0 as *mut _, b"pad-removed\0".as_ptr() as *const _, transmute(pad_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/element_factory.rs b/gstreamer/src/auto/element_factory.rs index 48b4b5497..60f70ba27 100644 --- a/gstreamer/src/auto/element_factory.rs +++ b/gstreamer/src/auto/element_factory.rs @@ -14,10 +14,6 @@ use URIType; use ffi; use glib; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct ElementFactory(Object): PluginFeature, Object; diff --git a/gstreamer/src/auto/ghost_pad.rs b/gstreamer/src/auto/ghost_pad.rs index ddcdeecf9..f2e689cff 100644 --- a/gstreamer/src/auto/ghost_pad.rs +++ b/gstreamer/src/auto/ghost_pad.rs @@ -13,10 +13,6 @@ use glib; use glib::object::Downcast; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct GhostPad(Object): ProxyPad, Pad, Object; @@ -49,7 +45,7 @@ impl GhostPad { unsafe impl Send for GhostPad {} unsafe impl Sync for GhostPad {} -pub trait GhostPadExt { +pub trait GhostPadExt: 'static { fn get_target(&self) -> Option; fn set_target<'a, P: IsA + 'a, Q: Into>>(&self, newtarget: Q) -> Result<(), glib::error::BoolError>; diff --git a/gstreamer/src/auto/object.rs b/gstreamer/src/auto/object.rs index dab86191c..b30cfd808 100644 --- a/gstreamer/src/auto/object.rs +++ b/gstreamer/src/auto/object.rs @@ -9,14 +9,11 @@ use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct Object(Object); @@ -50,7 +47,7 @@ impl Object { unsafe impl Send for Object {} unsafe impl Sync for Object {} -pub trait GstObjectExt { +pub trait GstObjectExt: 'static { //fn add_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool; fn default_error<'a, P: Into>>(&self, error: &Error, debug: P); @@ -104,7 +101,7 @@ pub trait GstObjectExt { fn connect_property_parent_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> GstObjectExt for O { +impl> GstObjectExt for O { //fn add_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool { // unsafe { TODO: call ffi::gst_object_add_control_binding() } //} @@ -240,7 +237,7 @@ impl + IsA> GstObjectExt for O { fn connect_property_name_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::name", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::name\0".as_ptr() as *const _, transmute(notify_name_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -248,7 +245,7 @@ impl + IsA> GstObjectExt for O { fn connect_property_parent_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::parent", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::parent\0".as_ptr() as *const _, transmute(notify_parent_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/pad.rs b/gstreamer/src/auto/pad.rs index 12db73dda..d4da3ab55 100644 --- a/gstreamer/src/auto/pad.rs +++ b/gstreamer/src/auto/pad.rs @@ -25,14 +25,12 @@ use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct Pad(Object): Object; @@ -65,7 +63,7 @@ impl Pad { unsafe impl Send for Pad {} unsafe impl Sync for Pad {} -pub trait PadExt { +pub trait PadExt: 'static { fn activate_mode(&self, mode: PadMode, active: bool) -> Result<(), glib::error::BoolError>; //fn add_probe(&self, mask: PadProbeType, callback: /*Unknown conversion*//*Unimplemented*/PadProbeCallback, destroy_data: /*Unknown conversion*//*Unimplemented*/DestroyNotify) -> libc::c_ulong; @@ -207,7 +205,7 @@ pub trait PadExt { fn connect_property_template_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> PadExt for O { +impl> PadExt for O { fn activate_mode(&self, mode: PadMode, active: bool) -> Result<(), glib::error::BoolError> { unsafe { glib::error::BoolError::from_glib(ffi::gst_pad_activate_mode(self.to_glib_none().0, mode.to_glib(), active.to_glib()), "Failed to activate mode pad") @@ -539,7 +537,7 @@ impl + IsA> PadExt for O { fn get_property_caps(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "caps".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"caps\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -547,21 +545,21 @@ impl + IsA> PadExt for O { fn get_property_template(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "template".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"template\0".as_ptr() as *const _, 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"template\0".as_ptr() as *const _, Value::from(template).to_glib_none().0); } } fn connect_linked(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "linked", + connect_raw(self.to_glib_none().0 as *mut _, b"linked\0".as_ptr() as *const _, transmute(linked_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -569,7 +567,7 @@ impl + IsA> PadExt for O { fn connect_unlinked(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "unlinked", + connect_raw(self.to_glib_none().0 as *mut _, b"unlinked\0".as_ptr() as *const _, transmute(unlinked_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -577,7 +575,7 @@ impl + IsA> PadExt for O { fn connect_property_caps_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::caps", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::caps\0".as_ptr() as *const _, transmute(notify_caps_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -585,7 +583,7 @@ impl + IsA> PadExt for O { fn connect_property_offset_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::offset", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::offset\0".as_ptr() as *const _, transmute(notify_offset_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -593,7 +591,7 @@ impl + IsA> PadExt for O { fn connect_property_template_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::template", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::template\0".as_ptr() as *const _, transmute(notify_template_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/pad_template.rs b/gstreamer/src/auto/pad_template.rs index fce021e09..576d32f19 100644 --- a/gstreamer/src/auto/pad_template.rs +++ b/gstreamer/src/auto/pad_template.rs @@ -14,14 +14,12 @@ use glib::StaticType; use glib::Value; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct PadTemplate(Object): Object; @@ -62,7 +60,7 @@ impl PadTemplate { pub fn get_property_direction(&self) -> PadDirection { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "direction".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"direction\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -71,7 +69,7 @@ impl PadTemplate { pub fn get_property_gtype(&self) -> glib::types::Type { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "gtype".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"gtype\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -79,7 +77,7 @@ impl PadTemplate { pub fn get_property_name_template(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "name-template".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"name-template\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -87,7 +85,7 @@ impl PadTemplate { pub fn get_property_presence(&self) -> PadPresence { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "presence".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"presence\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -95,7 +93,7 @@ impl PadTemplate { pub fn connect_pad_created(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "pad-created", + connect_raw(self.to_glib_none().0, b"pad-created\0".as_ptr() as *const _, transmute(pad_created_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/pipeline.rs b/gstreamer/src/auto/pipeline.rs index 3acb6e238..0b588a68f 100644 --- a/gstreamer/src/auto/pipeline.rs +++ b/gstreamer/src/auto/pipeline.rs @@ -7,21 +7,17 @@ use ChildProxy; use Clock; use ClockTime; use Element; -use PipelineClass; use Object; +use PipelineClass; use ffi; -use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct Pipeline(Object): Bin, Element, Object, ChildProxy; @@ -45,7 +41,7 @@ impl Pipeline { unsafe impl Send for Pipeline {} unsafe impl Sync for Pipeline {} -pub trait PipelineExt { +pub trait PipelineExt: 'static { fn auto_clock(&self); fn get_auto_flush_bus(&self) -> bool; @@ -71,7 +67,7 @@ pub trait PipelineExt { fn connect_property_latency_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> PipelineExt for O { +impl> PipelineExt for O { fn auto_clock(&self) { unsafe { ffi::gst_pipeline_auto_clock(self.to_glib_none().0); @@ -131,7 +127,7 @@ impl + IsA> PipelineExt for O { fn connect_property_auto_flush_bus_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::auto-flush-bus", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::auto-flush-bus\0".as_ptr() as *const _, transmute(notify_auto_flush_bus_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -139,7 +135,7 @@ impl + IsA> PipelineExt for O { fn connect_property_delay_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::delay", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::delay\0".as_ptr() as *const _, transmute(notify_delay_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } @@ -147,7 +143,7 @@ impl + IsA> PipelineExt for O { fn connect_property_latency_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::latency", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::latency\0".as_ptr() as *const _, transmute(notify_latency_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/plugin.rs b/gstreamer/src/auto/plugin.rs index 55818d2c0..137aea7c1 100644 --- a/gstreamer/src/auto/plugin.rs +++ b/gstreamer/src/auto/plugin.rs @@ -7,10 +7,7 @@ use Object; use PluginDependencyFlags; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use std; -use std::mem; use std::ptr; glib_wrapper! { diff --git a/gstreamer/src/auto/plugin_feature.rs b/gstreamer/src/auto/plugin_feature.rs index c0134910b..4b49daf28 100644 --- a/gstreamer/src/auto/plugin_feature.rs +++ b/gstreamer/src/auto/plugin_feature.rs @@ -7,10 +7,6 @@ use Plugin; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct PluginFeature(Object): Object; @@ -23,7 +19,7 @@ glib_wrapper! { unsafe impl Send for PluginFeature {} unsafe impl Sync for PluginFeature {} -pub trait PluginFeatureExt { +pub trait PluginFeatureExt: 'static { fn check_version(&self, min_major: u32, min_minor: u32, min_micro: u32) -> bool; fn get_plugin(&self) -> Option; diff --git a/gstreamer/src/auto/preset.rs b/gstreamer/src/auto/preset.rs index 2aeec08f9..4fb645590 100644 --- a/gstreamer/src/auto/preset.rs +++ b/gstreamer/src/auto/preset.rs @@ -6,10 +6,7 @@ use ffi; use glib; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; use std; -use std::mem; use std::ptr; glib_wrapper! { @@ -39,7 +36,7 @@ impl Preset { unsafe impl Send for Preset {} unsafe impl Sync for Preset {} -pub trait PresetExt { +pub trait PresetExt: 'static { fn delete_preset(&self, name: &str) -> Result<(), glib::error::BoolError>; fn get_meta(&self, name: &str, tag: &str) -> Option; diff --git a/gstreamer/src/auto/proxy_pad.rs b/gstreamer/src/auto/proxy_pad.rs index a37e3678c..7733e995d 100644 --- a/gstreamer/src/auto/proxy_pad.rs +++ b/gstreamer/src/auto/proxy_pad.rs @@ -7,10 +7,6 @@ use Pad; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct ProxyPad(Object): Pad, Object; @@ -29,7 +25,7 @@ impl ProxyPad { unsafe impl Send for ProxyPad {} unsafe impl Sync for ProxyPad {} -pub trait ProxyPadExt { +pub trait ProxyPadExt: 'static { fn get_internal(&self) -> Option; } diff --git a/gstreamer/src/auto/registry.rs b/gstreamer/src/auto/registry.rs index aa0917c53..23fd870ec 100644 --- a/gstreamer/src/auto/registry.rs +++ b/gstreamer/src/auto/registry.rs @@ -9,15 +9,12 @@ use ffi; use glib; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; -use gobject_ffi; use std; use std::boxed::Box as Box_; -use std::mem; use std::mem::transmute; -use std::ptr; glib_wrapper! { pub struct Registry(Object): Object; @@ -130,7 +127,7 @@ impl Registry { pub fn connect_feature_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "feature-added", + connect_raw(self.to_glib_none().0, b"feature-added\0".as_ptr() as *const _, transmute(feature_added_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -138,7 +135,7 @@ impl Registry { pub fn connect_plugin_added(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "plugin-added", + connect_raw(self.to_glib_none().0, b"plugin-added\0".as_ptr() as *const _, transmute(plugin_added_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/stream.rs b/gstreamer/src/auto/stream.rs index 6322f3f9a..5693b1fef 100644 --- a/gstreamer/src/auto/stream.rs +++ b/gstreamer/src/auto/stream.rs @@ -11,14 +11,12 @@ use ffi; use glib::StaticType; use glib::Value; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct Stream(Object): Object; @@ -99,35 +97,35 @@ impl Stream { pub fn get_property_caps(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "caps".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"caps\0".as_ptr() as *const _, 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"caps\0".as_ptr() as *const _, Value::from(caps).to_glib_none().0); } } pub fn get_property_stream_flags(&self) -> StreamFlags { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "stream-flags".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"stream-flags\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_stream_flags(&self, stream_flags: StreamFlags) { 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"stream-flags\0".as_ptr() as *const _, Value::from(&stream_flags).to_glib_none().0); } } pub fn get_property_stream_id(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "stream-id".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"stream-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -135,35 +133,35 @@ impl Stream { pub fn get_property_stream_type(&self) -> StreamType { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "stream-type".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"stream-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_stream_type(&self, stream_type: StreamType) { 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"stream-type\0".as_ptr() as *const _, Value::from(&stream_type).to_glib_none().0); } } pub fn get_property_tags(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "tags".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"tags\0".as_ptr() as *const _, 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"tags\0".as_ptr() as *const _, Value::from(tags).to_glib_none().0); } } pub fn connect_property_caps_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::caps", + connect_raw(self.to_glib_none().0, b"notify::caps\0".as_ptr() as *const _, transmute(notify_caps_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -171,7 +169,7 @@ impl Stream { pub fn connect_property_stream_flags_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::stream-flags", + connect_raw(self.to_glib_none().0, b"notify::stream-flags\0".as_ptr() as *const _, transmute(notify_stream_flags_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -179,7 +177,7 @@ impl Stream { pub fn connect_property_stream_type_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::stream-type", + connect_raw(self.to_glib_none().0, b"notify::stream-type\0".as_ptr() as *const _, transmute(notify_stream_type_trampoline as usize), Box_::into_raw(f) as *mut _) } } @@ -187,7 +185,7 @@ impl Stream { pub fn connect_property_tags_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::tags", + connect_raw(self.to_glib_none().0, b"notify::tags\0".as_ptr() as *const _, transmute(notify_tags_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/stream_collection.rs b/gstreamer/src/auto/stream_collection.rs index f7d3fc1c5..b8bfc09ef 100644 --- a/gstreamer/src/auto/stream_collection.rs +++ b/gstreamer/src/auto/stream_collection.rs @@ -9,14 +9,12 @@ use ffi; use glib::StaticType; use glib::Value; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct StreamCollection(Object): Object; @@ -58,7 +56,7 @@ impl StreamCollection { pub fn get_property_upstream_id(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "upstream-id".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0, b"upstream-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -66,7 +64,7 @@ impl StreamCollection { pub fn set_property_upstream_id<'a, P: Into>>(&self, upstream_id: P) { let upstream_id = upstream_id.into(); 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0, b"upstream-id\0".as_ptr() as *const _, Value::from(upstream_id).to_glib_none().0); } } @@ -77,7 +75,7 @@ impl StreamCollection { pub fn connect_property_upstream_id_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::upstream-id", + connect_raw(self.to_glib_none().0, b"notify::upstream-id\0".as_ptr() as *const _, transmute(notify_upstream_id_trampoline as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/system_clock.rs b/gstreamer/src/auto/system_clock.rs index a300fdd79..e5d687651 100644 --- a/gstreamer/src/auto/system_clock.rs +++ b/gstreamer/src/auto/system_clock.rs @@ -6,20 +6,17 @@ use Clock; use ClockType; use Object; use ffi; -use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; -use glib::signal::connect; +use glib::signal::connect_raw; 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! { pub struct SystemClock(Object): Clock, Object; @@ -50,7 +47,7 @@ impl SystemClock { unsafe impl Send for SystemClock {} unsafe impl Sync for SystemClock {} -pub trait SystemClockExt { +pub trait SystemClockExt: 'static { fn get_property_clock_type(&self) -> ClockType; fn set_property_clock_type(&self, clock_type: ClockType); @@ -58,25 +55,25 @@ pub trait SystemClockExt { fn connect_property_clock_type_notify(&self, f: F) -> SignalHandlerId; } -impl + IsA> SystemClockExt for O { +impl> SystemClockExt for O { fn get_property_clock_type(&self) -> ClockType { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0, "clock-type".to_glib_none().0, value.to_glib_none_mut().0); + gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"clock-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_clock_type(&self, clock_type: ClockType) { unsafe { - 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); + gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"clock-type\0".as_ptr() as *const _, Value::from(&clock_type).to_glib_none().0); } } fn connect_property_clock_type_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); - connect(self.to_glib_none().0, "notify::clock-type", + connect_raw(self.to_glib_none().0 as *mut _, b"notify::clock-type\0".as_ptr() as *const _, transmute(notify_clock_type_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } diff --git a/gstreamer/src/auto/tag_setter.rs b/gstreamer/src/auto/tag_setter.rs index 294671217..1ba9bc638 100644 --- a/gstreamer/src/auto/tag_setter.rs +++ b/gstreamer/src/auto/tag_setter.rs @@ -9,10 +9,6 @@ use TagMergeMode; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct TagSetter(Object): Element, Object; @@ -25,7 +21,7 @@ glib_wrapper! { unsafe impl Send for TagSetter {} unsafe impl Sync for TagSetter {} -pub trait TagSetterExt { +pub trait TagSetterExt: 'static { //fn add_tag_valist(&self, mode: TagMergeMode, tag: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); //fn add_tag_valist_values(&self, mode: TagMergeMode, tag: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); diff --git a/gstreamer/src/auto/toc_setter.rs b/gstreamer/src/auto/toc_setter.rs index 9042fe911..0f83f85f8 100644 --- a/gstreamer/src/auto/toc_setter.rs +++ b/gstreamer/src/auto/toc_setter.rs @@ -8,10 +8,6 @@ use Toc; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct TocSetter(Object): Element, Object; @@ -24,7 +20,7 @@ glib_wrapper! { unsafe impl Send for TocSetter {} unsafe impl Sync for TocSetter {} -pub trait TocSetterExt { +pub trait TocSetterExt: 'static { fn get_toc(&self) -> Option; fn reset(&self); diff --git a/gstreamer/src/auto/type_find_factory.rs b/gstreamer/src/auto/type_find_factory.rs index 1f6abf83e..c2df06d41 100644 --- a/gstreamer/src/auto/type_find_factory.rs +++ b/gstreamer/src/auto/type_find_factory.rs @@ -7,10 +7,6 @@ use Object; use PluginFeature; use ffi; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; glib_wrapper! { pub struct TypeFindFactory(Object): PluginFeature, Object; diff --git a/gstreamer/src/auto/uri_handler.rs b/gstreamer/src/auto/uri_handler.rs index 4cb8e965c..4e49d71f2 100644 --- a/gstreamer/src/auto/uri_handler.rs +++ b/gstreamer/src/auto/uri_handler.rs @@ -7,9 +7,6 @@ use URIType; use ffi; use glib::object::IsA; use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::mem; use std::ptr; glib_wrapper! { @@ -23,7 +20,7 @@ glib_wrapper! { unsafe impl Send for URIHandler {} unsafe impl Sync for URIHandler {} -pub trait URIHandlerExt { +pub trait URIHandlerExt: 'static { fn get_protocols(&self) -> Vec; fn get_uri(&self) -> Option; diff --git a/gstreamer/src/auto/versions.txt b/gstreamer/src/auto/versions.txt index 247fa04ef..f37f40598 100644 --- a/gstreamer/src/auto/versions.txt +++ b/gstreamer/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +Generated by gir (https://github.com/gtk-rs/gir @ 811e711) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer/src/clock.rs b/gstreamer/src/clock.rs index 8553b85f1..045c1ec8c 100644 --- a/gstreamer/src/clock.rs +++ b/gstreamer/src/clock.rs @@ -10,7 +10,6 @@ use ffi; use glib; use glib::translate::*; use glib::IsA; -use glib_ffi; use glib_ffi::{gboolean, gpointer}; use libc::c_void; use std::cmp; diff --git a/gstreamer/src/parse_context.rs b/gstreamer/src/parse_context.rs index 7a4b7ccf4..454ef2a6d 100644 --- a/gstreamer/src/parse_context.rs +++ b/gstreamer/src/parse_context.rs @@ -8,12 +8,8 @@ use ffi; use glib::translate::*; -use glib_ffi; use gobject_ffi; -use std::mem; -use std::ptr; - glib_wrapper! { pub struct ParseContext(Boxed); diff --git a/gstreamer/src/promise.rs b/gstreamer/src/promise.rs index 63322109d..63debebff 100644 --- a/gstreamer/src/promise.rs +++ b/gstreamer/src/promise.rs @@ -9,9 +9,6 @@ use ffi; use glib::translate::*; use glib_ffi; -use gobject_ffi; -use std::mem; -use std::ptr; use PromiseResult; use Structure; use StructureRef;