DmitriyDogaev / android-screenshot-library

Automatically exported from code.google.com/p/android-screenshot-library
0 stars 0 forks source link

asl 1.2 bug fix - black screen bug #14

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
Where are we supposed to apply this patch? Which lines? Can't you make a proper 
patch file?

Original comment by ziritr...@gmail.com on 21 May 2012 at 5:23

GoogleCodeExporter commented 8 years ago
Hi All,

The Link below will solve your Black Screen Bug!!!
http://code.google.com/p/android-screenshot-library/source/detail?r=a3aa9eea3133
1d6eaae1de6c99e2f6accef79f01

Try it!!! It solved mine!!!

Pravin Dodia
Rultech Solutions Private Limited.....

Original comment by pravindo...@gmail.com on 30 May 2012 at 11:44

GoogleCodeExporter commented 8 years ago
in latest ver asl this bug is'nt fixed.
this code:
>>
1.nativ code bug fix
2. Service bug fix
>>
absent in the latest version
Can't you make commit this code in dev_branch?

Original comment by savex...@gmail.com on 20 Jul 2012 at 6:48