srtsrc: Fix timestamping
authorEdward Hervey <edward@centricular.com>
Tue, 6 Oct 2020 09:45:36 +0000 (11:45 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 8 Oct 2020 21:12:17 +0000 (21:12 +0000)
commitdd11e91c3b36a0247401c1d9de381847a2e6e8e6
treefc57f7bbf547dab918281d4caeb83a368f491619
parent20d9283e3d3d695f6861260a02f24c466ed6f1b2
srtsrc: Fix timestamping

SRT provides the original timestamp of a packet (with drift/skew corrected for
local clock), which is what should be used for timestamping the outgoing
buffers. This ensures that we output the packets with the same timestamp (and by
extension rate) as the original feed.

Also detect if packets were dropped (by checking the sequence number) and
properly set DISCONT flag on the outgoing buffer.

Finally answer the latency queries

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1658>
ext/srt/gstsrtobject.c
ext/srt/gstsrtobject.h
ext/srt/gstsrtsrc.c
ext/srt/gstsrtsrc.h