From 2c016ac2173be757c1d8b568f206b780761ec9b3 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Sun, 29 May 2022 18:34:49 -0500 Subject: [PATCH] create diff sending, Co-authored-by: sigonasr2 --- bin/SigShare.jar | Bin 8945 -> 10175 bytes src/sig/SigShare.java | 106 +++++++++++++++++++++++++++++++++----- src/sig/engine/Panel.java | 16 +++--- 3 files changed, 104 insertions(+), 18 deletions(-) diff --git a/bin/SigShare.jar b/bin/SigShare.jar index ad402b04459466ba21670402d37f3cade78e5a45..7ab39b3273033299001e79bcf042d8fdf14e3514 100644 GIT binary patch delta 7406 zcmY+JWmFVgx5r5(hVJf;AqA9>?(PN$hDLe_VW!%Oth4t%=hI&6xBeH(eYyZWO-w9uG#nfpG(c)H;1$NdRy~6qklJH}_8$l9 z-`Lm13HYDYa4d8Vs2T1%@?DB2sAyN#%9wl8icmjBy0Q{kq7t(pF)<5DD1}%1IJfJK!_O`&!r!j;Iy4H>)aT4!QegIsQ1UM^A7-pHBa zlrI*LyGy+NaXbBV+iRYG_fL^3no*nx!4bk-zTz2fPH1L4RFJ|_j2&V8`4=s@`xOeq z-PF4%CcZI>hl;OVDT*n__;}}+0RetvylIz_Rr#h5wyDs828Hdc-6k&qn-?ted!1>`_p={7{DZh^f(fDCZ~<(W43e6%n*sIBUb zcIMt_y?%=jN?~j2UGd=$Uhn7D(|J8u7sWfnLH_lUEgS3&1FwP)_u@v|;gM0ad)w&P zL`~Oi6n<`%@=1}3w3Mh<($ZfP8$QIY6r8yRVkKQ33KMJ$-u}8KGFu`F3e1filzvbf zN-}hpm$aP~~xUf{x>t5OLFRMK3 z#&9<3QOA>|ty;(N;(qIG(^~fGREzQF3O_Sv3htLL7+zY~83fYs^{i+d-3i!`3t44F z?;5@6*eQ4LE7@&~%piZz8JP%FwlnI<^RC6hriAKn4pcd;;+kp~i1sLaKJ$M-Z#cYT zvtdIdRTOc$jesbPIlI>n0jk@rXMhg78Bjn)OoO~o8 zORHyV39+DZkcp9zU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qa=*{s7 zI;sGO%A5_M+&N-QJqZZOjcm?qHbzFw#a~(av2GX{(=p=mPC6 zFo$Vuq`EJ#hv|bdLRe<%83L4VNQG-8Ps<`Gglj{wEmO%B-qN`DJ~DmoMadRE5NwuU z?26W8~Smcg6)mX;V0d<=eQoYa8tB*7^{9|UTd438a>+8 zMrYJ@d7f_lZE4C~E$0dO(r<PmX^jbVg25t=Iv{AelU)Cl5hnYN?p2rt$N`iXDJZ*#gnq?HwsfVEtt_8 z42kw+mo`NPzEVxu%uFG!R#RnSy`_6|Mwr$)_>}9WI@1*Q+e+yO4*|U#V>m1WKORN2!0keT&hV_}Zl?ezWKx zW3hJO?)H@_XxCamUU4K~ubOexrP@Fd+LQXm{7p#M5<(WnV!Y0)-KBn-#6hZ#Vc@L9eOE;&|-*Uq#a_?`X{(lBNTb4`g?~5PT zLqIEOb~@Mnzo_P4v`(5m%Ej^M@A!ZIM*kmaJRY7HFq@p4<1a;o`yn9eLAE|O`+rkX eLUls>@bU1d3Gnd#Kc$Q%JCmD-xZ=^@MgIk)@5}1| diff --git a/src/sig/SigShare.java b/src/sig/SigShare.java index 7a65ccf..e8b8d61 100644 --- a/src/sig/SigShare.java +++ b/src/sig/SigShare.java @@ -1,6 +1,8 @@ package sig; import java.io.BufferedReader; +import java.io.DataInputStream; +import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; @@ -13,9 +15,16 @@ import javax.swing.JFrame; import java.awt.Toolkit; import sig.engine.Panel; +import java.awt.AWTException; +import java.awt.GraphicsEnvironment; +import java.awt.image.BufferedImage; +import java.awt.Robot; + public class SigShare { + static Robot r; public static final String PROGRAM_NAME="SigShare"; - public static void main(String[] args) { + public static void main(String[] args) throws AWTException { + r = new Robot(); if (args.length==2&&args[1].equalsIgnoreCase("server")) { ServerSocket socket; try { @@ -25,16 +34,53 @@ public class SigShare { System.out.println("New client connection detected: "+client.toString()); System.out.println("Sending initial data..."); BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream(),"ISO-8859-1")); - OutputStream clientOutput = client.getOutputStream(); - int SCREEN_WIDTH=(int)Toolkit.getDefaultToolkit().getScreenSize().getWidth(); - int SCREEN_HEIGHT=(int)Toolkit.getDefaultToolkit().getScreenSize().getHeight(); - clientOutput.write(("DESKTOP "+(int)Toolkit.getDefaultToolkit().getScreenSize().getWidth()+" "+(int)Toolkit.getDefaultToolkit().getScreenSize().getHeight()+"\r\n").getBytes()); + DataOutputStream clientOutput = new DataOutputStream(client.getOutputStream()); + int SCREEN_WIDTH=(int)GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth(); + int SCREEN_HEIGHT=(int)GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight(); + int[] pixels = new int[SCREEN_WIDTH*SCREEN_HEIGHT]; + clientOutput.write(("DESKTOP "+SCREEN_WIDTH+" "+SCREEN_HEIGHT+"\r\n").getBytes()); System.out.println("Send initial screen"); + //char[] screen = new char[SCREEN_WIDTH*SCREEN_HEIGHT]; + BufferedImage screenshot = CaptureScreen(); for (int y=0;y>>16)/8; + int g = ((col&0x0000FF00)>>>8)/8; + int b = ((col&0x000000FF))/8; + char compressedCol=(char)((r<<10)+(g<<5)+b); + clientOutput.writeChar(compressedCol); + //screen[y*SCREEN_WIDTH+x]=compressedCol; } } + System.out.println("Begin diff monitoring..."); + int frame=0; + while (true) { + screenshot = CaptureScreen(); + for (int y=0;y>>8)+((y&0xF)<<4)); //bits 9-12 for x, bits 1-4 for y + b3=(byte)(y&0xFF0>>>4);//bits 5-12 for y + pixels[y*SCREEN_WIDTH+x]=col; + int r = ((col&0x00FF0000)>>>16)/8; + int g = ((col&0x0000FF00)>>>8)/8; + int b = ((col&0x000000FF))/8; + char compressedCol=(char)((r<<10)+(g<<5)+b); + clientOutput.writeChar(compressedCol); + clientOutput.writeByte(b1); + clientOutput.writeByte(b2); + clientOutput.writeByte(b3); + System.out.println(" Pixel ("+x+","+y+") "+b1+"/"+(b2&0xF)+"/"+(b2&0xF0)+"/"+b3+" sent"); + } + //screen[y*SCREEN_WIDTH+x]=compressedCol; + } + } + System.out.println("Frame "+frame+++" processed"); + } } catch (IOException e) { e.printStackTrace(); } @@ -45,7 +91,7 @@ public class SigShare { if (args.length==2&&args[1].equalsIgnoreCase("client")) { Socket socket; PrintWriter out; - BufferedReader in; + DataInputStream in; JFrame f = new JFrame(PROGRAM_NAME); Panel p = new Panel(f); @@ -53,25 +99,56 @@ public class SigShare { try { socket = new Socket(args[0],4191); out = new PrintWriter(socket.getOutputStream(),true); - in=new BufferedReader(new InputStreamReader(socket.getInputStream())); + in=new DataInputStream(socket.getInputStream()); while (true) { String line; - if (in.ready()) { + if (in.available()>0) { line=in.readLine(); //System.out.println(line); if (line.contains("DESKTOP")) { String[] split = line.split(Pattern.quote(" ")); - p.init(); + int SCREEN_WIDTH=Integer.parseInt(split[1]); + int SCREEN_HEIGHT=Integer.parseInt(split[2]); + p.init(SCREEN_WIDTH,SCREEN_HEIGHT); f.add(p); - f.setSize(Integer.parseInt(split[1]),Integer.parseInt(split[2])); + f.setSize(SCREEN_WIDTH,SCREEN_HEIGHT); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setVisible(true); - + + int expectedChars = SCREEN_WIDTH*SCREEN_HEIGHT; + System.out.println("Expecting "+(expectedChars)+" of data."); + int arrayIndex = 0; + while (expectedChars>0) { + if (in.available()>0) { + char col = in.readChar(); + int convert = ((((col&0b0111110000000000)>>>10)*8)<<16)+ + ((((col&0b0000001111100000)*8)>>>5)<<8)+ + ((((col&0b0000000000011111))*8)); + Panel.pixel[arrayIndex++]=convert; + //System.out.println("Received "+col+" / "+convert); + expectedChars--; + } + } p.render(); + System.out.println("Initial image processed!"); + int frame=0; + while (true) { + if (in.available()>0) { + char col = in.readChar(); + int convert = ((((col&0b0111110000000000)>>>10)*8)<<16)+ + ((((col&0b0000001111100000)*8)>>>5)<<8)+ + ((((col&0b0000000000011111))*8)); + int b1=in.readUnsignedByte(),b2=in.readUnsignedByte(),b3=in.readUnsignedByte(); + int x = b1+((b2&0xF)<<8); + int y = (b3<<4)+(b2&0xF0); + Panel.pixel[y*SCREEN_WIDTH+x]=convert; + System.out.println(" Pixel "+frame+++" ("+x+","+y+") "+b1+"/"+(b2&0xF)+"/"+(b2&0xF0)+"/"+b3+" processed"); + } + } } } } @@ -83,4 +160,9 @@ public class SigShare { return; } } + private static BufferedImage CaptureScreen() throws IOException { + BufferedImage screenshot = r.createScreenCapture(GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds()); + //ImageIO.write(screenshot,"png",new File("screenshot.png")); + return screenshot; + } } diff --git a/src/sig/engine/Panel.java b/src/sig/engine/Panel.java index caa9363..146c6d0 100644 --- a/src/sig/engine/Panel.java +++ b/src/sig/engine/Panel.java @@ -16,7 +16,9 @@ import sig.SigShare; public class Panel extends JPanel implements Runnable { JFrame window; - public int pixel[]; + public static int pixel[]; + int SCREEN_WIDTH=0; + int SCREEN_HEIGHT=0; final int CIRCLE_PRECISION=32; final int OUTLINE_COL=Color.BRIGHT_WHITE.getColor(); private Thread thread; @@ -51,16 +53,18 @@ public class Panel extends JPanel implements Runnable { /** * Call it after been visible and after resizes. */ - public void init(){ + public void init(int width,int height){ + this.SCREEN_WIDTH=width; + this.SCREEN_HEIGHT=height; cm = getCompatibleColorModel(); - int screenSize = getWidth() * getHeight(); + int screenSize = SCREEN_WIDTH * SCREEN_HEIGHT; if(pixel == null || pixel.length < screenSize){ pixel = new int[screenSize]; } if(thread.isInterrupted() || !thread.isAlive()){ thread.start(); } - mImageProducer = new MemoryImageSource(getWidth(), getHeight(), cm, pixel,0, getWidth()); + mImageProducer = new MemoryImageSource(SCREEN_WIDTH, SCREEN_HEIGHT, cm, pixel,0, SCREEN_WIDTH); mImageProducer.setAnimated(true); mImageProducer.setFullBufferUpdates(true); imageBuffer = Toolkit.getDefaultToolkit().createImage(mImageProducer); @@ -106,7 +110,7 @@ public class Panel extends JPanel implements Runnable { public void FillRect(int[] p,Color col,double x,double y,double w,double h) { for (int xx=0;xx=0) { Draw(p,index,col.getColor()); }