2008-01-14

Look - it moves

Today is ugly-hack day. BADGE has a nice feature that has no real counter-part in the Qtopia API. This means that I have to dynamically cast the painter engine for a given widget and provide some additional methods in the BADGE version.

The feature of the day is to integrate a live video stream with the Qtopia interface. BADGE supports video through “blue screening”. This means that a given colour is replaced by the video stream. The video itself can be translated and scaled, making it possible to have BADGE put video in a moveable, resizable window – but let’s not get carried away.


Using just a few lines of code, we can get a video stream into the user interface. All is handled by the BADGE hardware – remember that our CPU is running at 180 MHz and uses a 60 MHz bus to access the BADGE GPU so we cannot handle it through it. The video below shows the video running together with Qwt. The video quality isn’t really HDTV – I only had a mobile phone to film with, but it shows the principle.



So, it seems that it is fully possible to accelerate Qtopia using BADGE. Actually, it was easier than I first expected. However, it is far from possible to accelerate everything – at least with a reasonable effort. IMHO it seems more efficient (man-hour-wise) to provide a clean acceleration driver and write one’s applications with care than to spend man-years creating an overly complex driver. Having discussed this work with Trolltech, it seems that Qtopia 4.4 will have even more accelerateable features – I’m looking forward to it :-)

2 Comments:

At 8:16 PM, Anonymous Anonymous said...

They use colour keying? What a bad design... What if a control uses that colour? Does the video appear in random places?

I imagine this could easily happen where you have gradients and for example in a colour picker dialog.

 
At 7:27 AM, Blogger Johan Thelin said...

Colour keying is really not that bad - the colour picking example is really the only situation where you cannot avoid problems (without disabling the video).

If you take the colour limitation into consideration when designing the user interface, it should not be a problem. I have not heard of any project failing because of colour keying issues.

 

Post a Comment

<< Home