mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-29 04:51:09 +00:00
DeviceMonitor/Provider::start() should return a Result
This commit is contained in:
parent
48958d381e
commit
5dd89d01e2
3 changed files with 16 additions and 6 deletions
10
Gir_Gst.toml
10
Gir_Gst.toml
|
@ -379,6 +379,11 @@ status = "generate"
|
||||||
[object.function.return]
|
[object.function.return]
|
||||||
nullable = false
|
nullable = false
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "start"
|
||||||
|
[object.function.return]
|
||||||
|
bool_return_is_error = "Failed to start"
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "Gst.DeviceMonitor"
|
name = "Gst.DeviceMonitor"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
@ -387,6 +392,11 @@ status = "generate"
|
||||||
[object.function.return]
|
[object.function.return]
|
||||||
nullable = false
|
nullable = false
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "start"
|
||||||
|
[object.function.return]
|
||||||
|
bool_return_is_error = "Failed to start"
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "Gst.Device"
|
name = "Gst.Device"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
|
|
@ -62,7 +62,7 @@ pub trait DeviceMonitorExt {
|
||||||
|
|
||||||
fn set_show_all_devices(&self, show_all: bool);
|
fn set_show_all_devices(&self, show_all: bool);
|
||||||
|
|
||||||
fn start(&self) -> bool;
|
fn start(&self) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
fn stop(&self);
|
fn stop(&self);
|
||||||
|
|
||||||
|
@ -120,9 +120,9 @@ impl<O: IsA<DeviceMonitor> + IsA<glib::object::Object>> DeviceMonitorExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn start(&self) -> bool {
|
fn start(&self) -> Result<(), glib::error::BoolError> {
|
||||||
unsafe {
|
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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ pub trait DeviceProviderExt {
|
||||||
|
|
||||||
fn hide_provider(&self, name: &str);
|
fn hide_provider(&self, name: &str);
|
||||||
|
|
||||||
fn start(&self) -> bool;
|
fn start(&self) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
fn stop(&self);
|
fn stop(&self);
|
||||||
|
|
||||||
|
@ -120,9 +120,9 @@ impl<O: IsA<DeviceProvider> + IsA<glib::object::Object>> DeviceProviderExt for O
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn start(&self) -> bool {
|
fn start(&self) -> Result<(), glib::error::BoolError> {
|
||||||
unsafe {
|
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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue