diff options
author | enikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2008-12-24 05:14:30 +0000 |
---|---|---|
committer | enikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2008-12-24 05:14:30 +0000 |
commit | 6558a301b1121bb640032b2ee7f29526a78fb800 (patch) | |
tree | 69fac1d6f68234c588fdee8bc1ff7411f2e46565 /java/src/com/tightvnc | |
parent | 8beb77813825407454bc62877e882e5b0bd18ddb (diff) | |
download | tigervnc-6558a301b1121bb640032b2ee7f29526a78fb800.tar.gz tigervnc-6558a301b1121bb640032b2ee7f29526a78fb800.zip |
[Developement, debug] Added Encodings constants to decoders classes. Temporary disable session recording when using Zlib decoder.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3453 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/src/com/tightvnc')
-rw-r--r-- | java/src/com/tightvnc/decoder/CoRREDecoder.java | 2 | ||||
-rw-r--r-- | java/src/com/tightvnc/decoder/HextileDecoder.java | 2 | ||||
-rw-r--r-- | java/src/com/tightvnc/decoder/RREDecoder.java | 2 | ||||
-rw-r--r-- | java/src/com/tightvnc/decoder/RawDecoder.java | 1 | ||||
-rw-r--r-- | java/src/com/tightvnc/decoder/TightDecoder.java | 2 | ||||
-rw-r--r-- | java/src/com/tightvnc/decoder/ZRLEDecoder.java | 2 | ||||
-rw-r--r-- | java/src/com/tightvnc/decoder/ZlibDecoder.java | 28 |
7 files changed, 28 insertions, 11 deletions
diff --git a/java/src/com/tightvnc/decoder/CoRREDecoder.java b/java/src/com/tightvnc/decoder/CoRREDecoder.java index 3ab437af..3947d157 100644 --- a/java/src/com/tightvnc/decoder/CoRREDecoder.java +++ b/java/src/com/tightvnc/decoder/CoRREDecoder.java @@ -11,6 +11,8 @@ import java.io.IOException; public class CoRREDecoder extends RawDecoder { + final static int EncodingCoRRE = 4; + public CoRREDecoder(Graphics g, RfbInputStream is) { super(g, is); } diff --git a/java/src/com/tightvnc/decoder/HextileDecoder.java b/java/src/com/tightvnc/decoder/HextileDecoder.java index 1e4ef093..9c053095 100644 --- a/java/src/com/tightvnc/decoder/HextileDecoder.java +++ b/java/src/com/tightvnc/decoder/HextileDecoder.java @@ -12,6 +12,8 @@ import java.io.IOException; public class HextileDecoder extends RawDecoder { + final static int EncodingHextile = 5; + // Contstants used in the Hextile decoder final static int HextileRaw = 1, diff --git a/java/src/com/tightvnc/decoder/RREDecoder.java b/java/src/com/tightvnc/decoder/RREDecoder.java index 72a5fdfb..e2b5feb2 100644 --- a/java/src/com/tightvnc/decoder/RREDecoder.java +++ b/java/src/com/tightvnc/decoder/RREDecoder.java @@ -13,6 +13,8 @@ import java.io.IOException; public class RREDecoder extends RawDecoder { + final static int EncodingRRE = 2; + public RREDecoder(Graphics g, RfbInputStream is) { super(g, is); } diff --git a/java/src/com/tightvnc/decoder/RawDecoder.java b/java/src/com/tightvnc/decoder/RawDecoder.java index 79cf8896..9025e9ef 100644 --- a/java/src/com/tightvnc/decoder/RawDecoder.java +++ b/java/src/com/tightvnc/decoder/RawDecoder.java @@ -18,6 +18,7 @@ import java.awt.Toolkit; // public class RawDecoder { + final static int EncodingRaw = 0; public RawDecoder(Graphics g, RfbInputStream is) { setGraphics(g); diff --git a/java/src/com/tightvnc/decoder/TightDecoder.java b/java/src/com/tightvnc/decoder/TightDecoder.java index e9038205..c4ce226a 100644 --- a/java/src/com/tightvnc/decoder/TightDecoder.java +++ b/java/src/com/tightvnc/decoder/TightDecoder.java @@ -16,6 +16,8 @@ import java.util.zip.Inflater; public class TightDecoder extends RawDecoder implements ImageObserver { + final static int EncodingTight = 7; + // // Tight decoder constants // diff --git a/java/src/com/tightvnc/decoder/ZRLEDecoder.java b/java/src/com/tightvnc/decoder/ZRLEDecoder.java index ba4071ce..91f7c161 100644 --- a/java/src/com/tightvnc/decoder/ZRLEDecoder.java +++ b/java/src/com/tightvnc/decoder/ZRLEDecoder.java @@ -16,6 +16,8 @@ import java.io.IOException; public class ZRLEDecoder extends RawDecoder { + final static int EncodingZRLE = 16; + public ZRLEDecoder(Graphics g, RfbInputStream is) { super(g, is); } diff --git a/java/src/com/tightvnc/decoder/ZlibDecoder.java b/java/src/com/tightvnc/decoder/ZlibDecoder.java index 8a471a24..9a167b11 100644 --- a/java/src/com/tightvnc/decoder/ZlibDecoder.java +++ b/java/src/com/tightvnc/decoder/ZlibDecoder.java @@ -12,6 +12,8 @@ import java.util.zip.Inflater; public class ZlibDecoder extends RawDecoder { + final static int EncodingZlib = 6; + public ZlibDecoder(Graphics g, RfbInputStream is) { super(g, is); } @@ -37,13 +39,15 @@ public class ZlibDecoder extends RawDecoder { rfbis.readFully(zlibBuf, 0, nBytes); // - // Save decoded data to RecordInterface + // FIXME: Now we think that isRecordFromBeggining + // always returns false and this part of code will be never + // executed. // - if (rec.canWrite() && rec.isRecordFromBeginning()) { - rec.writeIntBE(nBytes); - rec.write(zlibBuf, 0, nBytes); - } + //if (rec.canWrite() && rec.isRecordFromBeginning()) { + // rec.writeIntBE(nBytes); + // rec.write(zlibBuf, 0, nBytes); + //} if (zlibInflater == null) { zlibInflater = new Inflater(); @@ -56,11 +60,12 @@ public class ZlibDecoder extends RawDecoder { zlibInflater.inflate(pixels8, dy * framebufferWidth + x, w); // - // Save decoded data to RecordInterface + // Save decoded data to data output stream // - if (rec.canWrite() && !rec.isRecordFromBeginning()) - rec.write(pixels8, dy * framebufferWidth + x, w); + //if (rec.canWrite() && !rec.isRecordFromBeginning()) + //if (dos != null) + // dos.write(pixels8, dy * framebufferWidth + x, w); } } else { byte[] buf = new byte[w * 4]; @@ -76,11 +81,12 @@ public class ZlibDecoder extends RawDecoder { } // - // Save decoded data to RecordInterface + // Save decoded data to data output stream // - if (rec.canWrite() && !rec.isRecordFromBeginning()) - rec.write(buf); + //if (rec.canWrite() && !rec.isRecordFromBeginning()) + //if (dos != null) + // dos.write(buf); } } } catch (DataFormatException ex) { |