Mercurial > hg > Applications > tvnjviewer
comparison src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java @ 29:7aee2a8dbe47
add Alice 1.1
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 29 Sep 2015 13:50:53 +0900 |
parents | f1dc728ffe87 |
children |
comparison
equal
deleted
inserted
replaced
28:e2de671a155d | 29:7aee2a8dbe47 |
---|---|
22 //------------------------------------------------------------------------- | 22 //------------------------------------------------------------------------- |
23 // | 23 // |
24 | 24 |
25 package com.glavsoft.rfb.protocol; | 25 package com.glavsoft.rfb.protocol; |
26 | 26 |
27 import alice.daemon.AliceDaemon; | |
27 import alice.datasegment.DataSegment; | 28 import alice.datasegment.DataSegment; |
28 import alice.datasegment.ReceiveData; | 29 import alice.datasegment.ReceiveData; |
29 | 30 |
30 import com.glavsoft.drawing.Renderer; | 31 import com.glavsoft.drawing.Renderer; |
31 import com.glavsoft.exceptions.CommonException; | 32 import com.glavsoft.exceptions.CommonException; |
65 private final DecodersContainer decoders; | 66 private final DecodersContainer decoders; |
66 private FramebufferUpdateRequestMessage fullscreenFbUpdateIncrementalRequest; | 67 private FramebufferUpdateRequestMessage fullscreenFbUpdateIncrementalRequest; |
67 private final ProtocolContext context; | 68 private final ProtocolContext context; |
68 private PixelFormat pixelFormat; | 69 private PixelFormat pixelFormat; |
69 private boolean needSendPixelFormat; | 70 private boolean needSendPixelFormat; |
71 | |
72 private AliceDaemon aliceDaemon = new AliceDaemon(); | |
70 | 73 |
71 public ReceiverTask(Reader reader, | 74 public ReceiverTask(Reader reader, |
72 IRepaintController repaintController, ClipboardController clipboardController, | 75 IRepaintController repaintController, ClipboardController clipboardController, |
73 DecodersContainer decoders, ProtocolContext context) { | 76 DecodersContainer decoders, ProtocolContext context) { |
74 this.reader = reader; | 77 this.reader = reader; |
184 } | 187 } |
185 DecodeInfomation message = new DecodeInfomation(); | 188 DecodeInfomation message = new DecodeInfomation(); |
186 message.setRectangle(rect); | 189 message.setRectangle(rect); |
187 message.setPixelFormat(context.getPixelFormat()); | 190 message.setPixelFormat(context.getPixelFormat()); |
188 | 191 |
189 ReceiveData rData = new ReceiveData("dummy", false, false); | 192 ReceiveData rData = new ReceiveData("dummy"); |
190 DataSegment.getLocal().put("pixelData", rData, null); | 193 aliceDaemon.dataSegment.getLocal().put("pixelData", rData, false); |
191 rData = new ReceiveData(message, false, false); | 194 rData = new ReceiveData(message); |
192 DataSegment.getLocal().put("updateRectangle", rData, null); | 195 aliceDaemon.dataSegment.getLocal().put("updateRectangle", rData, false); |
193 | 196 |
194 context.sendMessage(new FramebufferUpdateRequestMessage(0, 0, rect.width, rect.height, false)); | 197 context.sendMessage(new FramebufferUpdateRequestMessage(0, 0, rect.width, rect.height, false)); |
195 // repaintController.repaintCursor(); | 198 // repaintController.repaintCursor(); |
196 } else | 199 } else |
197 throw new CommonException("Unprocessed encoding: " + rect.toString()); | 200 throw new CommonException("Unprocessed encoding: " + rect.toString()); |