VDR 1.7.5 requires that STC should be near to a previously transmitted PTS
value. We cannot hold this requirement immediately after a discontinuity
as the currently displayed image's vpts time (which originated before the
discontinuity) will be transformed to STC by applying the new vpts offset
established at discontinuity.
Therefore, a queue of vpts offset pairs is created and at discontinuity
the current offset is stored there in combination with the vpts value
up to which it has to be used. When retrieving a STC value, we lookup
the offset to use from current vpts and therefore get a STC near to an
originating PTS value.
As VDR requires this quality of STC values also for its trickspeed modes,
it is nolonger possible to simply set PTS of incoming frames to 0 to
schedule them just after the previous frame. Therefore a discontinuity is
generated for each frame in trickspeed mode, which allows us to schedule
each frame immediately after the previous one while there may be gaps in
PTS values. As a result the above mentioned code will take care to provide
proper STC values even in VDR's trickspeed modes.
2 files changed, 346 insertions(+), 51 deletions(-)
include/xine/vdr.h | 4
src/vdr/input_vdr.c | 393 ++++++++++++++++++++++++++++++++++++++++++++-------