summaryrefslogtreecommitdiffstats
path: root/x11vnc/misc
diff options
context:
space:
mode:
authorrunge <runge>2009-03-07 22:30:43 +0000
committerrunge <runge>2009-03-07 22:30:43 +0000
commite7152a7f68063a86887a9059728ca26b5404ce51 (patch)
treef7ac5e878e0655840337f10946868231e10dd9ba /x11vnc/misc
parenteb1cc7608b91996199dae88663ee0d14d5d5b3f7 (diff)
downloadlibtdevnc-e7152a7f68063a86887a9059728ca26b5404ce51.tar.gz
libtdevnc-e7152a7f68063a86887a9059728ca26b5404ce51.zip
Allow range for X11VNC_SKIP_DISPLAY, document grab
Xserver issue. Add progress_client() to proceed more quickly thru handshake. Improvements to turbovnc hack.
Diffstat (limited to 'x11vnc/misc')
-rw-r--r--x11vnc/misc/turbovnc/Makefile.am2
-rw-r--r--x11vnc/misc/turbovnc/README5
-rwxr-xr-xx11vnc/misc/turbovnc/apply_turbovnc16
-rwxr-xr-xx11vnc/misc/turbovnc/convert13
-rwxr-xr-xx11vnc/misc/turbovnc/convert_rfbserver49
-rwxr-xr-xx11vnc/misc/turbovnc/undo_turbovnc7
6 files changed, 79 insertions, 13 deletions
diff --git a/x11vnc/misc/turbovnc/Makefile.am b/x11vnc/misc/turbovnc/Makefile.am
index 7b5dfb3..544eef3 100644
--- a/x11vnc/misc/turbovnc/Makefile.am
+++ b/x11vnc/misc/turbovnc/Makefile.am
@@ -1 +1 @@
-EXTRA_DIST=README apply_turbovnc convert tight.c turbojpeg.h undo_turbovnc
+EXTRA_DIST=README apply_turbovnc convert convert_rfbserver tight.c turbojpeg.h undo_turbovnc
diff --git a/x11vnc/misc/turbovnc/README b/x11vnc/misc/turbovnc/README
index b8e0ac9..cc7a417 100644
--- a/x11vnc/misc/turbovnc/README
+++ b/x11vnc/misc/turbovnc/README
@@ -4,6 +4,7 @@ INTRO:
This is a "patch" to make x11vnc/libvncserver work with TurboVNC:
http://www.virtualgl.org/About/TurboVNC
+ http://www.karlrunge.com/x11vnc/faq.html#faq-turbovnc
It is very experimental/kludgy. Not all TurboVNC features may be enabled.
We are currently evaluating whether TurboVNC support should be officially
@@ -122,7 +123,9 @@ Whereas if you see this:
28/02/2009 00:54:46 fast read: reset defer ms to: 10
28/02/2009 00:54:46 screen setup finished.
-that is very fast.
+that is very fast. In such a situation you may want to dial down
+x11vnc's delay, e.g.: -wait 5 -defer 5, or even smaller to push things
+out more quickly.
We have only seen it this fast on Linux by using the nvidia proprietary
graphics drivers. The Xorg drivers are typically slow 10 MB/sec.
diff --git a/x11vnc/misc/turbovnc/apply_turbovnc b/x11vnc/misc/turbovnc/apply_turbovnc
index 0a8ca7a..a601e52 100755
--- a/x11vnc/misc/turbovnc/apply_turbovnc
+++ b/x11vnc/misc/turbovnc/apply_turbovnc
@@ -16,18 +16,24 @@ if [ ! -f "$ldir/tight.c" ]; then
ls -l "$ldir/tight.c"
fail=1
fi
+if [ ! -f "$ldir/rfbserver.c" ]; then
+ ls -l "$ldir/rfbserver.c"
+ fail=1
+fi
if [ "X$fail" = "X1" ]; then
echo "Must be run from inside the directory containing 'apply_turbovnc'"
exit 1
fi
-if [ -f "$ldir/tight.c.ORIG" ]; then
- set -xv
-else
- set -xv
+set -x
+if [ ! -f "$ldir/tight.c.ORIG" ]; then
cp -p "$ldir/tight.c" "$ldir/tight.c.ORIG"
fi
+if [ ! -f "$ldir/rfbserver.c.ORIG" ]; then
+ cp -p "$ldir/rfbserver.c" "$ldir/rfbserver.c.ORIG"
+fi
perl ./convert ./tight.c > "$ldir/tight.c"
+perl ./convert_rfbserver $ldir/rfbserver.c.ORIG > "$ldir/rfbserver.c"
cp -p ./turbojpeg.h "$ldir"
-ls -l $ldir/tight.c* $ldir/turbojpeg.h
+ls -l $ldir/tight.c* $ldir/rfbserver.c* $ldir/turbojpeg.h
diff --git a/x11vnc/misc/turbovnc/convert b/x11vnc/misc/turbovnc/convert
index fdd0dbb..917bf3f 100755
--- a/x11vnc/misc/turbovnc/convert
+++ b/x11vnc/misc/turbovnc/convert
@@ -11,6 +11,7 @@ while (<>) {
#define xalloc malloc
#define xrealloc realloc
#define rfbTightNoZlib 0x0A
+#define tightSubsampLevel correMaxWidth
END
next;
}
@@ -22,11 +23,13 @@ END
$_ =~ s/\b\Q$func\E\b(\s*)\(/$func$1(cl, /;
}
}
- if (/^\s*subsampLevel\s*=\s*cl/) {
- $_ = "//$_";
- print "subsampLevel = 0;\n";
- }
- $_ =~ s/cl->tightQualityLevel;/cl->tightQualityLevel * 10;/;
+
+# if (/^\s*subsampLevel\s*=\s*cl/) {
+# $_ = "//$_";
+# print "subsampLevel = 0;\n";
+# }
+
+# $_ =~ s/cl->tightQualityLevel;/cl->tightQualityLevel * 10;/;
$_ =~ s/rfbScreen.pfbMemory/cl->scaledScreen->frameBuffer/g;
$_ =~ s/rfbScreen.paddedWidthInBytes/cl->scaledScreen->paddedWidthInBytes/g;
diff --git a/x11vnc/misc/turbovnc/convert_rfbserver b/x11vnc/misc/turbovnc/convert_rfbserver
new file mode 100755
index 0000000..135a1e9
--- /dev/null
+++ b/x11vnc/misc/turbovnc/convert_rfbserver
@@ -0,0 +1,49 @@
+#!/usr/bin/perl
+
+$saw_mark = 0;
+$done = 0;
+
+while (<>) {
+ if (! $saw_mark && /case rfbEncodingServerIdentity:/) {
+ $saw_mark = 1;
+ }
+ if ($saw_mark && !$done && /default:/) {
+ print;
+
+ print <<END;
+ /* for turbovnc */
+#define rfbJpegQualityLevel1 0xFFFFFE01
+#define rfbJpegQualityLevel100 0xFFFFFE64
+#define rfbJpegSubsamp1X 0xFFFFFD00
+#define rfbJpegSubsamp4X 0xFFFFFD01
+#define rfbJpegSubsamp2X 0xFFFFFD02
+#define rfbJpegSubsampGray 0xFFFFFD03
+
+ if ( enc >= (uint32_t)rfbJpegSubsamp1X &&
+ enc <= (uint32_t)rfbJpegSubsampGray ) {
+ /* XXX member really should be tightSubsample not correMaxWidth */
+ cl->correMaxWidth = enc & 0xFF;
+ rfbLog("Using JPEG subsampling %d for client %s\\n",
+ cl->correMaxWidth, cl->host);
+ } else if ( enc >= (uint32_t)rfbEncodingQualityLevel0 &&
+ enc <= (uint32_t)rfbEncodingQualityLevel9 ) {
+ static int JPEG_QUAL[10] = {
+ 5, 10, 15, 25, 37, 50, 60, 70, 75, 80
+ };
+ cl->tightQualityLevel = JPEG_QUAL[enc & 0x0F];
+ /* XXX member really should be tightSubsample not correMaxWidth */
+ cl->correMaxWidth = 2;
+ rfbLog("Using image level Subsample %d Quality %d for client %s\\n",
+ cl->correMaxWidth, cl->tightQualityLevel, cl->host);
+ } else if ( enc >= (uint32_t)rfbJpegQualityLevel1 &&
+ enc <= (uint32_t)rfbJpegQualityLevel100 ) {
+ cl->tightQualityLevel = enc & 0xFF;
+ rfbLog("Using image quality level %d for client %s\\n",
+ cl->tightQualityLevel, cl->host);
+ } else
+END
+ $done = 1;
+ next;
+ }
+ print;
+}
diff --git a/x11vnc/misc/turbovnc/undo_turbovnc b/x11vnc/misc/turbovnc/undo_turbovnc
index 7080680..ff79abf 100755
--- a/x11vnc/misc/turbovnc/undo_turbovnc
+++ b/x11vnc/misc/turbovnc/undo_turbovnc
@@ -6,8 +6,13 @@ if [ ! -f "$ldir/tight.c.ORIG" ]; then
ls -l "$ldir/tight.c.ORIG"
exit 1
fi
+if [ ! -f "$ldir/rfbserver.c.ORIG" ]; then
+ ls -l "$ldir/rfbserver.c.ORIG"
+ exit 1
+fi
set -xv
rm -f "$ldir/tight.c" "$ldir/turbojpeg.h"
mv "$ldir/tight.c.ORIG" "$ldir/tight.c"
-ls -l $ldir/tight.c*
+mv "$ldir/rfbserver.c.ORIG" "$ldir/rfbserver.c"
+ls -l $ldir/tight.c* $ldir/rfbserver.c*