aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xexample-scripts/gstreamer/source-videotestsrc-as-cam1-with-networktime.py7
1 files changed, 5 insertions, 2 deletions
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')