Skip to main content

ClockImpl

Trait ClockImpl 

Source
pub trait ClockImpl: GstObjectImpl + ObjectSubclass
where Self::Type: IsA<Clock>,
{ // 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§

Source

fn change_resolution( &self, old_resolution: ClockTime, new_resolution: ClockTime, ) -> ClockTime

Change the resolution of the clock. Not all values might be acceptable.

§old_resolution

the previous resolution

§new_resolution

the new resolution

§Returns

the new resolution

Source

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.

Source

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.

Source

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

Source

fn wait_async(&self, id: &ClockId) -> Result<ClockSuccess, ClockError>

Perform an asynchronous wait on the given GstClockEntry.

§entry

the entry to wait on

§Returns

the result of the non blocking wait.

Source

fn unschedule(&self, id: &ClockId)

Unblock a blocking or async wait operation.

§entry

the entry to unschedule

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§