Skip to content

Commit

Permalink
return the codecs actually loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 22, 2021
1 parent ac417e5 commit 2dab4cc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xpra/codecs/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,14 @@ def load_codec(name):
def load_codecs(encoders=True, decoders=True, csc=True, video=True):
log("loading codecs")

loaded = []
def load(*names):
for name in names:
if has_codec(name):
continue
load_codec(name)
if has_codec(name) and name not in loaded:
loaded.append(name)

if encoders:
load(*ENCODER_CODECS)
Expand All @@ -201,7 +206,8 @@ def load(*names):
load(*DECODER_CODECS)
if video:
load(*DECODER_VIDEO_CODECS)
log("done loading codecs")
log("done loading codecs: %s", loaded)
return loaded

def show_codecs(show=None):
#print("codec_status=%s" % codecs)
Expand Down

0 comments on commit 2dab4cc

Please sign in to comment.