From 049b95862fe7d751b40c5e448471226c8063f3d8 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Thu, 28 Jan 2016 12:19:13 +0100 Subject: sync gui-clock --- voctogui/lib/clock.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'voctogui') diff --git a/voctogui/lib/clock.py b/voctogui/lib/clock.py index 862c2d5..9075bdc 100644 --- a/voctogui/lib/clock.py +++ b/voctogui/lib/clock.py @@ -8,12 +8,13 @@ port = 9998 log = logging.getLogger('Clock') Clock = None -log.debug("Obtaining System-Clock") -SystemClock = Gst.SystemClock.obtain() - def obtainClock(host): global log, Clock, SystemClock log.debug('obtaining NetClientClock from host %s', host) - Clock = GstNet.NetClientClock.new('voctocore', host, port, SystemClock.get_time()) - log.info('obtained NetClientClock from host %s: %s', host, Clock) + Clock = GstNet.NetClientClock.new('voctocore', host, port, 0) + log.debug('obtained NetClientClock from host %s: %s', host, Clock) + + log.debug('waiting for NetClientClock to sync to host') + Clock.wait_for_sync(Gst.CLOCK_TIME_NONE) + log.info('successfully synced NetClientClock to host') -- cgit v1.2.3