<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
Hi,
<div><br>
</div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">I have two custom sources, a camera and a GPS and I am looking for a way to synchronise them.</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Each GPS frame has a timestamp (in microseconds). Each video frame is timestamped by the</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">driver. </span>I need both of these to share a common reference so that I can have them roughly synchronised</div>
<div>downstream, and be able refer to a timestamp when they are stored in our data format.</div>
<div><br>
</div>
<div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">I have watched Nicolas Dufresne's talk [1] as well as Edward Hervey's [2], and read the related pages</div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">of the doc. However, I still don't really see how to proceed in the right way.</div>
</div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br>
</div>
<div><font color="#000000"><span style="caret-color: rgb(0, 0, 0);">My understanding was that each custom source element should use the clock it was assigned by the</span></font></div>
<div><font color="#000000"><span style="caret-color: rgb(0, 0, 0);">pipeline to compute </span></font><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">the buffers' timestamps.</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br>
</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">I thought I had to instantiate a new GstClock for each of </span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">my source then use gst_clock_add_observation</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">or similar to get the parameters needed for the </span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">computation, but it looks like this class is only meant</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">to be subclassed.</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br>
</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Do I need to create two subclasses of GstClock?</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br>
</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">On the other hand, v4l2src uses the system's time directly, and the conversation is done in a rather</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">manual fashion as opposed to using ready made objects.</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br>
</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Any suggestion of plugins I should look into that would be similar to my use case?</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br>
</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Regards,</span></div>
<div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Simon</span></div>
<div><br>
</div>
<div>[1] <a href="https://www.youtube.com/watch?v=OKTfNAmFTo4">https://www.youtube.com/watch?v=OKTfNAmFTo4</a></div>
<div>[2] <a href="https://www.youtube.com/watch?v=EOHl1ktWwp4">https://www.youtube.com/watch?v=EOHl1ktWwp4</a></div>
</body>
</html>