mirror of
https://github.com/novnc/noVNC.git
synced 2026-06-07 21:04:37 +00:00
add encoding support for TightPNG
This commit is contained in:
committed by
Leslie Qi Wang
parent
e91a095ad6
commit
2c813a33fe
@@ -12,6 +12,7 @@ export var encodings = {
|
||||
encodingRRE: 2,
|
||||
encodingHextile: 5,
|
||||
encodingTight: 7,
|
||||
encodingTightPNG: -260,
|
||||
|
||||
pseudoEncodingQualityLevel9: -23,
|
||||
pseudoEncodingQualityLevel0: -32,
|
||||
@@ -19,7 +20,6 @@ export var encodings = {
|
||||
pseudoEncodingLastRect: -224,
|
||||
pseudoEncodingCursor: -239,
|
||||
pseudoEncodingQEMUExtendedKeyEvent: -258,
|
||||
pseudoEncodingTightPNG: -260,
|
||||
pseudoEncodingExtendedDesktopSize: -308,
|
||||
pseudoEncodingXvp: -309,
|
||||
pseudoEncodingFence: -312,
|
||||
@@ -35,6 +35,7 @@ export function encodingName(num) {
|
||||
case encodings.encodingRRE: return "RRE";
|
||||
case encodings.encodingHextile: return "Hextile";
|
||||
case encodings.encodingTight: return "Tight";
|
||||
case encodings.encodingTightPNG: return "Tight";
|
||||
default: return "[unknown encoding " + num + "]";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,6 +170,7 @@ export default function RFB(target, url, options) {
|
||||
this._encHandlers[encodings.encodingRRE] = RFB.encodingHandlers.RRE.bind(this);
|
||||
this._encHandlers[encodings.encodingHextile] = RFB.encodingHandlers.HEXTILE.bind(this);
|
||||
this._encHandlers[encodings.encodingTight] = RFB.encodingHandlers.TIGHT.bind(this);
|
||||
this._encHandlers[encodings.encodingTightPNG] = RFB.encodingHandlers.TIGHT.bind(this);
|
||||
|
||||
this._encHandlers[encodings.pseudoEncodingDesktopSize] = RFB.encodingHandlers.DesktopSize.bind(this);
|
||||
this._encHandlers[encodings.pseudoEncodingLastRect] = RFB.encodingHandlers.last_rect.bind(this);
|
||||
@@ -1256,13 +1257,13 @@ RFB.prototype = {
|
||||
// Only supported with full depth support
|
||||
if (this._fb_depth == 24) {
|
||||
encs.push(encodings.encodingTight);
|
||||
encs.push(encodings.encodingTightPNG);
|
||||
encs.push(encodings.encodingHextile);
|
||||
encs.push(encodings.encodingRRE);
|
||||
}
|
||||
encs.push(encodings.encodingRaw);
|
||||
|
||||
// Psuedo-encoding settings
|
||||
encs.push(encodings.pseudoEncodingTightPNG);
|
||||
encs.push(encodings.pseudoEncodingQualityLevel0 + 6);
|
||||
encs.push(encodings.pseudoEncodingCompressLevel0 + 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user