best way to flush data in sink/queue

Nicolas Dufresne nicolas at ndufresne.ca
Mon Oct 2 18:33:27 UTC 2017


Le lundi 02 octobre 2017 à 19:23 +0200, Mailing List SVR a écrit :
> A simple solution seems to set a negative ts_offset on the sink based
> on 
> the queue time level,
> 
> this seems the less hacky solution,
> 
> I have yet to fully understand what the max-lateness property really
> do 
> and because its default value is -1 for audio sink and 20000000 for 
> video sinks, I suppose I have to read the code :)

It's a tolerance to lateness, a frame can be 20ms late and it will
still be rendered. This is a bit of a hack in my opinion, but for
videosink, this value should be the duration of a frame more or less.

It basically account for the processing latency, which can be has high
as one frame duration and still be real-time. But it also has the side
effect of accepting some jitter. I don't think that in practice it is
that negative, since the stream clock isn't aligned with the display
clock. The display itself already introduce similar jitter (+- 16.667ms
on 60fps display).

Starting with wayland, with the presentation time extension, we can
measure the latency and schedule frame to a specific blank, so this
jitter is no longer visible, even though the tolerance to lateness is
still needed because the closest refresh might be 1 millisecond ahead
of the presentation time.

Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171002/5aafb886/attachment.sig>


More information about the gstreamer-devel mailing list