diff --git a/Gir_Gst.toml b/Gir_Gst.toml index eccf441c5..8cc03ee95 100644 --- a/Gir_Gst.toml +++ b/Gir_Gst.toml @@ -379,6 +379,11 @@ status = "generate" [object.function.return] nullable = false + [[object.function]] + name = "start" + [object.function.return] + bool_return_is_error = "Failed to start" + [[object]] name = "Gst.DeviceMonitor" status = "generate" @@ -387,6 +392,11 @@ status = "generate" [object.function.return] nullable = false + [[object.function]] + name = "start" + [object.function.return] + bool_return_is_error = "Failed to start" + [[object]] name = "Gst.Device" status = "generate" diff --git a/gstreamer/src/auto/device_monitor.rs b/gstreamer/src/auto/device_monitor.rs index e842d3a70..1551a5322 100644 --- a/gstreamer/src/auto/device_monitor.rs +++ b/gstreamer/src/auto/device_monitor.rs @@ -62,7 +62,7 @@ pub trait DeviceMonitorExt { fn set_show_all_devices(&self, show_all: bool); - fn start(&self) -> bool; + fn start(&self) -> Result<(), glib::error::BoolError>; fn stop(&self); @@ -120,9 +120,9 @@ impl + IsA> DeviceMonitorExt for O { } } - fn start(&self) -> bool { + fn start(&self) -> Result<(), glib::error::BoolError> { unsafe { - from_glib(ffi::gst_device_monitor_start(self.to_glib_none().0)) + glib::error::BoolError::from_glib(ffi::gst_device_monitor_start(self.to_glib_none().0), "Failed to start") } } diff --git a/gstreamer/src/auto/device_provider.rs b/gstreamer/src/auto/device_provider.rs index fc957509c..9988bba0f 100644 --- a/gstreamer/src/auto/device_provider.rs +++ b/gstreamer/src/auto/device_provider.rs @@ -60,7 +60,7 @@ pub trait DeviceProviderExt { fn hide_provider(&self, name: &str); - fn start(&self) -> bool; + fn start(&self) -> Result<(), glib::error::BoolError>; fn stop(&self); @@ -120,9 +120,9 @@ impl + IsA> DeviceProviderExt for O } } - fn start(&self) -> bool { + fn start(&self) -> Result<(), glib::error::BoolError> { unsafe { - from_glib(ffi::gst_device_provider_start(self.to_glib_none().0)) + glib::error::BoolError::from_glib(ffi::gst_device_provider_start(self.to_glib_none().0), "Failed to start") } }