Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only use vaapi decode on the client if vaapi rendering is enabled #354

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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