Skip to content

ajasrc: Improve clock handling

Sebastian Dröge requested to merge slomo/gstreamer:ajasrc-clock into main

Provide a clock from the source that is a monotonic system clock with the rate corrected based on the measured and ideal capture rate of the frames.

If this clock is selected as pipeline clock, then provide perfect timestamps to downstream.

Otherwise, if the pipeline clock is the monotonic system clock, use the internal clock for converting back to the monotonic system clock.

Otherwise, use the monotonic system clock time calculated in the above case and convert that to the pipeline clock.

In all cases this will give a smoother time than the previous code, which simply took the difference between the driver provided capture time and the current real-time clock time, and applied that to the current pipeline clock time.

Merge request reports