[vlc-commits] python tkvlc.py example: specify --no-xlib option on linux
Olivier Aubert
git at videolan.org
Sat Aug 3 19:05:44 CEST 2019
vlc/python | branch: master | Olivier Aubert <contact at olivieraubert.net> | Sat Aug 3 19:05:33 2019 +0200| [b127165332adb17fe713a3170854f25fffe01571] | committer: Olivier Aubert
python tkvlc.py example: specify --no-xlib option on linux
> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=b127165332adb17fe713a3170854f25fffe01571
---
examples/tkvlc.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/examples/tkvlc.py b/examples/tkvlc.py
index cca0476..59cf15b 100755
--- a/examples/tkvlc.py
+++ b/examples/tkvlc.py
@@ -49,6 +49,7 @@ import time
_isMacOS = sys.platform.startswith('darwin')
_isWindows = sys.platform.startswith('win')
+_isLinux = sys.platform.startswith('linux')
if _isMacOS:
from ctypes import c_void_p, cdll
@@ -232,7 +233,10 @@ class Player(Tk.Frame):
timers.pack(side=Tk.BOTTOM, fill=Tk.X)
# VLC player
- self.Instance = vlc.Instance()
+ args = []
+ if _isLinux:
+ args.append('--no-xlib')
+ self.Instance = vlc.Instance(args)
self.player = self.Instance.media_player_new()
self.parent.bind("<Configure>", self.OnConfigure) # catch window resize, etc.
More information about the vlc-commits
mailing list