]> source.dussan.org Git - tigervnc.git/commitdiff
[Development] Disabling special video encoding when the VideoPriority parameter is...
authorConstantin Kaplinsky <const@tightvnc.com>
Thu, 18 Dec 2008 12:08:15 +0000 (12:08 +0000)
committerConstantin Kaplinsky <const@tightvnc.com>
Thu, 18 Dec 2008 12:08:15 +0000 (12:08 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3402 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/ServerCore.cxx
common/rfb/VNCSConnectionST.cxx

index 6606b14c40c681bb96d887c32ddf9c2be0ec02bd..4358617117505a51eb19fbd4057d8edf629e7945 100644 (file)
@@ -94,8 +94,7 @@ rfb::BoolParameter rfb::Server::queryConnect
  false);
 
 // TightVNC-specific parameters
-// FIXME: Disable special video handling when this parameter is 0.
 rfb::IntParameter rfb::Server::videoPriority
 ("VideoPriority",
- "Priority of sending updates for video area (0..8)",
+ "Priority of sending video updates (0..8)",
  2, 0, 8);
index 8c52bcbbd7d5346ad69f3abaeb3b338469264dc3..6bc1a91dc05a997d8e067ec421f00e2ad37bbd29 100644 (file)
@@ -565,6 +565,15 @@ void VNCSConnectionST::writeFramebufferUpdate()
     server->checkUpdate();
   }
 
+  // If VideoPriority is 0, convert video updates to normal updates.
+
+  if (rfb::Server::videoPriority == 0) {
+    // Region videoRegion(updates.getVideoArea());
+    // updates.add_changed(videoRegion);
+    Rect nullRect(0, 0, 0, 0);
+    updates.set_video_area(nullRect);
+  }
+
   // Get the lists of updates. Prior to exporting the data to the `ui' object,
   // getUpdateInfo() will normalize the `updates' object such way that its
   // `changed', `copied' and `video_area' regions would not intersect.