How to synchronize buffer timestamp across two gstreamer pipeline(appsink,appsrc, rtspserver)

Sebastian Dröge sebastian at centricular.com
Fri Jun 17 11:40:27 UTC 2016


On Do, 2016-06-16 at 22:45 -0400, Jake Zhang wrote:
> Thanks for quick reply Nicolas.
> 
> I am still pretty new with Gstreamer so please bear with me if my
> questions sounds trivial to you.
> My appsrc has been in live mode and my v4l2src has been set as do-
> timestamp. Like I said, the pipeline is running without any issue,
> but I really need make sure the time-stamp of the same buffer on two
> pipelines are the same, as we need use PTS a frame tag to do some
> other processing on the RTSP client side . 

If you need them to be exactly the same you need to:
a) use the same clock on both pipeline (gst_pipeline_use_clock())
b) set the same base time on both pipelines
(gst_element_set_base_time()) and set start time to GST_CLOCK_TIME_NONE
(gst_element_set_start_time())
c) configure the latency correctly, that is: query the latency (with
the latency query) on the appsink once it is PLAYING, and configure
exactly those values on the corresponding appsrc as min/max latency.

Additionally you need to ensure that the segment event that comes out
of appsrc is the same as the one that went into appsink, but in your
pipeline that is most likely the case. But better double check and if
not you need to ensure that appsrc is producing the same segment event.


If you use a single, connected pipeline, GStreamer will ensure these
things by itself already. If you use multiple, you will need to do that
yourself.

-- 

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160617/553512fe/attachment.sig>


More information about the gstreamer-devel mailing list