summaryrefslogtreecommitdiff
path: root/voctogui/lib/clock.py
blob: 8fdbe3dfedc2aaaef6227616bb19eaaf97998313 (plain)
  1. #!/usr/bin/python3
  2. import logging
  3. from gi.repository import Gst, GstNet
  4. __all__ = ['Clock']
  5. port = 9998
  6. log = logging.getLogger('Clock')
  7. Clock = None
  8. log.debug("Obtaining System-Clock")
  9. SystemClock = Gst.SystemClock.obtain()
  10. def obtainClock(host):
  11. global log, Clock
  12. log.debug('obtaining NetClientClock from host %s', host)
  13. Clock = GstNet.NetClientClock.new('voctocore', host, port, 0)
  14. log.info('obtained NetClientClock from host %s: %s', host, Clock)