summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/play.py2
-rw-r--r--examples/remuxer.py2
-rwxr-xr-xexamples/switch.py2
-rwxr-xr-xexamples/synchronizer.py2
4 files changed, 8 insertions, 0 deletions
diff --git a/examples/play.py b/examples/play.py
index c6b5ac1..a7522b4 100644
--- a/examples/play.py
+++ b/examples/play.py
@@ -32,6 +32,8 @@ class GstPlayer:
if message.structure is None:
return
if message.structure.get_name() == 'prepare-xwindow-id':
+ # Sync with the X server before giving the X-id to the sink
+ gtk.gdk.display_get_default().sync()
self.videowidget.set_sink(message.src)
message.src.set_property('force-aspect-ratio', True)
diff --git a/examples/remuxer.py b/examples/remuxer.py
index b81e93e..039e38c 100644
--- a/examples/remuxer.py
+++ b/examples/remuxer.py
@@ -32,6 +32,8 @@ class GstPlayer:
if message.structure is None:
return
if message.structure.get_name() == 'prepare-xwindow-id':
+ # Sync with the X server before giving the X-id to the sink
+ gtk.gdk.display_get_default().sync()
self.videowidget.set_sink(message.src)
message.src.set_property('force-aspect-ratio', True)
diff --git a/examples/switch.py b/examples/switch.py
index af33cc6..7117843 100755
--- a/examples/switch.py
+++ b/examples/switch.py
@@ -35,6 +35,8 @@ class SwitchTest:
if message.structure is None:
return
if message.structure.get_name() == 'prepare-xwindow-id':
+ # Sync with the X server before giving the X-id to the sink
+ gtk.gdk.display_get_default().sync()
self.videowidget.set_sink(message.src)
message.src.set_property('force-aspect-ratio', True)
diff --git a/examples/synchronizer.py b/examples/synchronizer.py
index 709a9dd..f5eff50 100755
--- a/examples/synchronizer.py
+++ b/examples/synchronizer.py
@@ -32,6 +32,8 @@ class GstPlayer:
if message.structure is None:
return
if message.structure.get_name() == 'prepare-xwindow-id':
+ # Sync with the X server before giving the X-id to the sink
+ gtk.gdk.display_get_default().sync()
self.videowidget.set_sink(message.src)
message.src.set_property('force-aspect-ratio', True)