summaryrefslogtreecommitdiff
path: root/voctocore/lib/clock.py
blob: ed8152e28b488d534ceb19b023bf8d6d8872fd51 (plain)
  1. #!/usr/bin/python3
  2. import logging
  3. from gi.repository import Gst, GstNet
  4. __all__ = ['Clock', 'NetTimeProvider']
  5. port = 9998
  6. log = logging.getLogger('Clock')
  7. log.debug("Obtaining System-Clock")
  8. Clock = Gst.SystemClock.obtain()
  9. log.info("Using System-Clock for all Pipelines: %s", Clock)
  10. log.info("Starting NetTimeProvider on Port %u", port)
  11. NetTimeProvider = GstNet.NetTimeProvider.new(Clock, None, port)