<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1473948778575_10090">Cheers.</div><div><br></div><div id="yui_3_16_0_ym19_1_1473948778575_10601">In case this is useful to anyone in the future:<br></div><div id="yui_3_16_0_ym19_1_1473948778575_10447"><br></div><div id="yui_3_16_0_ym19_1_1473948778575_10099">I wasn't sure how synchronously to wait for the pipeline to become prerolled, while using GLib.MainLoop -  but was able to grab the system clock before the pipeline was prerolled, and set it like this:<br></div><div id="yui_3_16_0_ym19_1_1473948778575_10097"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1473948778575_10098">>>> clock = Gst.SystemClock.obtain()<br id="yui_3_16_0_ym19_1_1473948778575_10102">>>> pipeline.use_clock(clock)</div><div id="yui_3_16_0_ym19_1_1473948778575_10103" dir="ltr"><br></div><div dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1473948778575_10537" dir="ltr">I verified this was the same clock that the pipeline used, by watching for the 'new-clock' message on the bus <br></div><div id="yui_3_16_0_ym19_1_1473948778575_10538" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1473948778575_10603" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1473948778575_10292" dir="ltr">bus = pipeline.get_bus()<br id="yui_3_16_0_ym19_1_1473948778575_10267"><br id="yui_3_16_0_ym19_1_1473948778575_10271">def on_message(bus, message):<br id="yui_3_16_0_ym19_1_1473948778575_10272">    if pipeline.get_clock():<br id="yui_3_16_0_ym19_1_1473948778575_10274">        print("on_message, type: %s" % message.type)<br id="yui_3_16_0_ym19_1_1473948778575_10276">        clock = pipeline.get_clock()<br id="yui_3_16_0_ym19_1_1473948778575_10277">        sysclock = Gst.SystemClock.obtain()<br id="yui_3_16_0_ym19_1_1473948778575_10278">        print("sysclock, clock, clock == sysclock", sysclock, clock, sysclock == clock)<br id="yui_3_16_0_ym19_1_1473948778575_10282">    <br id="yui_3_16_0_ym19_1_1473948778575_10286">bus.add_signal_watch()<br id="yui_3_16_0_ym19_1_1473948778575_10288">bus.connect("message::new-clock", on_message)<br id="yui_3_16_0_ym19_1_1473948778575_10289">bus.add_watch(0, bus_call, mainloop) # 0 == GLib.PRIORITY_DEFAULT <br></div><div id="yui_3_16_0_ym19_1_1473948778575_10540" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1473948778575_10091"><span></span></div><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font face="Arial" size="2"> On Tuesday, September 13, 2016 9:31 PM, Arjen Veenhuizen <arjen.veenhuizen@tno.nl> wrote:<br></font></div> <blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <br><br> <div class="y_msg_container">I think you have to wait until the pipeline is at least in PREROLLED state<br clear="none">before you can retrieve a valid clock.<br clear="none"><br clear="none"><br clear="none"><br clear="none">--<br clear="none">View this message in context: <a shape="rect" href="http://gstreamer-devel.966125.n4.nabble.com/pipelne-get-clock-returns-None-tp4679565p4679568.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/pipelne-get-clock-returns-None-tp4679565p4679568.html</a><br clear="none">Sent from the GStreamer-devel mailing list archive at Nabble.com.<br clear="none">_______________________________________________<br clear="none">gstreamer-devel mailing list<br clear="none"><a shape="rect" ymailto="mailto:gstreamer-devel@lists.freedesktop.org" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br clear="none"><a shape="rect" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><div class="yqt7796361169" id="yqtfd93927"><br clear="none"></div><br><br></div> </blockquote> </div> </div>  </div></div></body></html>