Plugin dev Timestamp

Tim Müller tim at centricular.com
Thu May 31 09:36:31 UTC 2018


On Thu, 2018-05-31 at 08:50 +0000, Duchassin Frédéric wrote:

Hi Frédéric,

> This plugin receive a t2mi stream and buffer each packet. When a
> complete t2mi packet is receive, the packet is demuxed and send to
> sink pad for the next gstreamer element.
> My problem is how to set timestamp of the send buffer ?  (PTS, DTS
> and duration) I don’t really understand the basic concept of these
> timestamp.
> My source is live source.

If your source is a live source, it will send a segment event in TIME
format to your element, and it will send timestamped buffers to your
element.

What elements are upstream of your element?

You likely will get buffers with pts=dts in your case or with one of
them unset.

In any case your element should pass through the segment event from
upstream and it should pass through the timestamps it gets from
upstream (this doesn't have to be 1:1, but you basically need to
maintain upstream's notion of time, so if upstream starts sending you
buffers with first timestamp 10 seconds your first output buffer should
also be timestamped as ~10 seconds, you shouldn't just start
timestamping as you like, or from 0.

You might find some useful talks on https://gstconf.ubicast.tv/search/
if you look for "time and synchronisation".

Cheers
-Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com


More information about the gstreamer-devel mailing list