From aa2e12b92df3400e6f9cb89afc16eb968b0c2491 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Wed, 27 Jan 2016 12:25:53 +0100 Subject: use the server-net-clock in the gui --- voctogui/lib/clock.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 voctogui/lib/clock.py (limited to 'voctogui/lib/clock.py') diff --git a/voctogui/lib/clock.py b/voctogui/lib/clock.py new file mode 100644 index 0000000..8fdbe3d --- /dev/null +++ b/voctogui/lib/clock.py @@ -0,0 +1,19 @@ +#!/usr/bin/python3 +import logging +from gi.repository import Gst, GstNet + +__all__ = ['Clock'] +port = 9998 + +log = logging.getLogger('Clock') +Clock = None + +log.debug("Obtaining System-Clock") +SystemClock = Gst.SystemClock.obtain() + +def obtainClock(host): + global log, Clock + + log.debug('obtaining NetClientClock from host %s', host) + Clock = GstNet.NetClientClock.new('voctocore', host, port, 0) + log.info('obtained NetClientClock from host %s: %s', host, Clock) -- cgit v1.2.3