regen for ges: some more mandatory ClockTimes

This commit is contained in:
François Laignel 2021-06-16 17:25:28 +02:00
parent c723ecac5d
commit 6a5f17ae06
2 changed files with 14 additions and 12 deletions

View file

@ -181,7 +181,7 @@ pub trait TimelineExt: 'static {
fn set_auto_transition(&self, auto_transition: bool);
#[doc(alias = "ges_timeline_set_snapping_distance")]
fn set_snapping_distance(&self, snapping_distance: impl Into<Option<gst::ClockTime>>);
fn set_snapping_distance(&self, snapping_distance: gst::ClockTime);
#[doc(alias = "commited")]
fn connect_commited<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
@ -497,11 +497,11 @@ impl<O: IsA<Timeline>> TimelineExt for O {
}
}
fn set_snapping_distance(&self, snapping_distance: impl Into<Option<gst::ClockTime>>) {
fn set_snapping_distance(&self, snapping_distance: gst::ClockTime) {
unsafe {
ffi::ges_timeline_set_snapping_distance(
self.as_ref().to_glib_none().0,
snapping_distance.into().into_glib(),
snapping_distance.into_glib(),
);
}
}

View file

@ -94,7 +94,7 @@ pub trait TimelineElementExt: 'static {
#[doc(alias = "ges_timeline_element_get_inpoint")]
#[doc(alias = "get_inpoint")]
fn inpoint(&self) -> Option<gst::ClockTime>;
fn inpoint(&self) -> gst::ClockTime;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
@ -126,7 +126,7 @@ pub trait TimelineElementExt: 'static {
#[doc(alias = "ges_timeline_element_get_start")]
#[doc(alias = "get_start")]
fn start(&self) -> Option<gst::ClockTime>;
fn start(&self) -> gst::ClockTime;
#[doc(alias = "ges_timeline_element_get_timeline")]
#[doc(alias = "get_timeline")]
@ -210,7 +210,7 @@ pub trait TimelineElementExt: 'static {
fn set_priority(&self, priority: u32) -> bool;
#[doc(alias = "ges_timeline_element_set_start")]
fn set_start(&self, start: impl Into<Option<gst::ClockTime>>) -> bool;
fn set_start(&self, start: gst::ClockTime) -> bool;
#[doc(alias = "ges_timeline_element_set_timeline")]
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), glib::error::BoolError>;
@ -371,11 +371,12 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
}
}
fn inpoint(&self) -> Option<gst::ClockTime> {
fn inpoint(&self) -> gst::ClockTime {
unsafe {
from_glib(ffi::ges_timeline_element_get_inpoint(
try_from_glib(ffi::ges_timeline_element_get_inpoint(
self.as_ref().to_glib_none().0,
))
.expect("mandatory glib value is None")
}
}
@ -434,11 +435,12 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
unsafe { ffi::ges_timeline_element_get_priority(self.as_ref().to_glib_none().0) }
}
fn start(&self) -> Option<gst::ClockTime> {
fn start(&self) -> gst::ClockTime {
unsafe {
from_glib(ffi::ges_timeline_element_get_start(
try_from_glib(ffi::ges_timeline_element_get_start(
self.as_ref().to_glib_none().0,
))
.expect("mandatory glib value is None")
}
}
@ -645,11 +647,11 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
}
}
fn set_start(&self, start: impl Into<Option<gst::ClockTime>>) -> bool {
fn set_start(&self, start: gst::ClockTime) -> bool {
unsafe {
from_glib(ffi::ges_timeline_element_set_start(
self.as_ref().to_glib_none().0,
start.into().into_glib(),
start.into_glib(),
))
}
}