Sign up here and you can log into the forum!

DirectFB success

Have a question about devices internals, memory layout, reverse engineering, etc---This is the place for anything so technical that it would cause a n00b's head to 'splode

DirectFB success   

Postby macrule2001 » Thu Nov 11, 2010 3:24 pm

Since I initially kind of missed the switch to DirectFB and worked on nano-X instead, now here's something more useful. I got some DirectFB examples to work surprisingly easy on the 1.03 firmware.

For anyone interested, you have to compile DirectFB-1.0.0 and link your binaries against those libraries. This way there is no need to link explicitly against private WDTV links and also no problems with missing symbols. The executables work just fine when they load the original WDTV DirectFB libs at runtime.

To call any such executable you need to set some environment variables right. A call to dfbinfo for example looks like this:
Code: Select all
DFB_CONFIG_DIR=/etc CDROM_DEVICE_NAME=/dev/sr0 CDROM_MOUNT_POINT=/cdrom ENABLE_DEV_SUPPORT=1 ./dfbinfo


dmaosd must not be running at the time, and starting any DFB client (including dmaosd) multiple times will work only 2 or 3 times before you get an "Out of video memory!" error and have to reboot - seems WD doesn't care much about deallocating resources after use. That shouldn't matter for a replacement dmaosd though.

Also interesting: many video parameters (like PAL/NTSC etc.) are located in /etc/directfbrc and /etc/sigmadfbrc. dmaosd copies those files to /tmp (and uses DFB_CONFIG_DIR=/tmp), so it's perhaps easy for the HDMI hackers to influence the settings via that file.
macrule2001
Developer
 
Posts: 22
Joined: Mon Nov 08, 2010 4:56 pm

Re: DirectFB success   

Postby macrule2001 » Thu Nov 11, 2010 5:08 pm

And webkit just rendered the DirectFB homepage on my WDTV Live! :shock: :D It's still a bit flakey and some texts are missing (perhaps a font issue), and of course there is no way to navigate at all.

Me thinks it's time for a dmaosd replacement: UI based on HTML5 and JavaScript... 8-)
macrule2001
Developer
 
Posts: 22
Joined: Mon Nov 08, 2010 4:56 pm

Re: DirectFB success   

Postby b-rad.cc » Thu Nov 11, 2010 5:43 pm

i played around a lot with the direct fb samples when the 1.03 fw's first came out. It was wise for sigma to move everything to directfb. I oddly never thought about getting webkit to render on screen while I was playing around and ended up losing all my work as it was all in /tmp on my dev box...with so much else goin on never really went back to it, but my schedule is getting ready to be very free for a couple months and my plan is dig back into this and start working on some stuff :mrgreen: it's nice you've started something up. :geek:
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: DirectFB success   

Postby recliq » Fri Nov 12, 2010 6:17 am

woo :shock: i whished i had two or three weeks off for playing around with this...
not enough free time for all the things i want to do... :(
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5513
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Re: DirectFB success   

Postby opus_too_k » Wed Nov 24, 2010 9:08 am

I like the webkit idea as a dmaosd replacement. I have not played with webkit but wanted to see if I could get webkit also running on my wdtv-live. How did you build webkit for directfb? I saw this as a recommendation on another email list.


./build-webkit --gtk --with-font-backend=pango --with-target=directfb
opus_too_k
n00b
 
Posts: 1
Joined: Wed Nov 24, 2010 8:53 am

Re: DirectFB success   

Postby macrule2001 » Wed Nov 24, 2010 2:13 pm

I avoided gtk and all its ballast by using the Webkit-DFB clone available at directfb.org. I didn't have to change much in their config, but some bits here and there in the source. However they now have a newer version in a git repo, which hopefully works better. I couldn't try it yet

My version wasn't entirely stable, but I didn't have time yet to look deeper at the cause. Again, maybe their latest version works better if it's based on a more current Webkit version.

Perhaps you get better results with GTK. would be interesting to compare the two.

I hope we can write all the UI stuff in JavaScript and HTML/CSS. This will make it very easy for modders to design and test in any Webkit based browser. The actual control of others parts of the system can then be implemented as lightweight local web services that JS can call as it needs.
macrule2001
Developer
 
Posts: 22
Joined: Mon Nov 08, 2010 4:56 pm

Re: DirectFB success   

Postby Eugen1968 » Sat Jan 01, 2011 10:24 pm

@macrule2001
Any news?
Eugen1968
Donor
 
Posts: 40
Joined: Sun Apr 11, 2010 6:34 am

Re: DirectFB success   

Postby macrule2001 » Mon Jan 03, 2011 8:39 am

Nothing noteworthy I fear. I've only had time to start on this again before xmas.

So far I've been trying a couple different ways to build webkit. The currect DirectFB clone doesn't seem to work well enough - at least not with DFB 1.0.0 (which is what WDTV has). The demo window didn't scroll its contents, and there are crash issues whenever the DFB font interface got involved with truetype fonts. I blame that on the DFB libs distributed with the WDTV.

At the moment I'm playing with building webkit with gtk/directfb which worked, but crashes randomly. I'm not entirely sure if that is an issue with the cross-compilation or an inherent problem of webkit on the mipsel architecture (there are several bugs in their tracker to do with mipsel alignment issues). I'm also trying to get my head around scratchbox2 to rebuild the whole thing, hoping it's an easier/better cross-compilation experience.

If anyone wants to join in, I can share the bit of experience I have in building all the dependencies.
macrule2001
Developer
 
Posts: 22
Joined: Mon Nov 08, 2010 4:56 pm

Re: DirectFB success   

Postby macrule2001 » Wed Jan 05, 2011 11:10 am

Now that's better :D

Webkit with Gtk+ just wouldn't work reliably. I have a feeling it may be the cairo-directfb backend and/or alignment issues on mips, but that doesn't matter anymore.

What I did get to work is Qt-Embedded 4.7. It comes with its own Webkit component and I managed to run its example web browser in front of a playing movie. Most importantly, also the web page background can be set to transparent using CSS and lets the video shine through properly.

I think it's time to think about the architecture of the UI "web application". Everything WDTV-related should be abstracted in such a way, that the entire app can be run in any web browser for development/testing/modding. I guess it can easily be made to work on all such devices as long as a browser can be made to run.

I will post instructions on how to build it (and basically anything else) using scratchbox2 later in a new thread.
macrule2001
Developer
 
Posts: 22
Joined: Mon Nov 08, 2010 4:56 pm

Re: DirectFB success   

Postby RMerlin » Wed Jan 05, 2011 11:15 am

Interestingly, I saw references to QT in the recent WD GPL code.
WDLXTV Webend maintainer. Visit http://www.lostrealm.ca/wdlxtv to see my other WDLXTV projects.
If you like my work, please consider donating.
User avatar
RMerlin
WDLXTV Team
 
Posts: 3236
Joined: Sat Jun 26, 2010 9:25 am
Location: Montreal, Canada

Next

Return to WDTV Live

Who is online

Users browsing this forum: No registered users and 3 guests