diff --git a/Gir_Gst.toml b/Gir_Gst.toml index e7f9585b1..98d663f89 100644 --- a/Gir_Gst.toml +++ b/Gir_Gst.toml @@ -39,10 +39,8 @@ generate = [ "Gst.URIError", "Gst.StructureChangeType", "Gst.StreamStatusType", - "Gst.DeviceMonitor", "Gst.DeviceProvider", "Gst.DeviceProviderFactory", - "Gst.StreamCollection", "Gst.StreamType", "Gst.StreamFlags", "Gst.PadLinkReturn", @@ -215,6 +213,24 @@ status = "generate" # Caps is not a GObject ignore = true + [[object.property]] + name = "device-class" + # Has getter/setter functions + ignore = true + + [[object.property]] + name = "display-name" + # Has getter/setter functions + ignore = true + +[[object]] +name = "Gst.DeviceMonitor" +status = "generate" + + [[object.property]] + name = "show-all" + # Has getter/setter functions + ignore = true [[object]] name = "Gst.Object" @@ -302,6 +318,11 @@ status = "generate" # Buffer can be NULL ignore = true + [[object.property]] + name = "template" + # Has getter/setter functions + ignore = true + [[object]] name = "Gst.Stream" status = "generate" @@ -316,6 +337,30 @@ status = "generate" # TagList is not a GObject ignore = true + [[object.property]] + name = "stream-flags" + # Has setter/getter functions + ignore = true + + [[object.property]] + name = "stream-id" + # Has setter/getter functions + ignore = true + + [[object.property]] + name = "stream-type" + # Has setter/getter functions + ignore = true + +[[object]] +name = "Gst.StreamCollection" +status = "generate" + + [[object.property]] + name = "upstream-id" + # Has setter/getter functions + ignore = true + [[object]] name = "Gst.Plugin" status = "generate" diff --git a/gstreamer/src/auto/device.rs b/gstreamer/src/auto/device.rs index b7cd98f88..718976706 100644 --- a/gstreamer/src/auto/device.rs +++ b/gstreamer/src/auto/device.rs @@ -7,7 +7,6 @@ use Object; use Structure; use ffi; use glib; -use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::connect; @@ -47,10 +46,6 @@ pub trait DeviceExt { fn reconfigure_element>(&self, element: &P) -> bool; - fn get_property_device_class(&self) -> Option; - - fn get_property_display_name(&self) -> Option; - fn connect_removed(&self, f: F) -> u64; } @@ -105,22 +100,6 @@ impl + IsA> DeviceExt for O { } } - fn get_property_device_class(&self) -> Option { - let mut value = Value::from(None::<&str>); - unsafe { - gobject_ffi::g_object_get_property(self.to_glib_none().0, "device-class".to_glib_none().0, value.to_glib_none_mut().0); - } - value.get() - } - - fn get_property_display_name(&self) -> Option { - let mut value = Value::from(None::<&str>); - unsafe { - gobject_ffi::g_object_get_property(self.to_glib_none().0, "display-name".to_glib_none().0, value.to_glib_none_mut().0); - } - value.get() - } - fn connect_removed(&self, f: F) -> u64 { unsafe { let f: Box_> = Box_::new(Box_::new(f)); diff --git a/gstreamer/src/auto/device_monitor.rs b/gstreamer/src/auto/device_monitor.rs index 282df3d3f..5e76d40a8 100644 --- a/gstreamer/src/auto/device_monitor.rs +++ b/gstreamer/src/auto/device_monitor.rs @@ -6,8 +6,6 @@ use Caps; use Device; use Object; use ffi; -use glib; -use glib::Value; use glib::object::IsA; use glib::translate::*; use glib_ffi; @@ -53,13 +51,9 @@ pub trait DeviceMonitorExt { fn start(&self) -> bool; fn stop(&self); - - fn get_property_show_all(&self) -> bool; - - fn set_property_show_all(&self, show_all: bool); } -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(); @@ -117,18 +111,4 @@ impl + IsA> DeviceMonitorExt for O { ffi::gst_device_monitor_stop(self.to_glib_none().0); } } - - fn get_property_show_all(&self) -> bool { - let mut value = Value::from(&false); - unsafe { - gobject_ffi::g_object_get_property(self.to_glib_none().0, "show-all".to_glib_none().0, value.to_glib_none_mut().0); - } - value.get().unwrap() - } - - fn set_property_show_all(&self, show_all: bool) { - unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "show-all".to_glib_none().0, Value::from(&show_all).to_glib_none().0); - } - } } diff --git a/gstreamer/src/auto/pad.rs b/gstreamer/src/auto/pad.rs index 1a61eb8da..3502bdc79 100644 --- a/gstreamer/src/auto/pad.rs +++ b/gstreamer/src/auto/pad.rs @@ -13,7 +13,6 @@ use PadTemplate; use Stream; use ffi; use glib; -use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::connect; @@ -224,10 +223,6 @@ pub trait PadExt { fn use_fixed_caps(&self); - fn get_property_template(&self) -> Option; - - fn set_property_template(&self, template: Option<&PadTemplate>); - fn connect_linked(&self, f: F) -> u64; fn connect_unlinked(&self, f: F) -> u64; @@ -638,20 +633,6 @@ impl + IsA> PadExt for O { } } - fn get_property_template(&self) -> Option { - let mut value = Value::from(None::<&PadTemplate>); - unsafe { - gobject_ffi::g_object_get_property(self.to_glib_none().0, "template".to_glib_none().0, value.to_glib_none_mut().0); - } - value.get() - } - - fn set_property_template(&self, template: Option<&PadTemplate>) { - unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "template".to_glib_none().0, Value::from(template).to_glib_none().0); - } - } - fn connect_linked(&self, f: F) -> u64 { unsafe { let f: Box_> = Box_::new(Box_::new(f)); diff --git a/gstreamer/src/auto/stream.rs b/gstreamer/src/auto/stream.rs index 32d95c1a8..17cfcc7a5 100644 --- a/gstreamer/src/auto/stream.rs +++ b/gstreamer/src/auto/stream.rs @@ -4,19 +4,18 @@ #[cfg(feature = "v1_10")] use Caps; use Object; +#[cfg(feature = "v1_10")] use StreamFlags; +#[cfg(feature = "v1_10")] use StreamType; #[cfg(feature = "v1_10")] use TagList; use ffi; -use glib; -use glib::Value; use glib::object::IsA; use glib::translate::*; use glib_ffi; use gobject_ffi; use std::mem; -use std::mem::transmute; use std::ptr; glib_wrapper! { @@ -71,19 +70,9 @@ pub trait StreamExt { #[cfg(feature = "v1_10")] fn set_tags<'a, P: Into>>(&self, tags: P); - - fn get_property_stream_flags(&self) -> StreamFlags; - - fn set_property_stream_flags(&self, stream_flags: StreamFlags); - - fn get_property_stream_id(&self) -> Option; - - fn get_property_stream_type(&self) -> StreamType; - - fn set_property_stream_type(&self, stream_type: StreamType); } -impl + IsA> StreamExt for O { +impl> StreamExt for O { #[cfg(feature = "v1_10")] fn get_caps(&self) -> Option { unsafe { @@ -150,42 +139,4 @@ impl + IsA> StreamExt for O { ffi::gst_stream_set_tags(self.to_glib_none().0, tags.0); } } - - fn get_property_stream_flags(&self) -> StreamFlags { - let mut value = Value::from(&0u32); - unsafe { - gobject_ffi::g_object_get_property(self.to_glib_none().0, "stream-flags".to_glib_none().0, value.to_glib_none_mut().0); - from_glib(transmute(value.get::().unwrap())) - } - } - - fn set_property_stream_flags(&self, stream_flags: StreamFlags) { - let stream_flags = stream_flags.to_glib().bits() as u32; - unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "stream-flags".to_glib_none().0, Value::from(&stream_flags).to_glib_none().0); - } - } - - fn get_property_stream_id(&self) -> Option { - let mut value = Value::from(None::<&str>); - unsafe { - gobject_ffi::g_object_get_property(self.to_glib_none().0, "stream-id".to_glib_none().0, value.to_glib_none_mut().0); - } - value.get() - } - - fn get_property_stream_type(&self) -> StreamType { - let mut value = Value::from(&0u32); - unsafe { - gobject_ffi::g_object_get_property(self.to_glib_none().0, "stream-type".to_glib_none().0, value.to_glib_none_mut().0); - from_glib(transmute(value.get::().unwrap())) - } - } - - fn set_property_stream_type(&self, stream_type: StreamType) { - let stream_type = stream_type.to_glib().bits() as u32; - unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "stream-type".to_glib_none().0, Value::from(&stream_type).to_glib_none().0); - } - } } diff --git a/gstreamer/src/auto/stream_collection.rs b/gstreamer/src/auto/stream_collection.rs index 0f518eabc..c28d92c3f 100644 --- a/gstreamer/src/auto/stream_collection.rs +++ b/gstreamer/src/auto/stream_collection.rs @@ -5,8 +5,6 @@ use Object; #[cfg(feature = "v1_10")] use Stream; use ffi; -use glib; -use glib::Value; use glib::object::IsA; use glib::translate::*; use glib_ffi; @@ -50,14 +48,10 @@ pub trait StreamCollectionExt { #[cfg(feature = "v1_10")] fn get_upstream_id(&self) -> Option; - fn get_property_upstream_id(&self) -> Option; - - fn set_property_upstream_id(&self, upstream_id: Option<&str>); - //fn connect_stream_notify(&self, f: F) -> u64; } -impl + IsA> StreamCollectionExt for O { +impl> StreamCollectionExt for O { #[cfg(feature = "v1_10")] fn add_stream(&self, stream: &Stream) -> bool { unsafe { @@ -86,20 +80,6 @@ impl + IsA> StreamCollectionExt f } } - fn get_property_upstream_id(&self) -> Option { - let mut value = Value::from(None::<&str>); - unsafe { - gobject_ffi::g_object_get_property(self.to_glib_none().0, "upstream-id".to_glib_none().0, value.to_glib_none_mut().0); - } - value.get() - } - - fn set_property_upstream_id(&self, upstream_id: Option<&str>) { - unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0, "upstream-id".to_glib_none().0, Value::from(upstream_id).to_glib_none().0); - } - } - //fn connect_stream_notify(&self, f: F) -> u64 { // Ignored p0: GObject.ParamSpec //}