Skip to content

Commit

Permalink
#122 require 'rencodeplus' for decode worker
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Feb 7, 2022
1 parent cdbea3f commit 8e69aa1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion html5/js/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,11 @@ XpraClient.prototype._process_hello = function(packet, ctx) {
break;
}
}
//don't use offscreen or decode worker with 'rencodeplus':
if (ctx.decode_worker && ctx.packet_encoder!="rencodeplus") {
ctx.decode_worker = null;
ctx.offscreen_api = false;
}

// find the modifier to use for Num_Lock
const modifier_keycodes = hello['modifier_keycodes'];
Expand Down Expand Up @@ -3157,7 +3162,7 @@ XpraClient.prototype._process_draw = function(packet, ctx) {
}
raw_buffers.push(img_data.buffer);
}
if (ctx.decode_worker && ctx.packet_encoder=="rencodeplus") {
if (ctx.decode_worker) {
ctx.decode_worker.postMessage({'cmd': 'decode', 'packet' : packet, 'start' : now}, raw_buffers);
//the worker draw event will call do_process_draw
}
Expand Down

0 comments on commit 8e69aa1

Please sign in to comment.