RemoteDesktop: improve stability

This commit is contained in:
DanyLE 2022-08-17 18:04:04 +02:00
parent 9800f701e6
commit a4943e83d1
11 changed files with 35 additions and 21 deletions

View File

@ -7,6 +7,7 @@ Further information on **wvnc**: [https://blog.lxsang.me/post/id/23](https://blo
## Change logs
* v0.1.9 - improve stability
* v0.1.7-8 - remove package dependencies, use web assembly for jpeg decoding, improve rendering performance and connection stability
* v0.1.6 - Change category
* v0.1.5 - add package dependencies and use the new **libwvnc**

View File

@ -7,6 +7,7 @@ Further information on **wvnc**: [https://blog.lxsang.me/post/id/23](https://blo
## Change logs
* v0.1.9 - improve stability
* v0.1.7-8 - remove package dependencies, use web assembly for jpeg decoding, improve rendering performance and connection stability
* v0.1.6 - Change category
* v0.1.5 - add package dependencies and use the new **libwvnc**

View File

@ -24,19 +24,26 @@
w = datain[5] | (datain[6] << 8);
h = datain[7] | (datain[8] << 8);
flag = datain[9];
p = api.createBuffer(datain.length);
Module.HEAP8.set(datain, p);
size = w * h * 4;
po = api.decodeBuffer(p, datain.length, size);
dataout = new Uint8Array(Module.HEAP8.buffer, po, size);
msg = {};
tmp = new Uint8Array(size);
tmp.set(dataout, 0);
msg.pixels = tmp.buffer;
msg.pixels = void 0;
msg.x = x;
msg.y = y;
msg.w = w;
msg.h = h;
size = w * h * 4;
tmp = new Uint8Array(size);
if (flag === 0) {
tmp.set(datain.subarray(10), 0);
msg.pixels = tmp.buffer;
postMessage(msg, [msg.pixels]);
return;
}
p = api.createBuffer(datain.length);
Module.HEAP8.set(datain, p);
po = api.decodeBuffer(p, datain.length, size);
dataout = new Uint8Array(Module.HEAP8.buffer, po, size);
tmp.set(dataout, 0);
msg.pixels = tmp.buffer;
postMessage(msg, [msg.pixels]);
api.destroyBuffer(po);
return api.destroyBuffer(p);

View File

@ -7,7 +7,7 @@
"author": "Dany LE",
"email": "contact@iohub.dev"
},
"version":"0.1.8-b",
"version":"0.1.9-b",
"dependencies": [],
"category":"Internet",
"icon": "icon.png",

View File

@ -153,8 +153,6 @@ class WVNC
if not @socket
return
data = new Uint8Array msg.pixels
#w = @buffer.width * @scale
#h = @buffer.height * @scale
ctx = @canvas.getContext "2d", { alpha: false }
imgData = ctx.createImageData msg.w, msg.h
imgData.data.set data

View File

@ -24,19 +24,26 @@
w = datain[5] | (datain[6] << 8);
h = datain[7] | (datain[8] << 8);
flag = datain[9];
p = api.createBuffer(datain.length);
Module.HEAP8.set(datain, p);
size = w * h * 4;
po = api.decodeBuffer(p, datain.length, size);
dataout = new Uint8Array(Module.HEAP8.buffer, po, size);
msg = {};
tmp = new Uint8Array(size);
tmp.set(dataout, 0);
msg.pixels = tmp.buffer;
msg.pixels = void 0;
msg.x = x;
msg.y = y;
msg.w = w;
msg.h = h;
size = w * h * 4;
tmp = new Uint8Array(size);
if (flag === 0) {
tmp.set(datain.subarray(10), 0);
msg.pixels = tmp.buffer;
postMessage(msg, [msg.pixels]);
return;
}
p = api.createBuffer(datain.length);
Module.HEAP8.set(datain, p);
po = api.decodeBuffer(p, datain.length, size);
dataout = new Uint8Array(Module.HEAP8.buffer, po, size);
tmp.set(dataout, 0);
msg.pixels = tmp.buffer;
postMessage(msg, [msg.pixels]);
api.destroyBuffer(po);
return api.destroyBuffer(p);

View File

@ -7,7 +7,7 @@
"author": "Dany LE",
"email": "contact@iohub.dev"
},
"version":"0.1.8-b",
"version":"0.1.9-b",
"dependencies": [],
"category":"Internet",
"icon": "icon.png",

View File

@ -365,7 +365,7 @@
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/RemoteDesktop/README.md",
"category": "Internet",
"author": "Dany LE",
"version": "0.1.8-b",
"version": "0.1.9-b",
"dependencies": [],"category":"Internet","icon":"icon.png","mimes":["none"],
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/RemoteDesktop/build/release/RemoteDesktop.zip"
},