Yes,my said spicec is the spicec-gtk because I changed to for it's safer than the C++ spicec.<br><br><div class="gmail_quote">On Wed, Mar 9, 2011 at 6:26 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, Mar 09, 2011 at 06:18:50PM +0800, Shuxiang Lim wrote:<br>
> Yep, I walked around this but to face more chored and nasty troubles in<br>
> porting Pulseaudio lib, time limited, so I decided to DISABLE the<br>
> audio(playback/record) channels first. Thus the porting of libspicec_glib.so<br>
> is finished(along with all its dependences) and androidVNCViewer(whose UI<br>
> will be peeled to become spicec's) proj. has been built:<br>
> *#file libspicec_glib.so *<br>
> libspicec_glib.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV),<br>
> dynamically linked, not stripped<br>
</div>> *#arm-eabi-readelf -d libspicec_glib.so *<br>
<br>
Cool.<br>
<br>
Just one thing - you keep saying spicec, the spicec is the name of the executable<br>
and package for the old-and-planned-to-be-phased-out-non-glib-client, so you are<br>
actually working with the spice-gtk repo now, right? git://<a href="http://gitorious.org/spice-gtk/spice-gtk.git" target="_blank">gitorious.org/spice-gtk/spice-gtk.git</a>?<br>
<div><div></div><div class="h5"><br>
> Dynamic section at offset 0x774a4 contains 27 entries:<br>
> Tag Type Name/Value<br>
> 0x00000001 (NEEDED) Shared library: [libc.so]<br>
> 0x00000001 (NEEDED) Shared library: [libm.so]<br>
> 0x00000001 (NEEDED) Shared library: [libpixman-1.so.0]<br>
> 0x00000001 (NEEDED) Shared library: [libssl.so.1.0.0]<br>
> 0x00000001 (NEEDED) Shared library:<br>
> [libcrypto.so.1.0.0]<br>
> 0x00000001 (NEEDED) Shared library: [libjpeg.so.62]<br>
> 0x00000001 (NEEDED) Shared library: [libz.so]<br>
> 0x00000001 (NEEDED) Shared library: [libglib-2.0.so.0]<br>
> 0x00000001 (NEEDED) Shared library: [libgio-2.0.so.0]<br>
> 0x00000001 (NEEDED) Shared library:<br>
> [libgobject-2.0.so.0]<br>
> 0x00000001 (NEEDED) Shared library:<br>
> [libgmodule-2.0.so.0]<br>
> 0x00000001 (NEEDED) Shared library:<br>
> [libgthread-2.0.so.0]<br>
> 0x00000010 (SYMBOLIC) 0x0<br>
> ....<br>
> Now comes the last adventure of Native interfaces exposing and UI building!<br>
> Regards.<br>
><br>
><br>
> On Wed, Mar 9, 2011 at 3:57 PM, Shuxiang Lim <<a href="mailto:shohyanglim@gmail.com">shohyanglim@gmail.com</a>> wrote:<br>
><br>
> > Well, I think I may try the "--with-coroutine=gthread" in spice-gtk<br>
> > configuring to walk around that...<br>
> ><br>
> ><br>
> > On Wed, Mar 9, 2011 at 11:10 AM, Shuxiang Lim <<a href="mailto:shohyanglim@gmail.com">shohyanglim@gmail.com</a>>wrote:<br>
> ><br>
> >> Hi,I need help!<br>
> >> Now I've managed to divided spicec-gtk into two parts libspicec.so(based<br>
> >> on libpixman.so,libglib-2.0.so...No relation to X11 at all) and spicec(based<br>
> >> on libspicec.so and libgtk.so...). And the glib2.0 porting to Android is<br>
> >> also completed. But I'm blocked in compiling libspicec onto Android at the<br>
> >> begining for the continuation.c uses the functions in <ucontext.h><br>
> >> :setcontext(),getcontext()..., which are some thread-related funcs as I<br>
> >> know,and, definitely unsuprisingly, Android libc doesn't have them! Is there<br>
> >> a way to drop or replace the use of such funcs? Or should I manually write<br>
> >> setcontext from scratch?<br>
> >> RGRDs.<br>
> >><br>
> >><br>
> >> On Mon, Mar 7, 2011 at 5:14 PM, Alon Levy <<a href="mailto:alevy@redhat.com">alevy@redhat.com</a>> wrote:<br>
> >><br>
> >>> On Mon, Mar 07, 2011 at 09:08:28AM +0800, Shuxiang Lim wrote:<br>
> >>> > Option 1: use spice-gtk with a gtk android backend<br>
> >>> > a) compiling gtk for it would be possible.<br>
> >>> > b) write a partial gtk backend, good enough for spice-gtk.<br>
> >>> > c) no changes to spice-gtk.<br>
> >>> > Yep,that's really a good hope,but it's another project(too huge and<br>
> >>> far<br>
> >>> > away for me now):<br>
> >>> > Project:"GTK for Android.". So now I can use only the Android SDK to<br>
> >>> finish<br>
> >>> > the UI(the new native UI APIs in NDK is not reliable in versions).<br>
> >>><br>
> >>> Yeah, I think you're right, I can't find anyone already working on this<br>
> >>> by<br>
> >>> simple web search. Maybe spice-gtk's non ui objects are dependent only on<br>
> >>> gobject / stuff that is easy to just drop in (ugly, but still more<br>
> >>> maintainable<br>
> >>> then basing your work on spicec, long term).<br>
> >>><br>
> >>> > And also you've referred that "spicec is already platform<br>
> >>> independent",<br>
> >>> > that's true to Linux and Windows,but not to Android,for such<br>
> >>> independence is<br>
> >>> > based on the C++ independence over the os which cannot stand through<br>
> >>> the<br>
> >>> > JAVA UIed android.So there is no way to just add a subdir ./android<br>
> >>> under<br>
> >>> > spice/client along with ./x11 and ./windows. It should be a combined<br>
> >>> proj.<br>
> >>> > of C/C++ and Java. (That's why I hate Android and yearn for<br>
> >>> Maemo/Meego.)<br>
> >>><br>
> >>> Definitely easier to port to Maemo :)<br>
> >>><br>
> >>> > Regards.<br>
> >>> ><br>
> >>> > On Fri, Mar 4, 2011 at 7:04 PM, Alon Levy <<a href="mailto:alevy@redhat.com">alevy@redhat.com</a>> wrote:<br>
> >>> ><br>
> >>> > > On Fri, Mar 04, 2011 at 06:21:19PM +0800, Shuxiang Lim wrote:<br>
> >>> > > > Hi, friends,<br>
> >>> > > > Thanks for your replies. It's definitely right till now I've<br>
> >>> been<br>
> >>> > > > working a tougher way compared to spice-gtk.And actually I've<br>
> >>> considered<br>
> >>> > > to<br>
> >>> > > > steer my way to the latter in fear of the troublesome and crippled<br>
> >>> C++<br>
> >>> > > > support in Android NDK:C is more "simple and safe" in Android than<br>
> >>> C++.<br>
> >>> > > > But,AFAIK,there is no gtk port for Android yet. And the biggest<br>
> >>> obstacle<br>
> >>> > > is<br>
> >>> > > > the framework of Android:in its design,all UI should be done in<br>
> >>> JAVA<br>
> >>> > > powered<br>
> >>> > > > by SKIA libs.Therefore the port of UI libs(GTK,etc) will be choked<br>
> >>> by the<br>
> >>> > > > I/O level because Android don't completely expose them at all!(I<br>
> >>> once<br>
> >>> > > > managed to port Xfbdev onto it,but that's not commercially<br>
> >>> practical at<br>
> >>> > > all,<br>
> >>> > > > it's just a geeky trick maybe,an app in Android SHOULD NOT do<br>
> >>> this.) Only<br>
> >>> > > > the algorithm/data computing-related C/C++ libs are welcomed to be<br>
> >>> the<br>
> >>> > > JNI<br>
> >>> > > > servants to JAVA UI apps in Android.<br>
> >>> > > > You see, in such aspect, there is not too much diff between the<br>
> >>> C++<br>
> >>> > > way<br>
> >>> > > > and gtk way in the porting of UI part.<br>
> >>> > ><br>
> >>> > > I'm going to try to prove that wrong by grepping hoping it makes<br>
> >>> sense, I<br>
> >>> > > never<br>
> >>> > > actually coded in gtk:<br>
> >>> > ><br>
> >>> > > $ git grep GObjectClass<br>
> >>> > > gtk/channel-cursor.c: GObjectClass *gobject_class =<br>
> >>> > > G_OBJECT_CLASS(klass);<br>
> >>> > > gtk/channel-display.c: GObjectClass *gobject_class =<br>
> >>> > > G_OBJECT_CLASS(klass);<br>
> >>> > > gtk/channel-inputs.c: GObjectClass *gobject_class =<br>
> >>> > > G_OBJECT_CLASS(klass);<br>
> >>> > > gtk/channel-main.c: GObjectClass *gobject_class =<br>
> >>> G_OBJECT_CLASS(klass);<br>
> >>> > > gtk/channel-playback.c: GObjectClass *gobject_class =<br>
> >>> > > G_OBJECT_CLASS(klass);<br>
> >>> > > gtk/channel-record.c: GObjectClass *gobject_class =<br>
> >>> > > G_OBJECT_CLASS(klass);<br>
> >>> > > gtk/spice-audio.h: GObjectClass parent_class;<br>
> >>> > > gtk/spice-channel.c: GObjectClass *gobject_class = G_OBJECT_CLASS<br>
> >>> > > (klass);<br>
> >>> > > gtk/spice-channel.h: GObjectClass parent_class;<br>
> >>> > > gtk/spice-gstaudio.c: GObjectClass *gobject_class =<br>
> >>> > > G_OBJECT_CLASS(klass);<br>
> >>> > > gtk/spice-pulse.c: GObjectClass *gobject_class =<br>
> >>> G_OBJECT_CLASS(klass);<br>
> >>> > > gtk/spice-session.c: GObjectClass *gobject_class =<br>
> >>> > > G_OBJECT_CLASS(klass);<br>
> >>> > > gtk/spice-session.h: GObjectClass parent_class;<br>
> >>> > > gtk/spice-widget.c: GObjectClass *gobject_class =<br>
> >>> G_OBJECT_CLASS(klass);<br>
> >>> > ><br>
> >>> > > otoh:<br>
> >>> > > U playa:spice-gtk alon (master)$ git grep --name-only GdkWindow<br>
> >>> > > gtk/spice-widget-cairo.c<br>
> >>> > > gtk/spice-widget.c<br>
> >>> > ><br>
> >>> > > (if you grep Window you get false negatives because of the<br>
> >>> compression<br>
> >>> > > window).<br>
> >>> > ><br>
> >>> > > Anyway, this is a lame attempt to prove the gtk stuff that does ui<br>
> >>> (read:<br>
> >>> > > uses X)<br>
> >>> > > is separated in the code/architecture level :)<br>
> >>> > ><br>
> >>> > > > So for me the shining light of spicec-gtk is not in "GTK" but in<br>
> >>> "C".<br>
> >>> > > I<br>
> >>> > > > dare not to say I'm clear about every nook in spicec at all. My<br>
> >>> best hope<br>
> >>> > > is<br>
> >>> > > > that the IO in spicec shall be straight and succinct ,the inner<br>
> >>> > > > graphic/sound computing(decompress,etc) shall have NO relation with<br>
> >>> upper<br>
> >>> > > UI<br>
> >>> > > > libs at all, so I can pipe the Finished image flow into UI through<br>
> >>> JNI<br>
> >>> > > > interfaces and direct the user input backward. (That's why I can<br>
> >>> borrow<br>
> >>> > > the<br>
> >>> > > > UI from AndroidVNCViewer)<br>
> >>> > ><br>
> >>> > > Yeah, I think it is generally so, but again, it's so in spice-gtk<br>
> >>> too, and<br>
> >>> > > that's<br>
> >>> > > our only future supported client (*).<br>
> >>> > ><br>
> >>> > > (*) plans do change.<br>
> >>> > > ><br>
> >>> > > > libspicec.so(do most jobs)<br>
> >>> > > > <==finishedimages/audio>>===<<inputs==>spicec.java.ui(only UI)<br>
> >>> > > ><br>
> >>> > > > Am I right? Is there any design that will frustrate this in spicec<br>
> >>> or<br>
> >>> > > > spice-gtk?<br>
> >>> > ><br>
> >>> > > spicec is already separated at the platform level, since it uses low<br>
> >>> level<br>
> >>> > > libraries directly, unlike spice-gtk (X and GDI). So you would<br>
> >>> basically<br>
> >>> > > be adding a platform/android.<br>
> >>> > ><br>
> >>> > > In gtk I really haven't done android development, ever, at least not<br>
> >>> in the<br>
> >>> > > C level, but I was hoping:<br>
> >>> > > Option 1: use spice-gtk with a gtk android backend<br>
> >>> > > a) compiling gtk for it would be possible.<br>
> >>> > > b) write a partial gtk backend, good enough for spice-gtk.<br>
> >>> > > c) no changes to spice-gtk.<br>
> >>> > ><br>
> >>> > > Option 2 is of course to make spice-gtk also have platform<br>
> >>> separation,<br>
> >>> > > while<br>
> >>> > > still using gtk/gobject for all stuff that would Just Work when doing<br>
> >>> 1.a<br>
> >>> > > (the<br>
> >>> > > data structures, the signals, the macros, the introspection?).<br>
> >>> > ><br>
> >>> > > > Regards.<br>
> >>> > > ><br>
> >>> > > ><br>
> >>> > > > On Fri, Mar 4, 2011 at 4:36 PM, Alon Levy <<a href="mailto:alevy@redhat.com">alevy@redhat.com</a>><br>
> >>> wrote:<br>
> >>> > > ><br>
> >>> > > > > On Fri, Mar 04, 2011 at 03:38:51PM +0800, Shuxiang Lim wrote:<br>
> >>> > > > > > Hi all,<br>
> >>> > > > > > I'm trying these days to port spicec into Android.But it's a<br>
> >>> > > rather<br>
> >>> > > > > TOUGH<br>
> >>> > > > > > way to go because the structure of spicec and android are<br>
> >>> desperately<br>
> >>> > > > > > inappropriate:the linux version of spicec is based on the<br>
> >>> X11,which<br>
> >>> > > is<br>
> >>> > > > > not<br>
> >>> > > > > > available in Android,thus the UI of spicec should be rewritten<br>
> >>> from<br>
> >>> > > > > > scratch...More troublesome is that the UI part and data part in<br>
> >>> > > current<br>
> >>> > > > ><br>
> >>> > > > > Haven't looked at your proposal below yet, but did you check the<br>
> >>> > > spice-gtk<br>
> >>> > > > > work? maybe it is easier to start from that? are gtk libraries<br>
> >>> > > available on<br>
> >>> > > > > android? not talking about X. spice-gtk has objects for<br>
> >>> connection and<br>
> >>> > > > > channels<br>
> >>> > > > > that afaik don't do any output, that's separate from the actual<br>
> >>> widget<br>
> >>> > > that<br>
> >>> > > > > uses X. Also, gtk 3 has backends - did anyone do a backend for<br>
> >>> android?<br>
> >>> > > > ><br>
> >>> > > > > Since going forward we plan to ditch the spicec client, that<br>
> >>> would be<br>
> >>> > > > > really<br>
> >>> > > > > preffered. Now that I see what you have planned it sounds good,<br>
> >>> but<br>
> >>> > > better<br>
> >>> > > > > to use spice-gtk.<br>
> >>> > > > ><br>
> >>> > > > > of course that's not to say we won't love to see this working<br>
> >>> anyway :)<br>
> >>> > > > ><br>
> >>> > > > > > spicec is entangled in the hierarchical system in C++! So my<br>
> >>> plan is<br>
> >>> > > > > this:<br>
> >>> > > > > > first split the spicec into two parts,data and UI,transform the<br>
> >>> data<br>
> >>> > > part<br>
> >>> > > > > > into libspicec.so;then rewrite the UI part in JAVA. Besides, I<br>
> >>> should<br>
> >>> > > > > also<br>
> >>> > > > > > tinker some problems caused by the Crippled NDK C++ support and<br>
> >>> the<br>
> >>> > > Lamed<br>
> >>> > > > > > bionic c lib in android .<br>
> >>> > > > > > And now the first step is roughly done,hence the change of<br>
> >>> the<br>
> >>> > > spicec<br>
> >>> > > > > > structure:<br>
> >>> > > > > > From<br>
> >>> > > > > ><br>
> >>> > > |-->playback<br>
> >>> > > > > > thread<br>
> >>> > > > > ><br>
> >>> > > |-->cursor<br>
> >>> > > > > > thread<br>
> >>> > > > > > spicec:spicec process(application process)-->main<br>
> >>> thread->|-->*record<br>
> >>> > > > > thread<br>
> >>> > > > > > *<br>
> >>> > > > > ><br>
> >>> > > |-->inputs<br>
> >>> > > > > > thread<br>
> >>> > > > > ><br>
> >>> > > |-->display<br>
> >>> > > > > > thread<br>
> >>> > > > > > To:<br>
> >>> > > > > > ===========================><br>
> >>> > > > > > |-->libspicec.so:application<br>
> >>> thread-->main<br>
> >>> > > > > > thread------>|<br>
> >>> > > > > > |<br>
> >>> > > > > > |<br>
> >>> > > > > > | |<--display thread<--|<br>
> >>> > > > > > |<br>
> >>> > > > > > | |--->|<--cursor<br>
> >>> > > > > > thread<---|<------------------|<br>
> >>> > > > > > | | |<--inputs thread<---|<br>
> >>> > > > > > spicec:spicec process--->| | |<--playback thread<-|<br>
> >>> > > > > > | |<br>
> >>> > > > > > | |<br>
> >>> > > > > > | |<br>
> >>> > > > > > <---------------------------------------------|<br>
> >>> > > > > > |<br>
> >>> > > > > > |<br>
> >>> > > > > > |<br>
> >>> > > > > > |<br>
> >>> > > > > > |-->spicec:platform<br>
> >>> > > > > > thread------------------------------>|<br>
> >>> > > > > ><br>
> >>> > > > > > The hierarchical relationship has been unleashed with one<br>
> >>> > > thread(record<br>
> >>> > > > > > channel) deleted and two new threads (app and platform)<br>
> >>> created. The<br>
> >>> > > > > first<br>
> >>> > > > > > as the "data thread",the other as the "work thread" which is<br>
> >>> driven<br>
> >>> > > by<br>
> >>> > > > > the<br>
> >>> > > > > > signals from the first thread as well as its sub threads and<br>
> >>> > > requested to<br>
> >>> > > > > do<br>
> >>> > > > > > the UI-related work:<br>
> >>> > > > > ><br>
> >>> > > > > > platform thread:------------>blocked and waiting:-->job<br>
> >>> > > > > > request-<--------------|<br>
> >>> > > > > > | |<br>
> >>> > > > > > |<br>
> >>> > > > > > ^ |<br>
> >>> > > > > > |<br>
> >>> > > > > > |<br>
> >>> > > > > > | |<br>
> >>> > > > > > |<----------|-<-|<br>
> >>> > > > > > |<br>
> >>> > > > > > | |<br>
> >>> > > > > > |<br>
> >>> > > > > > platform thread over<----------if(job==die)<--| send<br>
> >>> req.<br>
> >>> > > blocked<br>
> >>> > > > > > and waiting<br>
> >>> > > > > > | ^ |<br>
> >>> > > > > > |<br>
> >>> > > > > > | | |<br>
> >>> > > > > > ^<br>
> >>> > > > > > | | |<br>
> >>> > > > > > _________|_________<br>
> >>> > > > > > | | |<br>
> >>> > > > > > | app/plbk/cusor<br>
> >>> > > > > > thd<br>
> >>> > > > > > |<---job done----dojob()<--else--| |<br>
> >>> |->go<br>
> >>> > > on->|<br>
> >>> > > > > > __________________<br>
> >>> > > > > > | |<br>
> >>> > > > > > |------------------------------->feed back-->|<br>
> >>> > > > > ><br>
> >>> > > > > ><br>
> >>> > > > > > So the next work is to expose the native JNI interface in<br>
> >>> platform<br>
> >>> > > thread<br>
> >>> > > > > to<br>
> >>> > > > > > the UI written in Android SDK. I try to use the UI<br>
> >>> > > > > > frame of AndroidVNCViewer in<br>
> >>> > > > > > <a href="http://code.google.com/p/*android*-*vnc*-viewer/,then" target="_blank">code.google.com/p/*android*-*vnc*-viewer/,then</a> the work of<br>
> >>> platform<br>
> >>> > > > > > thread will be replaced by UI but the msg<br>
> >>> > > > > > communication to libspicec will be remained. That's the easiest<br>
> >>> way I<br>
> >>> > > can<br>
> >>> > > > > > envisage except rewriting all parts in spicec from scratch.<br>
> >>> > > > > > It's tough too, for I have poor experiance in Java...<br>
> >>> > > > > > Anyway, is there any other guy working on this? Is my way<br>
> >>> > > > > feasible??Any<br>
> >>> > > > > > Ideas or help is appreciated.<br>
> >>> > > > ><br>
> >>> > > > > See above for ideas, don't read them as a criticism, I think this<br>
> >>> is<br>
> >>> > > > > fantastic<br>
> >>> > > > > what you've done so far. I remember someone posting "we are<br>
> >>> working on<br>
> >>> > > > > andriod<br>
> >>> > > > > in our spare time" post to spice-devel, please grep the archive.<br>
> >>> > > > ><br>
> >>> > > > > Alon<br>
> >>> > > > ><br>
> >>> > > > > > Best regards.<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>
> >>><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>