Trait gstreamer_editing_services::subclass::prelude::ClockImpl
source · pub trait ClockImpl: ClockImplExt + GstObjectImpl + Send + Sync {
// Provided methods
fn change_resolution(
&self,
old_resolution: ClockTime,
new_resolution: ClockTime,
) -> ClockTime { ... }
fn resolution(&self) -> ClockTime { ... }
fn internal_time(&self) -> ClockTime { ... }
fn wait(&self, id: &ClockId) -> (Result<ClockSuccess, ClockError>, i64) { ... }
fn wait_async(&self, id: &ClockId) -> Result<ClockSuccess, ClockError> { ... }
fn unschedule(&self, id: &ClockId) { ... }
}
Provided Methods§
sourcefn change_resolution(
&self,
old_resolution: ClockTime,
new_resolution: ClockTime,
) -> ClockTime
fn change_resolution( &self, old_resolution: ClockTime, new_resolution: ClockTime, ) -> ClockTime
sourcefn resolution(&self) -> ClockTime
fn resolution(&self) -> ClockTime
Gets the accuracy of the clock. The accuracy of the clock is the granularity
of the values returned by ClockExt::time()
.
§Returns
the resolution of the clock in units of GstClockTime
.
sourcefn internal_time(&self) -> ClockTime
fn internal_time(&self) -> ClockTime
Gets the current internal time of the given clock. The time is returned unadjusted for the offset and the rate.
§Returns
the internal time of the clock. Or GST_CLOCK_TIME_NONE
when
given invalid input.
sourcefn wait(&self, id: &ClockId) -> (Result<ClockSuccess, ClockError>, i64)
fn wait(&self, id: &ClockId) -> (Result<ClockSuccess, ClockError>, i64)
Perform a blocking wait on the given GstClockEntry
and return
the jitter.
§entry
the entry to wait on
§Returns
the result of the blocking wait. ClockReturn::Early
will be returned
if the current clock time is past the time of id
, ClockReturn::Ok
if
id
was scheduled in time. ClockReturn::Unscheduled
if id
was
unscheduled with gst_clock_id_unschedule()
.
§jitter
a pointer that will contain the jitter
sourcefn wait_async(&self, id: &ClockId) -> Result<ClockSuccess, ClockError>
fn wait_async(&self, id: &ClockId) -> Result<ClockSuccess, ClockError>
sourcefn unschedule(&self, id: &ClockId)
fn unschedule(&self, id: &ClockId)
Object Safety§
This trait is not object safe.