diff options
Diffstat (limited to 'voctogui')
-rw-r--r-- | voctogui/lib/clock.py | 11 |
1 files changed, 6 insertions, 5 deletions
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') |