Overlapping subtitle buffers
Matej Knopp
matej.knopp at inmethod.com
Sun Mar 31 14:15:50 PDT 2013
Hi,
I'm not sure if overlapping subtitle buffers are officially supported in
gstreamer, but given that some containers specifically request support for
this[1] I'm going to assume so.
This causes some problems
Assuming we have very long subtitle buffers
buf 1 - PTS 0s Duration 25s
buf 2 - PTS 50s Duration 25s
So the output from demuxer should look something like this
buf 1
gap (25 - duration 25)
buf 2
The issue here is that the GAP event will not be sent until the other
streams catch up. In this case until the demuxer sends first 25 seconds of
audio and video, it doesn't send any gap event. But the subtitle elements
downstream may now know whether to wait for another subtitle (that possibly
overlaps current one) or whether to render this one. Only after it gets
next subtitle buffer or gap event can the element know for sure that the
subtitle can be rendered.
I'm not sure how to fix this, perhaps the sematics of the GAP event could
be altered so that it would indicate that there is no following subtitle
buffer in the time range of the event? So the output from demuxer could
look like
buf 1 (PTS 0, Duration 25)
gap (time 0, duration 5)
gap (time 5, duration 5)
gap (time 10, duration 5)
…
gap (time 45, duration 5)
buf2 (PTS 50, duration 25)
gap (time 50, duration 5)
...
(of course the gap events can be coalesced if demuxer knows beforehand)
-Matej
[1] http://www.webmproject.org/docs/container/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130331/99e55913/attachment.html>
More information about the gstreamer-devel
mailing list