Matthew Waters cae2b38614 decklink: calculate internal using values closer to the current clock times
In a previous version of the clock time conversion code, scheduled playback used
to be started (from 0) when transitioning to PLAYING and stopped when
transitioning PLAYING->PAUSED. This worked fine when converting running times
using the internal clock.  However, now the decklink clock will produce values
that are monotonically increasing and do not reset to 0 at the same moments as
running time anymore. This means that the clock adjustments could attempt to
convert a small running time based on a large clock time e.g. after pausing
for many hours. As the adjustment code is a simple linear interpolation based on
the current clock times (large) using the provided value (small), the small
differences in the rate could result in very large differences in the
output time.

Fix by instead using both internal and external clock times based on the values
that gst_clock_get_calibration() will return. By doing so, small changes in the
rate calculations between the internal and external clock times will not result
in potentially large differences in the output internal time from
gst_clock_unadjust_with_calibration().

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4197

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9267>
2025-06-23 08:25:57 +00:00
..
2025-03-13 11:37:35 +00:00
2025-03-13 11:37:35 +00:00
2025-04-30 10:18:57 +00:00
2025-05-02 05:54:56 +00:00
2025-04-08 11:45:11 +00:00
2025-05-01 23:16:25 +09:00
2025-04-30 10:18:57 +00:00