Mercurial > hg > Applications > tvnjviewer
changeset 17:61d95bdc2bdb
change Alice PUT API new Version
author | sugi |
---|---|
date | Sun, 02 Nov 2014 18:26:41 +0900 |
parents | cc9fdda7d22e |
children | 80b4d7efba08 |
files | src/main/java/com/glavsoft/rfb/encoding/EncodingType.java src/main/java/com/glavsoft/rfb/encoding/decoder/RichCursorDecoder.java src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java src/main/java/com/glavsoft/rfb/protocol/state/InitState.java src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java |
diffstat | 6 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/encoding/EncodingType.java Sat Oct 18 21:51:15 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/encoding/EncodingType.java Sun Nov 02 18:26:41 2014 +0900 @@ -55,6 +55,10 @@ TIGHT(7, "Tight"), //ZlibHex(8), /** + * ZRLEE Encoding is extends ZRLE. ZRLEE have flush(). + */ + ZRLEE(15, "ZRLEE"), + /** * ZRLE Encoding is like Hextile but previously all data compressed with zlib. */ ZRLE(16, "ZRLE"),
--- a/src/main/java/com/glavsoft/rfb/encoding/decoder/RichCursorDecoder.java Sat Oct 18 21:51:15 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/RichCursorDecoder.java Sun Nov 02 18:26:41 2014 +0900 @@ -64,7 +64,7 @@ message.setRectangle(rect); message.buf = buffer.clone(); message.bitmask = bitmask.clone(); - DataSegment.getLocal().put("aliceVNCMessage", message); + DataSegment.getLocal().put("aliceVNCMessage", message, null); sb = new StringBuilder(" "); for (int i=0; i<bitmask.length; ++i) {
--- a/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java Sat Oct 18 21:51:15 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java Sun Nov 02 18:26:41 2014 +0900 @@ -43,16 +43,16 @@ int length = rect.width * rect.height * renderer.getBytesPerPixel(); byte[] bytes = unzip(reader, zippedLength, length); int offset = zippedLength; - + AliceVNCMessage message = new AliceVNCMessage(); message.setRectangle(rect); message.buf = bytes.clone(); message.offset = offset; - DataSegment.getLocal().put("aliceVNCMessage", message); - setColorDataOnRenderer(renderer, rect, bytes, offset); + DataSegment.getLocal().put("aliceVNCMessage", message, null); + decode(renderer, rect, bytes, offset); } - public void setColorDataOnRenderer(Renderer renderer, + public void decode(Renderer renderer, FramebufferUpdateRectangle rect, byte[] bytes, int offset) throws TransportException { int maxX = rect.x + rect.width;
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Sat Oct 18 21:51:15 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Sun Nov 02 18:26:41 2014 +0900 @@ -183,7 +183,7 @@ AliceVNCMessage message = new AliceVNCMessage(); message.setRectangle(rect); message.setPixelFormat(context.getPixelFormat()); - DataSegment.getLocal().put("aliceVNCMessage", message); + DataSegment.getLocal().put("aliceVNCMessage", message, null); context.sendMessage(new FramebufferUpdateRequestMessage(0, 0, rect.width, rect.height, false)); // repaintController.repaintCursor();
--- a/src/main/java/com/glavsoft/rfb/protocol/state/InitState.java Sat Oct 18 21:51:15 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/state/InitState.java Sun Nov 02 18:26:41 2014 +0900 @@ -79,7 +79,7 @@ } protected void completeContextData(ServerInitMessage serverInitMessage) { - DataSegment.getLocal().put("ServerInitMessage", serverInitMessage); + DataSegment.getLocal().put("ServerInitMessage", serverInitMessage, null); context.setPixelFormat(serverInitMessage.getPixelFormat()); context.setFbWidth(serverInitMessage.getFrameBufferWidth()); context.setFbHeight(serverInitMessage.getFrameBufferHeight());
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Sat Oct 18 21:51:15 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Sun Nov 02 18:26:41 2014 +0900 @@ -806,7 +806,7 @@ JButton screenButton = buttonsBar.createButton("share", "Share my screen", new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - DataSegment.getLocal().put("Request", "Request"); + DataSegment.getLocal().put("Request", "Request", null); } }); kbdButtons.add(screenButton);