<br><br><div class="gmail_quote">On Wed, Apr 27, 2011 at 5:28 PM, Alon Levy <span dir="ltr"><<a href="mailto:alevy@redhat.com">alevy@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, Apr 27, 2011 at 04:54:55PM +0800, Shuxiang Lim wrote:<br>
> Yep,it's really nasty.<br>
> But if I want to leverage FULL spice image ability,I have to:<br>
> 1.Fix the bugs of sigbus in quic.c on Android by rewriting the<br>
> pointer-type-cast into memcpy.etc..<br>
</div>No idea what the problem is, is it a compile error? can you point to the lines/functions?<br>
I assume we are talking about common/quic.c?<br>
<div class="im"><br></div></blockquote><div>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(); <br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
> 2.Then,then,I got the processed image buffer in memory,BUT,HOW can I output<br>
> it??? AFAIK,android offer no image output API for C(at least <2.3), and Java<br>
> cannot access memory directly(am I right?). How can I do it besides sending<br>
> the image data as soon and little as possible to Java via Unix-sock?<br>
> So, no matter how fast or colorful Spice is, it's choked by Android<br>
> framework and Java.<br>
<br>
</div>what prevents you from rendering to a buffer and then giving that to java like<br>
you already do with the jpeg images? I confess not looking at the androidSpice code,<br>
so I'm not sure how exactly you do it, but the two options that come to mind are<br>
passing the jpeg buffer as is and letting java uncompress and display, or uncompressing<br>
and then passing the uncompressed buffer to java. If the later, then just let the<br>
existing rendering code do it's work on a memory buffer and then pass the results.<br>
<div class="im"><br>
><br>
> Thus,if Java has the ability to maitain something like image buffer in<br>
> memory like C(can it??), this may be the most-efficeint way I can imagine:<br>
> implementing spice protocol and rewriting UI in Java,and leaving only(or<br>
> not) the image computing work to lib**.so via JNI.<br>
<br>
</div>ok, so exactly what I outline above? but I'm not familiar with JNI or the android<br>
SDK.<br>
<div class="im"><br>
> But that's beyond my current scope.<br>
><br>
> Any ideas to access the memory block of image buffer allocated by<br>
> C(libspicec.so) directly in Java,instantly and swiftly?<br>
><br>
<br>
</div>sorry, no idea.<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div>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.<br>
<br>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.<br>Rgrds. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div class="h5">
> ...One more time I want to curse Android and disdain Java...<br>
> Best regards.<br>
><br>
> On Wed, Apr 27, 2011 at 4:20 PM, Alon Levy <<a href="mailto:alevy@redhat.com">alevy@redhat.com</a>> wrote:<br>
><br>
> > On Wed, Apr 27, 2011 at 10:30:18AM +0800, Shuxiang Lim wrote:<br>
> > > Hi,all!<br>
> > > Thanks for the trying/feedbacking and sorry for the nascent itches of<br>
> > the<br>
> > > project.<br>
> > > As I've mentioned in the wiki page of this proj.,to use the<br>
> > androidSpice,<br>
> > > the server should be modified to force the use of JPEG compression,and<br>
> > qemu<br>
> > > should not use" -vga qxl" and should use "-usbdevice tablet"(check for<br>
> > the<br>
> > > reason in wikipage,maybe you can fix this),have you checked this?<br>
> ><br>
> > so you need to use a standard vga device and not the qxl right now? well,<br>
> > it's<br>
> > certainly a good start. But you do realize without the qxl device this is<br>
> > no more<br>
> > then a different vnc? i.e. it sends bitmaps only, using jpeg maybe, I<br>
> > wasn't aware<br>
> > we did that in this case, but no other operation (no copy / text / any<br>
> > other rop).<br>
> ><br>
> > > If not forced to use JPEG,the quic algorithm in client will cause<br>
> > SIGBUS<br>
> > > and quit,if qxl is not disabled ,the Java UI will crash for it can handle<br>
> > > only SPICE_IMAGE_TYPE_JPEG=105 till now.<br>
> > > And also,the app will cause "over memory limit" of Java in some<br>
> > machine<br>
> > > of android-2.2 and AVDs.<br>
> > > I'm working to fix this,welcome to improve it!<br>
> > > I'v uploaded the androidSpice.apk and androidSpice-debug.apk with the<br>
> > > latter's debug msg switched on(you can check the ANDROID LOG msg by #adb<br>
> > > logcat). I've also uploaded the red_worker.c for server modifying(If<br>
> > > needed,you can get the libspicec.so from the installed android program<br>
> > file<br>
> > > directory as /data/data/com.keqi*/lib/libspicec.so to use directly in the<br>
> > > Android proj.).<br>
> > > Best Regards.<br>
> > > ---Lim---Lin--------林------<br>
> > ><br>
> > > On Wed, Apr 27, 2011 at 6:14 AM, Gianluca Cecchi<br>
> > > <<a href="mailto:gianluca.cecchi@gmail.com">gianluca.cecchi@gmail.com</a>>wrote:<br>
> > ><br>
> > > > Hello,<br>
> > > > device is HTC Wildfire with android 2.2.1 and my guest is windows 7 on<br>
> > > > F14+virt-preview repo.<br>
> > > > In /var/log/libvirt/qemu/guest.log after pressing connect button I get:<br>
> > > ><br>
> > > > reds_handle_main_link:<br>
> > > > reds_show_new_channel: channel 1:0, connected successfully, over Non<br>
> > Secure<br>
> > > > link<br>
> > > > reds_main_handle_message: net test: latency 22.151000 ms, bitrate<br>
> > > > 10769821 bps (10.270902 Mbps)<br>
> > > > reds_show_new_channel: channel 2:0, connected successfully, over Non<br>
> > Secure<br>
> > > > link<br>
> > > > red_dispatcher_set_peer:<br>
> > > > handle_dev_input: connect<br>
> > > > handle_new_display_channel: jpeg disabled<br>
> > > > handle_new_display_channel: zlib-over-glz disabled<br>
> > > > reds_show_new_channel: channel 3:0, connected successfully, over Non<br>
> > Secure<br>
> > > > link<br>
> > > > inputs_link:<br>
> > > ><br>
> > > > Then error message on android device (see jpeg)<br>
> > > > I select "force close" and I get in log file:<br>
> > > ><br>
> > > > red_receive: Connection reset by peer<br>
> > > > reds_disconnect:<br>
> > > > red_dispatcher_shutdown_cursor_peer:<br>
> > > > red_dispatcher_shutdown_peer:<br>
> > > > handle_dev_input: cursor disconnect<br>
> > > > handle_dev_input: disconnect<br>
> > > ><br>
> > > > Connection works from another f14 pc with spicy.<br>
> > > > Any information that I can give from the android device?<br>
> > > ><br>
> > > > Gianluca<br>
> > > ><br>
> > > > 2011/4/26 Mosebach Kai <<a href="mailto:kai.mosebach@bsse.ethz.ch">kai.mosebach@bsse.ethz.ch</a>>:<br>
> > > > > Hey Lin,<br>
> > > > ><br>
> > > > > Just gave it a quick shot :<br>
> > > > ><br>
> > > > > - DNS resolving not working?<br>
> > > > > - access to server w/o password not supported?<br>
> > > > > - access w/ password produces a "force kill" after a vibration<br>
> > > > > - some traffic is seen on the spice-server side though<br>
> > > > ><br>
> > > > > (couldn’t connect therefore)<br>
> > > > ><br>
> > > > > Any logfiles I can provide?<br>
> > > > ><br>
> > > > > HW/SW : Android V2.2 on Samsung Galaxy Tab<br>
> > > > ><br>
> > > > > Cheers Kai<br>
> > > > ><br>
> > > > > On 4/26/11 9:43 AM, "Shuxiang Lim" <<a href="mailto:shohyanglim@gmail.com">shohyanglim@gmail.com</a>> wrote:<br>
> > > > ><br>
> > > > >>Released with src & .apk files with button-double-click fixed.<br>
> > > > >>--Lin--<br>
> > > > >><br>
> > > > >>On 4/26/11, Shuxiang Lim <<a href="mailto:shohyanglim@gmail.com">shohyanglim@gmail.com</a>> wrote:<br>
> > > > >>> Hi,all!<br>
> > > > >>> After I workaround the bug "input will choke output",I'm glad to<br>
> > > > >>> release the USABLE androidSpice-0.1.4 on google code:<br>
> > > > >>><br>
> > > > >>> <a href="http://code.google.com/p/spice-client-android/" target="_blank">http://code.google.com/p/spice-client-android/</a><br>
> > > > >>><br>
> > > > >>> You shall check the wiki page of it for the build/install/use of<br>
> > it.<br>
> > > > >>> Any use or improvement will be appreciated!<br>
> > > > >>> Best Regards.<br>
> > > > >>> ------Lin-----林----<br>
> > > > >>><br>
> > > > >>_______________________________________________<br>
> > > > >>Spice-devel mailing list<br>
> > > > >><a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
> > > > >><a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
> > > > ><br>
> > > > > _______________________________________________<br>
> > > > > Spice-devel mailing list<br>
> > > > > <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
> > > > > <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
> > > > ><br>
> > > ><br>
> ><br>
> > > _______________________________________________<br>
> > > Spice-devel mailing list<br>
> > > <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
> > > <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
> ><br>
> ><br>
<br>
> _______________________________________________<br>
> Spice-devel mailing list<br>
> <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
<br>
</div></div></blockquote></div><br>