diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2008-04-24 11:35:38 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2008-04-24 11:35:38 +0000 |
commit | 839bc5b0d4c40ff7d5d661df80018075b5c3c92f (patch) | |
tree | 304be9e3e31cd80a586f177b250d795a2117ae5c /examples | |
parent | 18e711131e6ffa11cf2bcdfcf035fcc744af0dc3 (diff) |
examples/: Sync with the X server before giving an XID to our sink with a different display connection. This avoids s...
Original commit message from CVS:
* examples/play.py:
* examples/remuxer.py:
* examples/switch.py:
* examples/synchronizer.py:
Sync with the X server before giving an XID to our sink with a different
display connection. This avoids spurious X servers where the sink's
display connection doesn't know the XID that the GDK thread's does.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/play.py | 2 | ||||
-rw-r--r-- | examples/remuxer.py | 2 | ||||
-rwxr-xr-x | examples/switch.py | 2 | ||||
-rwxr-xr-x | examples/synchronizer.py | 2 |
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) |