diff --git a/gir-files/Gst-1.0.gir b/gir-files/Gst-1.0.gir index 207d0b51a..eac4e89ec 100644 --- a/gir-files/Gst-1.0.gir +++ b/gir-files/Gst-1.0.gir @@ -14151,7 +14151,10 @@ MT safe. a #GstElement to set the bus of. - + the #GstBus to set. diff --git a/gstreamer/src/auto/element.rs b/gstreamer/src/auto/element.rs index e03b876f8..ee5f81e53 100644 --- a/gstreamer/src/auto/element.rs +++ b/gstreamer/src/auto/element.rs @@ -144,7 +144,7 @@ pub trait ElementExt { fn set_base_time(&self, time: ClockTime); - fn set_bus(&self, bus: &Bus); + fn set_bus<'a, P: Into>>(&self, bus: P); fn set_clock>(&self, clock: &P) -> Result<(), glib::error::BoolError>; @@ -413,9 +413,11 @@ impl + IsA> ElementExt for O { } } - fn set_bus(&self, bus: &Bus) { + fn set_bus<'a, P: Into>>(&self, bus: P) { + let bus = bus.into(); + let bus = bus.to_glib_none(); unsafe { - ffi::gst_element_set_bus(self.to_glib_none().0, bus.to_glib_none().0); + ffi::gst_element_set_bus(self.to_glib_none().0, bus.0); } }