decklink: calculate the decklink output time from the internal clock
authorMatthew Waters <matthew@centricular.com>
Wed, 28 Nov 2018 04:28:15 +0000 (22:28 -0600)
committerMatthew Waters <matthew@centricular.com>
Wed, 12 Dec 2018 02:29:32 +0000 (13:29 +1100)
commit59c5ae2817857be48d11ff7471ed087d886ead1b
treeb6f5338da2595215266a121669551cf1c5c170a7
parentfa9697002aefef0b9e56bed15e2241c25776f115
decklink: calculate the decklink output time from the internal clock

Fixes the time calculations when dealing with a slaved clock (as
will occur with more than one decklink video sink), when performing
flushing seeks causing stalls in the output timeline, pausing.

Tighten up the calculations by relying solely on the internal time
(from the internal clock) for determining when to schedule display
frames instead attempting to track pause lengths from the external
clock and converting to internal time.  This results in a much easier
offset calculation for choosing the output time and ensures that the
clock is always advancing when we need it to.

This is fixup to the 'monotonically increasing output timestamps' goal
in: bf849e9a69442f7a6f9d4f0a1ef30d5a8009f689
sys/decklink/gstdecklinkvideosink.cpp
sys/decklink/gstdecklinkvideosink.h