diff options
-rw-r--r-- | jpeg/.cvsignore | 1 | ||||
-rw-r--r-- | rfb/CMsgWriter.cxx | 5 | ||||
-rw-r--r-- | vncviewer/CViewOptions.cxx | 14 | ||||
-rw-r--r-- | vncviewer/CViewOptions.h | 1 | ||||
-rw-r--r-- | vncviewer_unix/CConn.cxx | 1 | ||||
-rw-r--r-- | vncviewer_unix/parameters.h | 1 | ||||
-rw-r--r-- | vncviewer_unix/vncviewer.cxx | 5 |
7 files changed, 24 insertions, 4 deletions
diff --git a/jpeg/.cvsignore b/jpeg/.cvsignore index 4408dc45..b43e5f8d 100644 --- a/jpeg/.cvsignore +++ b/jpeg/.cvsignore @@ -6,3 +6,4 @@ Release jpeg.plg config.log config.status +jconfig.h diff --git a/rfb/CMsgWriter.cxx b/rfb/CMsgWriter.cxx index d429d7ab..1693cbfd 100644 --- a/rfb/CMsgWriter.cxx +++ b/rfb/CMsgWriter.cxx @@ -76,8 +76,9 @@ void CMsgWriter::writeSetEncodings(int preferredEncoding, bool useCopyRect) } } encodings[nEncodings++] = pseudoEncodingLastRect; - // FIXME - encodings[nEncodings++] = pseudoEncodingQualityLevel9; + if (cp->qualityLevel >= 0 && cp->qualityLevel <= 9) + encodings[nEncodings++] = pseudoEncodingQualityLevel0 + cp->qualityLevel; + writeSetEncodings(nEncodings, encodings); } diff --git a/vncviewer/CViewOptions.cxx b/vncviewer/CViewOptions.cxx index 089c4c43..1740c191 100644 --- a/vncviewer/CViewOptions.cxx +++ b/vncviewer/CViewOptions.cxx @@ -83,6 +83,10 @@ static BoolParameter acceptBell("AcceptBell", static StringParameter monitor("Monitor", "The monitor to open the VNC Viewer window on, if available.", ""); static StringParameter menuKey("MenuKey", "The key which brings up the popup menu", "F8"); +static IntParameter qualityLevel("QualityLevel", + "JPEG quality level. " + "0 = Low, 9 = High", + 5); CViewOptions::CViewOptions() : useLocalCursor(::useLocalCursor), useDesktopResize(::useDesktopResize), @@ -90,7 +94,8 @@ autoSelect(::autoSelect), fullColour(::fullColour), fullScreen(::fullScreen), shared(::sharedConnection), sendPtrEvents(::sendPtrEvents), sendKeyEvents(::sendKeyEvents), preferredEncoding(encodingZRLE), clientCutText(::clientCutText), serverCutText(::serverCutText), protocol3_3(::protocol3_3), acceptBell(::acceptBell), lowColourLevel(::lowColourLevel), -pointerEventInterval(ptrEventInterval), emulate3(::emulate3), monitor(::monitor.getData()) +pointerEventInterval(ptrEventInterval), emulate3(::emulate3), monitor(::monitor.getData()), +qualityLevel(::qualityLevel) { CharArray encodingName(::preferredEncoding.getData()); preferredEncoding = encodingNum(encodingName.buf); @@ -190,6 +195,8 @@ void CViewOptions::readFromFile(const char* filename) { monitor.replaceBuf(value.takeBuf()); } else if (stricmp(name.buf, "MenuKey") == 0) { setMenuKey(value.buf); + } else if (stricmp(name.buf, "QualityLevel") == 0) { + qualityLevel = atoi(value.buf); // Legacy options } else if (stricmp(name.buf, "Preferred_Encoding") == 0) { @@ -274,6 +281,7 @@ void CViewOptions::writeToFile(const char* filename) { if (monitor.buf) fprintf(f, "Monitor=%s\n", monitor.buf); fprintf(f, "MenuKey=%s\n", CharArray(menuKeyName()).buf); + fprintf(f, "QualityLevel=%d\n", qualityLevel); fclose(f); f=0; setConfigFileName(filename); @@ -306,6 +314,7 @@ void CViewOptions::writeDefaults() { if (monitor.buf) key.setString(_T("Monitor"), TStr(monitor.buf)); key.setString(_T("MenuKey"), TCharArray(menuKeyName()).buf); + key.setInt(_T("QualityLevel"), qualityLevel); } @@ -360,5 +369,6 @@ CViewOptions& CViewOptions::operator=(const CViewOptions& o) { setHost(o.host.buf); setMonitor(o.monitor.buf); menuKey = o.menuKey; + qualityLevel = o.qualityLevel; return *this; -}
\ No newline at end of file +} diff --git a/vncviewer/CViewOptions.h b/vncviewer/CViewOptions.h index 9120bde2..31e4eada 100644 --- a/vncviewer/CViewOptions.h +++ b/vncviewer/CViewOptions.h @@ -77,6 +77,7 @@ namespace rfb { unsigned int menuKey; void setMenuKey(const char* keyName); char* menuKeyName(); + int qualityLevel; }; diff --git a/vncviewer_unix/CConn.cxx b/vncviewer_unix/CConn.cxx index 0b6431bb..7229cc3e 100644 --- a/vncviewer_unix/CConn.cxx +++ b/vncviewer_unix/CConn.cxx @@ -74,6 +74,7 @@ CConn::CConn(Display* dpy_, int argc_, char** argv_, network::Socket* sock_, } cp.supportsDesktopResize = true; cp.supportsLocalCursor = useLocalCursor; + cp.qualityLevel = qualityLevel; initMenu(); if (sock) { diff --git a/vncviewer_unix/parameters.h b/vncviewer_unix/parameters.h index 815f5f12..41eb5293 100644 --- a/vncviewer_unix/parameters.h +++ b/vncviewer_unix/parameters.h @@ -37,6 +37,7 @@ extern rfb::BoolParameter sendClipboard; extern rfb::BoolParameter sendPrimary; extern rfb::BoolParameter fullScreen; extern rfb::StringParameter geometry; +extern rfb::IntParameter qualityLevel; extern char aboutText[]; extern char* programName; diff --git a/vncviewer_unix/vncviewer.cxx b/vncviewer_unix/vncviewer.cxx index 7b9e37d2..431aee44 100644 --- a/vncviewer_unix/vncviewer.cxx +++ b/vncviewer_unix/vncviewer.cxx @@ -93,6 +93,11 @@ BoolParameter listenMode("listen", "Listen for connections from VNC servers", StringParameter geometry("geometry", "X geometry specification", ""); StringParameter displayname("display", "The X display", ""); +IntParameter qualityLevel("QualityLevel", + "JPEG quality level. " + "0 = Low, 9 = High", + 5); + char aboutText[256]; char* programName; extern char buildtime[]; |