[Spice-devel] androidSpice-0.1.4 released

Shuxiang Lim shohyanglim at gmail.com
Wed Apr 27 19:03:53 PDT 2011


On Wed, Apr 27, 2011 at 5:28 PM, Alon Levy <alevy at redhat.com> wrote:

> On Wed, Apr 27, 2011 at 04:54:55PM +0800, Shuxiang Lim wrote:
> > Yep,it's really nasty.
> >    But if I want to leverage FULL spice image ability,I have to:
> > 1.Fix the bugs of sigbus in quic.c on Android by rewriting the
> > pointer-type-cast into memcpy.etc..
> No idea what the problem is, is it a compile error? can you point to the
> lines/functions?
> I assume we are talking about common/quic.c?
>
> No,it will get SIGBUSes in runtime on android and cause process
killed,yes,I mean common/qui.c. It's not new to me for I have fixed the
SIGBUSes in generated-demarshaller.c,,etc. before. All of them are from the
pointer-typecast in C,them will be OK in x86,but not for ARM. So the quick
way to fix is to rewrite them by memcpy();

> > 2.Then,then,I got the processed image buffer in memory,BUT,HOW can I
> output
> > it??? AFAIK,android offer no image output API for C(at least <2.3), and
> Java
> > cannot access memory directly(am I right?). How can I do it besides
> sending
> > the image data as soon and little as possible to Java via Unix-sock?
> >  So, no matter how fast or colorful Spice is, it's choked by Android
> > framework and Java.
>
> what prevents you from rendering to a buffer and then giving that to java
> like
> you already do with the jpeg images? I confess not looking at the
> androidSpice code,
> so I'm not sure how exactly you do it, but the two options that come to
> mind are
> passing the jpeg buffer as is and letting java uncompress and display, or
> uncompressing
> and then passing the uncompressed buffer to java. If the later, then just
> let the
> existing rendering code do it's work on a memory buffer and then pass the
> results.
>
> >
> > Thus,if Java has the ability to maitain something like image buffer in
> > memory like C(can it??), this may be the most-efficeint way I can
> imagine:
> > implementing spice protocol and rewriting UI in Java,and leaving only(or
> > not) the image computing work to lib**.so via JNI.
>
> ok, so exactly what I outline above? but I'm not familiar with JNI or the
> android
> SDK.
>
> >   But that's beyond my current scope.
> >
> >  Any ideas to access the memory block of image buffer allocated by
> > C(libspicec.so) directly in Java,instantly and swiftly?
> >
>
> sorry, no idea.
>
> Anyway, I HAVE to utilize full power of SPICE rather than use only
JPEG,otherwise my porting is useless.I'm searching for the way for Java to
use the image buffer maintained by C.

Besides,the "Over mem limit" error in Java on AVDs is caused by the little
mem size of them,I will not try to do the optmstn at present.
Rgrds.

