Commit 3d9a5639 authored by dscho's avatar dscho

Move tightQualityLevel out of the JPEG specific part

The variable tightQualityLevel is used for ZYWRLE compression, too,
so if libjpeg is not present, but libz is, we still need to have
that struct member.
Signed-off-by: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent ce8d6c24
......@@ -369,9 +369,9 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen,
UNLOCK(rfbClientListMutex);
#ifdef LIBVNCSERVER_HAVE_LIBZ
cl->tightQualityLevel = -1;
#ifdef LIBVNCSERVER_HAVE_LIBJPEG
cl->tightCompressLevel = TIGHT_DEFAULT_COMPRESSION;
cl->tightQualityLevel = -1;
{
int i;
for (i = 0; i < 4; i++)
......@@ -2004,12 +2004,12 @@ rfbProcessClientNormalMessage(rfbClientPtr cl)
cl->tightCompressLevel = enc & 0x0F;
rfbLog("Using compression level %d for client %s\n",
cl->tightCompressLevel, cl->host);
#endif
} else if ( enc >= (uint32_t)rfbEncodingQualityLevel0 &&
enc <= (uint32_t)rfbEncodingQualityLevel9 ) {
cl->tightQualityLevel = enc & 0x0F;
rfbLog("Using image quality level %d for client %s\n",
cl->tightQualityLevel, cl->host);
#endif
} else
#endif
{
......
......@@ -525,6 +525,8 @@ typedef struct _rfbClientRec {
struct z_stream_s compStream;
rfbBool compStreamInited;
uint32_t zlibCompressLevel;
/* the quality level is also used by ZYWRLE */
int tightQualityLevel;
#ifdef LIBVNCSERVER_HAVE_LIBJPEG
/* tight encoding -- preserve zlib streams' state for each client */
......@@ -532,7 +534,6 @@ typedef struct _rfbClientRec {
rfbBool zsActive[4];
int zsLevel[4];
int tightCompressLevel;
int tightQualityLevel;
#endif
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment