dvbsuboverlay: Work with GstClockTime instead of PTS for subtitle timing
authorMart Raudsepp <mart.raudsepp@collabora.co.uk>
Tue, 30 Nov 2010 02:45:54 +0000 (04:45 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Wed, 8 Dec 2010 15:30:09 +0000 (16:30 +0100)
commit4a68decb52175f02ae699719e75bd43ad46f5862
treef59dcc9ceb1fed589cabc292d2c1e52c2e495875
parent316cd44c8d11d0355deb0a5cd65cf290c3d472b0
dvbsuboverlay: Work with GstClockTime instead of PTS for subtitle timing

Abuse libdvbsub PTS tracking to just store our running time in it, to get
it back in the callbacks. As GStreamer does its own PTS handling behind our
back (especially for video), we should just sync with video per running time,
not try to do it with PTS, which doesn't seem well accessible for video chain.
We can later relabel dvb-sub.c pts naming convention if wanted, it's just
passing along guint64 values, which GstClockTime fortunately is too.

The current idea is to collect the regions returned by the callback into
a FIFO buffer and pop and pre-render the top one into a separate
quick-to-blend cached format, which is then appropriately blended in the
video chain until the next one on top of the stack reaches the video chains
running time (or the fallback timer hits).
gst/dvbsuboverlay/gstdvbsuboverlay.c