aboutsummaryrefslogtreecommitdiff
path: root/voctogui
diff options
context:
space:
mode:
authorMaZderMind <github@mazdermind.de>2016-01-05 19:36:02 +0100
committerMaZderMind <github@mazdermind.de>2016-01-05 19:36:02 +0100
commite2969b87441a46fe0c017f1f29bb7ec3f4fce585 (patch)
treea14bfca52b07de7f85b7b0021c9e57076ac8efed /voctogui
parent63ed14fbc59ea3a15539cf93fd23fb71950cd8af (diff)
allow selecting different video-modes via config
Diffstat (limited to 'voctogui')
-rw-r--r--voctogui/default-config.ini10
-rw-r--r--voctogui/lib/videodisplay.py30
2 files changed, 35 insertions, 5 deletions
diff --git a/voctogui/default-config.ini b/voctogui/default-config.ini
index 6258e7c..cfb7ae0 100644
--- a/voctogui/default-config.ini
+++ b/voctogui/default-config.ini
@@ -11,3 +11,13 @@ use=true
[mainvideo]
playaudio=true
+
+[videodisplay]
+# Use OpenGL - most performant
+system=gl
+
+# Use XVideo - oldschool
+#system=xv
+
+# Use simple X-Images - least performant
+#system=x
diff --git a/voctogui/lib/videodisplay.py b/voctogui/lib/videodisplay.py
index c75f65e..b6eab6b 100644
--- a/voctogui/lib/videodisplay.py
+++ b/voctogui/lib/videodisplay.py
@@ -46,11 +46,31 @@ class VideoDisplay(object):
"""
# Video Display
- pipeline += """
- glupload !
- glcolorconvert !
- glimagesinkelement
- """
+ videosystem = Config.get('videodisplay', 'system')
+ self.log.debug('Configuring for Video-System %s', videosystem)
+ if videosystem == 'gl':
+ pipeline += """
+ glupload !
+ glcolorconvert !
+ glimagesinkelement
+ """
+
+ elif videosystem == 'xv':
+ pipeline += """
+ xvimagesink
+ """
+
+ elif videosystem == 'x':
+ pipeline += """
+ videoconvert !
+ videoscale !
+ ximagesink
+ """
+
+ else:
+ raise Exception('Invalid Videodisplay-System configured: %s'. system)
+
+
# If an Audio-Path is required, add an Audio-Path through a level-Element
if self.level_callback or play_audio: