pipelne.get_clock() returns None
Stuart Axon
stuaxo2 at yahoo.com
Thu Sep 15 14:20:13 UTC 2016
Cheers.
In case this is useful to anyone in the future:
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:
>>> clock = Gst.SystemClock.obtain()
>>> pipeline.use_clock(clock)
I verified this was the same clock that the pipeline used, by watching for the 'new-clock' message on the bus
bus = pipeline.get_bus()
def on_message(bus, message):
if pipeline.get_clock():
print("on_message, type: %s" % message.type)
clock = pipeline.get_clock()
sysclock = Gst.SystemClock.obtain()
print("sysclock, clock, clock == sysclock", sysclock, clock, sysclock == clock)
bus.add_signal_watch()
bus.connect("message::new-clock", on_message)
bus.add_watch(0, bus_call, mainloop) # 0 == GLib.PRIORITY_DEFAULT
On Tuesday, September 13, 2016 9:31 PM, Arjen Veenhuizen <arjen.veenhuizen at tno.nl> wrote:
I think you have to wait until the pipeline is at least in PREROLLED state
before you can retrieve a valid clock.
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/pipelne-get-clock-returns-None-tp4679565p4679568.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160915/0c77f10b/attachment.html>
More information about the gstreamer-devel
mailing list