What steps will reproduce the problem?
1.nativ code bug fix
main.c/handle_client_input():
/* content */
int length = pict.xres * pict.yres * pict.bps / 8;
int seek, len;
for(seek=0; seek<length; seek+=len) {
len = Send(cfd, &pict.buffer[seek], length-seek, 0);
if (len < 0)
return -1;
}
Log ("- Screenshot sent");
2. Service bug fix
ScreenshotService.java/retreiveRawScreenshot():
ByteBuffer bytes = ByteBuffer.allocate (ss.width * ss.height * ss.bpp / 8);
is = new BufferedInputStream(is); // buffering is very important apparently
int size, length=0, len;
size = ss.width * ss.height * ss.bpp / 8;
while((len=is.read(bytes.array(), length, size-length)) > 0)
length += len;
// is.read(bytes.array()); // reading all at once for speed
// Log.d("SERVICE", "Size=" + (ss.width * ss.height * ss.bpp / 8) + ",
Length=" + length);
bytes.position(0); // reset position to the beginning of ByteBuffer
ss.pixels = bytes;
3. native win32 build fix
native/make.bat
@ set ADB=D:\Android\sdk\platform-tools\adb.exe
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by net...@gmail.com on 17 Apr 2012 at 3:49
Original issue reported on code.google.com by
net...@gmail.com
on 17 Apr 2012 at 3:49