}
}
- if (cp->customCompressLevel && cp->compressLevel >= 0 && cp->compressLevel <= 9)
+ if (cp->compressLevel >= 0 && cp->compressLevel <= 9)
encodings[nEncodings++] = pseudoEncodingCompressLevel0 + cp->compressLevel;
- if (!cp->noJpeg && cp->qualityLevel >= 0 && cp->qualityLevel <= 9)
+ if (cp->qualityLevel >= 0 && cp->qualityLevel <= 9)
encodings[nEncodings++] = pseudoEncodingQualityLevel0 + cp->qualityLevel;
writeSetEncodings(nEncodings, encodings);
supportsDesktopRename(false), supportsLastRect(false),
supportsSetDesktopSize(false), supportsFence(false),
supportsContinuousUpdates(false),
- customCompressLevel(false), compressLevel(2),
- noJpeg(false), qualityLevel(-1), fineQualityLevel(-1),
+ compressLevel(2), qualityLevel(-1), fineQualityLevel(-1),
subsampling(subsampleUndefined), name_(0),
currentEncoding_(encodingRaw), verStrPos(0)
{
supportsExtendedDesktopSize = false;
supportsLocalXCursor = false;
supportsLastRect = false;
- customCompressLevel = false;
compressLevel = -1;
- noJpeg = true;
qualityLevel = -1;
fineQualityLevel = -1;
subsampling = subsampleUndefined;
if (Encoder::supported(encodings[i]))
currentEncoding_ = encodings[i];
}
-
- if (compressLevel != -1)
- customCompressLevel = true;
- if ((qualityLevel != -1) || (fineQualityLevel != -1) ||
- (subsampling != subsampleUndefined))
- noJpeg = false;
}
bool supportsFence;
bool supportsContinuousUpdates;
- bool customCompressLevel;
int compressLevel;
- bool noJpeg;
int qualityLevel;
int fineQualityLevel;
int subsampling;
cp.supportsExtendedDesktopSize = true;
cp.supportsDesktopRename = true;
- cp.customCompressLevel = customCompressLevel;
- cp.compressLevel = compressLevel;
+ if (customCompressLevel)
+ cp.compressLevel = compressLevel;
+ else
+ cp.compressLevel = -1;
- cp.noJpeg = noJpeg;
- cp.qualityLevel = qualityLevel;
+ if (!noJpeg)
+ cp.qualityLevel = qualityLevel;
+ else
+ cp.qualityLevel = -1;
if(sock == NULL) {
try {
if (encNum != -1)
self->currentEncoding = encNum;
-
- self->cp.qualityLevel = qualityLevel;
}
self->cp.supportsLocalCursor = true;
- self->cp.customCompressLevel = customCompressLevel;
- self->cp.compressLevel = compressLevel;
+ if (customCompressLevel)
+ self->cp.compressLevel = compressLevel;
+ else
+ self->cp.compressLevel = -1;
- self->cp.noJpeg = noJpeg;
+ if (!noJpeg && !autoSelect)
+ self->cp.qualityLevel = qualityLevel;
+ else
+ self->cp.qualityLevel = -1;
self->encodingChange = true;