From c64ce93a9f2a85bcaafe8fddf1b591f1ba618d32 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Thu, 28 Jan 2016 11:22:26 +0100 Subject: wait until clock-sync --- .../gstreamer/source-videotestsrc-as-cam1-with-networktime.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'example-scripts/gstreamer') diff --git a/example-scripts/gstreamer/source-videotestsrc-as-cam1-with-networktime.py b/example-scripts/gstreamer/source-videotestsrc-as-cam1-with-networktime.py index b07bf55..441a129 100755 --- a/example-scripts/gstreamer/source-videotestsrc-as-cam1-with-networktime.py +++ b/example-scripts/gstreamer/source-videotestsrc-as-cam1-with-networktime.py @@ -25,10 +25,13 @@ class Source(object): tcpclientsink host=127.0.0.1 port=10000 """ - clock = Gst.SystemClock.obtain() - self.clock = GstNet.NetClientClock.new('voctocore', '127.0.0.1', 9998, clock.get_time()) + self.clock = GstNet.NetClientClock.new('voctocore', '127.0.0.1', 9998, 0) print('obtained NetClientClock from host', self.clock) + print('waiting for NetClientClock to sync…') + self.clock.wait_for_sync(Gst.CLOCK_TIME_NONE) + + print('starting pipeline') self.senderPipeline = Gst.parse_launch(pipeline) self.senderPipeline.use_clock(self.clock) self.src = self.senderPipeline.get_by_name('src') -- cgit v1.2.3