Commit f439f14e authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

SystemClock::set_default() can accept None

parent 95c9f925
......@@ -38017,7 +38017,10 @@ MT safe.</doc>
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="new_clock" transfer-ownership="none">
<parameter name="new_clock"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">a #GstClock</doc>
<type name="Clock" c:type="GstClock*"/>
</parameter>
......@@ -36,10 +36,12 @@ impl SystemClock {
}
}
pub fn set_default<P: IsA<Clock>>(new_clock: &P) {
skip_assert_initialized!();
pub fn set_default<'a, P: IsA<Clock> + 'a, Q: Into<Option<&'a P>>>(new_clock: Q) {
assert_initialized_main_thread!();
let new_clock = new_clock.into();
let new_clock = new_clock.to_glib_none();
unsafe {
ffi::gst_system_clock_set_default(new_clock.to_glib_none().0);
ffi::gst_system_clock_set_default(new_clock.0);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment