Skip to content

Commit

Permalink
only use vaapi decode on the client if vaapi rendering is enabled as …
Browse files Browse the repository at this point in the history
…well
  • Loading branch information
justjanne committed Jan 8, 2025
1 parent fa7e77a commit 091674b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions vocto/video_codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions voctogui/lib/videodisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -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
Expand Down Expand Up @@ -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':
Expand Down

0 comments on commit 091674b

Please sign in to comment.