mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-09-02 09:53:49 +00:00
regen: gst: Clock: fix some non-optional return types
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1739>
This commit is contained in:
parent
2f749824e6
commit
d2bc24f085
1 changed files with 11 additions and 6 deletions
|
@ -137,12 +137,13 @@ pub trait ClockExt: IsA<Clock> + 'static {
|
|||
}
|
||||
|
||||
#[doc(alias = "gst_clock_adjust_unlocked")]
|
||||
fn adjust_unlocked(&self, internal: ClockTime) -> Option<ClockTime> {
|
||||
fn adjust_unlocked(&self, internal: ClockTime) -> ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_clock_adjust_unlocked(
|
||||
try_from_glib(ffi::gst_clock_adjust_unlocked(
|
||||
self.as_ref().to_glib_none().0,
|
||||
internal.into_glib(),
|
||||
))
|
||||
.expect("mandatory glib value is None")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,8 +178,11 @@ pub trait ClockExt: IsA<Clock> + 'static {
|
|||
|
||||
#[doc(alias = "gst_clock_get_time")]
|
||||
#[doc(alias = "get_time")]
|
||||
fn time(&self) -> Option<ClockTime> {
|
||||
unsafe { from_glib(ffi::gst_clock_get_time(self.as_ref().to_glib_none().0)) }
|
||||
fn time(&self) -> ClockTime {
|
||||
unsafe {
|
||||
try_from_glib(ffi::gst_clock_get_time(self.as_ref().to_glib_none().0))
|
||||
.expect("mandatory glib value is None")
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(alias = "gst_clock_get_timeout")]
|
||||
|
@ -232,12 +236,13 @@ pub trait ClockExt: IsA<Clock> + 'static {
|
|||
}
|
||||
|
||||
#[doc(alias = "gst_clock_unadjust_unlocked")]
|
||||
fn unadjust_unlocked(&self, external: ClockTime) -> Option<ClockTime> {
|
||||
fn unadjust_unlocked(&self, external: ClockTime) -> ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_clock_unadjust_unlocked(
|
||||
try_from_glib(ffi::gst_clock_unadjust_unlocked(
|
||||
self.as_ref().to_glib_none().0,
|
||||
external.into_glib(),
|
||||
))
|
||||
.expect("mandatory glib value is None")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue