aboutsummaryrefslogtreecommitdiff
path: root/voctogui
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2016-01-28 12:19:13 +0100
committerMaZderMind <git@mazdermind.de>2016-02-02 16:05:56 +0100
commit049b95862fe7d751b40c5e448471226c8063f3d8 (patch)
tree5b585144c6dcf6f7bd2043f74df4e8e85f5a2773 /voctogui
parentc64ce93a9f2a85bcaafe8fddf1b591f1ba618d32 (diff)
sync gui-clock
Diffstat (limited to 'voctogui')
-rw-r--r--voctogui/lib/clock.py11
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')