Skip to content

Commit

Permalink
#451 also honour the prefered encoding order when ranking video pipel…
Browse files Browse the repository at this point in the history
…ine options

git-svn-id: https://xpra.org/svn/Xpra/trunk@26757 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 17, 2020
1 parent 304c163 commit 9cc2b84
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/xpra/server/window/window_video_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,14 @@ def get_video_pipeline_options(self, encodings, width, height, src_format, force
if not encoder_specs:
scorelog(" no encoder specs for %s", encoding)
continue
encoding_score_delta = self.encoding_options.get("%s.score-delta" % encoding, 0)
#if not specified as an encoding option,
#discount encodings further down the list of preferred encodings:
#(ie: prefer h264 to vp9)
try:
encoding_score_delta = len(PREFERED_ENCODING_ORDER)//2-PREFERED_ENCODING_ORDER.index(encoding)
except ValueError:
encoding_score_delta = 0
encoding_score_delta = self.encoding_options.get("%s.score-delta" % encoding, encoding_score_delta)
def add_scores(info, csc_spec, enc_in_format):
#find encoders that take 'enc_in_format' as input:
colorspace_specs = encoder_specs.get(enc_in_format)
Expand Down

0 comments on commit 9cc2b84

Please sign in to comment.