> > ...One more time I want to curse Android and disdain Java...
> > Best regards.
> >
> > On Wed, Apr 27, 2011 at 4:20 PM, Alon Levy <alevy at redhat.com> wrote:
> >
> > > On Wed, Apr 27, 2011 at 10:30:18AM +0800, Shuxiang Lim wrote:
> > > > Hi,all!
> > > >    Thanks for the trying/feedbacking and sorry for the nascent itches
> of
> > > the
> > > > project.
> > > >    As I've mentioned in the wiki page of this proj.,to use the
> > > androidSpice,
> > > > the server should be modified to force the use of JPEG
> compression,and
> > > qemu
> > > > should not use" -vga qxl" and should use "-usbdevice tablet"(check
> for
> > > the
> > > > reason in wikipage,maybe you can fix this),have you checked this?
> > >
> > > so you need to use a standard vga device and not the qxl right now?
> well,
> > > it's
> > > certainly a good start. But you do realize without the qxl device this
> is
> > > no more
> > > then a different vnc? i.e. it sends bitmaps only, using jpeg maybe, I
> > > wasn't aware
> > > we did that in this case, but no other operation (no copy / text / any
> > > other rop).
> > >
> > > >    If not forced to use JPEG,the quic algorithm in client will cause
> > > SIGBUS
> > > > and quit,if qxl is not disabled ,the Java UI will crash for it can
> handle
> > > > only SPICE_IMAGE_TYPE_JPEG=105 till now.
> > > >    And also,the app will cause "over memory limit" of Java in some
> > > machine
> > > > of android-2.2 and AVDs.
> > > >    I'm working to fix this,welcome to improve it!
> > > >    I'v uploaded the androidSpice.apk and androidSpice-debug.apk with
> the
> > > > latter's debug msg switched on(you can check the ANDROID LOG msg by
> #adb
> > > > logcat). I've also uploaded the red_worker.c for server modifying(If
> > > > needed,you can get the libspicec.so from the installed android
> program
> > > file
> > > > directory as /data/data/com.keqi*/lib/libspicec.so to use directly in
> the
> > > > Android proj.).
> > > >    Best Regards.
> > > > ---Lim---Lin--------林------
> > > >
> > > > On Wed, Apr 27, 2011 at 6:14 AM, Gianluca Cecchi
> > > > <gianluca.cecchi at gmail.com>wrote:
> > > >
> > > > > Hello,
> > > > > device is HTC Wildfire with android 2.2.1 and my guest is windows 7
> on
> > > > > F14+virt-preview repo.
> > > > > In /var/log/libvirt/qemu/guest.log after pressing connect button I
> get:
> > > > >
> > > > > reds_handle_main_link:
> > > > > reds_show_new_channel: channel 1:0, connected successfully, over
> Non
> > > Secure
> > > > > link
> > > > > reds_main_handle_message: net test: latency 22.151000 ms, bitrate
> > > > > 10769821 bps (10.270902 Mbps)
> > > > > reds_show_new_channel: channel 2:0, connected successfully, over
> Non
> > > Secure
> > > > > link
> > > > > red_dispatcher_set_peer:
> > > > > handle_dev_input: connect
> > > > > handle_new_display_channel: jpeg disabled
> > > > > handle_new_display_channel: zlib-over-glz disabled
> > > > > reds_show_new_channel: channel 3:0, connected successfully, over
> Non
> > > Secure
> > > > > link
> > > > > inputs_link:
> > > > >
> > > > > Then error message on android device (see jpeg)
> > > > > I select "force close" and I get in log file:
> > > > >
> > > > > red_receive: Connection reset by peer
> > > > > reds_disconnect:
> > > > > red_dispatcher_shutdown_cursor_peer:
> > > > > red_dispatcher_shutdown_peer:
> > > > > handle_dev_input: cursor disconnect
> > > > > handle_dev_input: disconnect
> > > > >
> > > > > Connection works from another f14 pc with spicy.
> > > > > Any information that I can give from the android device?
> > > > >
> > > > > Gianluca
> > > > >
> > > > > 2011/4/26 Mosebach  Kai <kai.mosebach at bsse.ethz.ch>:
> > > > > > Hey Lin,
> > > > > >
> > > > > > Just gave it a quick shot :
> > > > > >
> > > > > > - DNS resolving not working?
> > > > > > - access to server w/o password not supported?
> > > > > > - access w/ password produces a "force kill" after a vibration
> > > > > > - some traffic is seen on the spice-server side though
> > > > > >
> > > > > > (couldn’t connect therefore)
> > > > > >
> > > > > > Any logfiles I can provide?
> > > > > >
> > > > > > HW/SW : Android V2.2 on Samsung Galaxy Tab
> > > > > >
> > > > > > Cheers Kai
> > > > > >
> > > > > > On 4/26/11 9:43 AM, "Shuxiang Lim" <shohyanglim at gmail.com>
> wrote:
> > > > > >
> > > > > >>Released with src & .apk files with button-double-click fixed.
> > > > > >>--Lin--
> > > > > >>
> > > > > >>On 4/26/11, Shuxiang Lim <shohyanglim at gmail.com> wrote:
> > > > > >>> Hi,all!
> > > > > >>>   After I workaround the bug "input will choke output",I'm glad
> to
> > > > > >>> release the USABLE androidSpice-0.1.4 on google code:
> > > > > >>>
> > > > > >>> http://code.google.com/p/spice-client-android/
> > > > > >>>
> > > > > >>> You shall check the wiki page of it for the build/install/use
> of
> > > it.
> > > > > >>> Any use or improvement will be appreciated!
> > > > > >>> Best Regards.
> > > > > >>> ------Lin-----林----
> > > > > >>>
> > > > > >>_______________________________________________
> > > > > >>Spice-devel mailing list
> > > > > >>Spice-devel at lists.freedesktop.org
> > > > > >>http://lists.freedesktop.org/mailman/listinfo/spice-devel
> > > > > >
> > > > > > _______________________________________________
> > > > > > Spice-devel mailing list
> > > > > > Spice-devel at lists.freedesktop.org
> > > > > > http://lists.freedesktop.org/mailman/listinfo/spice-devel
> > > > > >
> > > > >
> > >
> > > > _______________________________________________
> > > > Spice-devel mailing list
> > > > Spice-devel at lists.freedesktop.org
> > > > http://lists.freedesktop.org/mailman/listinfo/spice-devel
> > >
> > >
>
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20110428/1f6eaa5b/attachment.html>


More information about the Spice-devel mailing list