diff --git a/vocto/video_codecs.py b/vocto/video_codecs.py index db3751c2..99386726 100644 --- a/vocto/video_codecs.py +++ b/vocto/video_codecs.py @@ -117,10 +117,14 @@ def construct_video_encoder_pipeline(section): return pipeline -def construct_video_decoder_pipeline(section): +def construct_video_decoder_pipeline(section, videosystem=None): decoder = Config.getVideoDecoder(section) codec, options = Config.getVideoCodec(section) - if decoder == 'vaapi': + if videosystem == 'vaapi': + return vaapi_decoders[codec] + elif videosystem is not None: + return cpu_decoders[codec] + elif decoder == 'vaapi': return vaapi_decoders[codec] elif decoder == 'cpu': return cpu_decoders[codec] diff --git a/voctogui/lib/videodisplay.py b/voctogui/lib/videodisplay.py index 444a181d..3638e0aa 100644 --- a/voctogui/lib/videodisplay.py +++ b/voctogui/lib/videodisplay.py @@ -37,6 +37,7 @@ def __init__(self, video_drawing_area, audio_display, port, name, width=None, he host=Config.getHost(), port=port) + videosystem = Config.getVideoSystem() if Config.getPreviewsEnabled(): self.log.info('using encoded previews instead of raw-video') @@ -46,7 +47,7 @@ def __init__(self, video_drawing_area, audio_display, port, name, width=None, he name=queue-video-{name} ! {video_decoder} """.format(name=name, - video_decoder=construct_video_decoder_pipeline('previews')) + video_decoder=construct_video_decoder_pipeline('previews', videosystem)) else: video_decoder = None @@ -77,7 +78,6 @@ def __init__(self, video_drawing_area, audio_display, port, name, width=None, he """.format(name=name) # Video Display - videosystem = Config.getVideoSystem() self.log.debug('Configuring for Video-System %s', videosystem) if videosystem == 'gl':