Skip to content

Draft: qtdemux: use a GstMeta to attach rational QT timestamps to buffers

GStreamer's nanosecond timestamps can cause rounding errors for applications, for example when implementing MSE, which can be avoided by exposing precise rational versions of buffer timestamps.

This patch introduces new API to handle rational time, as well as a new GstMeta to attach these rational timestamps to buffers, and implements it in qtdemux, which looks like this:

buffer: dts=0:00:00.066666666, pts=0:00:00.233333333, dur=0:00:00.033333334, flags=delta-unit tag-memory, meta=GstRationalTimeMeta[buffer_dts=1/15, buffer_dts_dur=1/30, buffer_pts=7/30, buffer_pts_dur=0/0, stream_dts=1/15, stream_dts_dur=0/0, stream_pts=7/30, stream_pts_dur=0/0]
Edited by Vivienne Watermeier

Merge request reports