<div dir="ltr"><div>Hi,<br><br></div>I implemented this on top of a RTSP server with gst-rtsp-server. Now I'm facing with an other problem. If the pipeline uses the realtime clock, the synchronization is affected by system clock changes (backward or forward), e.g. pipeline runs very fast or is blocked depending clock advanced or went back. Monotonic clock is not affected. Any idea how to solve this ?<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-13 21:30 GMT+01:00 Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
as discussed in private mail before, basically what you need to do here<br>
is (because you want to get the UTC times of when the frame was<br>
*captured) to convert the buffer PTS of each buffer together with the<br>
segment and the base time to the pipeline's clock time.<br>
<br>
If the pipeline is using the system clock and set to the real-time<br>
clock and is using UTC time, then you can use the value directly.<br>
Otherwise you'll have to do the translation as needed.<br>
<div class="HOEnZb"><div class="h5"><br>
On Di, 2016-01-12 at 11:09 +0100, Florian Langlois wrote:<br>
> yes, my thought was to create the pipeline, set the system clock in<br>
> REALTIME and develop a GstBaseParse element to insert NAL SEI<br>
> Unregistered with the timestamp into the H.264 stream.<br>
><br>
> Bad idea ?<br>
><br>
> 2016-01-12 4:26 GMT+01:00 Nicolas Dufresne <nicolas.dufresne@collabor<br>
> <a href="http://a.com" rel="noreferrer" target="_blank">a.com</a>>:<br>
> > Le mardi 12 janvier 2016 à 02:29 +0100, Florian Langlois a écrit :<br>
> > > Hmm actually i should inherit from GstBaseParse<br>
> > > Le 12 janv. 2016 1:31 AM, "Florian Langlois" <<a href="mailto:chamois94@gmail.com">chamois94@gmail.com</a><br>
> > > a<br>
> > > écrit :<br>
> > > > Thx for the answer.<br>
> > > > Can I simply inherit from GstBaseTransform and use the tracked<br>
> > > > segment from it since it keeps a copy of it ?<br>
> ><br>
> > From an element, you can't assume the application have setup the<br>
> > clock<br>
> > the way you want. So instead, you'll have to translate from one<br>
> > clock<br>
> > to UTC clock to get what you described earlier.<br>
> ><br>
> > > > Le 12 janv. 2016 12:25 AM, "Nicolas Dufresne"<br>
> > > > <<a href="mailto:nicolas.dufresne@collabora.com">nicolas.dufresne@collabora.com</a>> a écrit :<br>
> > > > > Le lundi 11 janvier 2016 à 23:24 +0100, Florian Langlois a<br>
> > > > > écrit :<br>
> > > > > > Hello,<br>
> > > > > > For a project I need to insert UTC timestamps into a h.264<br>
> > > > > stream<br>
> > > > > > using the MISB ST 604.<br>
> > > > > > I also need to insert Commercial precision timestamp<br>
> > detailled<br>
> > > > > in the<br>
> > > > > > same MISB.<br>
> > > > > > Frames are captured from a live source v4l2src then encoded<br>
> > > > > using an<br>
> > > > > > imx6 encoder and send with a udpsink.<br>
> > > > > > Before to start I want to know if someone here has any<br>
> > idea of<br>
> > > > > what<br>
> > > > > > would be a good pipeline architecture for that ?<br>
> > > > > > I wanted to develop a dedicated plugin for that but i dont<br>
> > know<br>
> > > > > how<br>
> > > > > > to get correct UTC timestamp ? Do such a gstclock exist ?<br>
> > > > > > Thx<br>
> > > > > > Florian<br>
> > > > ><br>
> > > > > You can grab the system clock and set the clock-type property<br>
> > to<br>
> > > > > GST_CLOCK_TYPE_REALTIME (instead of default which is<br>
> > > > > GST_CLOCK_TYPE_MONOTONIC). Then you need to force your<br>
> > pipeline<br>
> > > > > into<br>
> > > > > using that clock, see gst_pipeline_use_clock() method.<br>
> > > > ><br>
> > > > > Note that to convert the buffer timestamp into clock time<br>
> > (UTC<br>
> > > > > time),<br>
> > > > > you will have to track the GstSegment structure from the<br>
> > segment<br>
> > > > > event,<br>
> > > > > convert the timestamp to running-time and add the pipeline<br>
> > base<br>
> > > > > time<br>
> > > > > (gst_element_get_base_time(pipeline)).<br>
> > > > ><br>
> > > > > cheers,<br>
> > > > > Nicolas<br>
> > > > > _______________________________________________<br>
> > > > > gstreamer-devel mailing list<br>
> > > > > <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> > > > > <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
> > > > ><br>
> ><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com" rel="noreferrer" target="_blank">http://www.centricular.com</a><br>
<br>
</font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>