|Site sponsored by IGEL|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[directfb-dev] Re: Video overlay questions
On Mon, Sep 01, 2003 at 01:41:43AM +0200, Andreas Robinson wrote: > Hi guys, > > I'm working on overlays, and a couple of problems have come up. Can someone > please straighten out some of the question marks for me? Thanks! > > /Andreas > > -------Question #1-------- > > Does the VESA fb-driver support the FBIO_WAITFORVSYNC ioctl? No. So you're doing a gfxdriver which claims to work on vesafb? You really need to add some specific card identification code to the gfxdriver so that the driver won't be enabled for all people using vesafb... > If not, i'm thinking of using code from waitretrace() in fbdev.c instead. > > Does this line of code wait for the VBI to happen, or wait until the VBI is > over? > > while (!(inb (0x3da) & 0x8)); It wait's until the vertical sync is active. Note that if you happen to call it while you're inside the vertical sync period it'll return immediately even if you're almost at the end of the period. That's why the code in fbdev.c first waits for the current vsync period to end. while ((inb (0x3da) & 0x8)) ; while (!(inb (0x3da) & 0x8)) ; > -------Problem #2-------- > > I'm running this test program from DFB examples v0.9.18: > > ./df_layer test.mpg > > test.mpg is a short mpeg2 stream I found here: > http://teco.emg.hu/tdmpeg120.mpv > (Website: http://www.tecoltd.com/enctest/enctest.htm) > > First, the default buffer mode is set to DLBM_FRONTONLY (by my InitLayer > function in the driver) > Result: Works nicely, (although with lots of framedrops) > > Then, the default buffer mode is changed to DLBM_BACKVIDEO, and the driver > is recompiled. > Result: No video - the overlay is black. > > It turns out that df_layer doesn't call the layer's FlipBuffers function... > > So, what could be missing? You need to call videosurface->Flip(...) to make the flip happen. But really the default buffermode must be FRONTONLY. At least that's what all other layers do and it's what some apps expect. > -------Problem #3-------- > > The hardware supports a kind of alpha blending, where the video engine takes > the alpha channel in the graphics layer and uses it as the alpha channel for > the video overlay. For example, if the alpha in a graphics pixel is 255, the > video pixel on top of it is 100% opaque. If the alpha is 0, video is > transparent. > > Is there support for this in the framework? Not really. But then again it doesn't really need any specific support to work. > Could I use DLCAPS_ALPHACHANNEL > for example? It should probably have a new capability flag. The only problem is that there's no way to know which layer is the "master"... -- Ville Syrjälä email@example.com http://www.sci.fi/~syrjala/ -- Info: To unsubscribe send a mail to firstname.lastname@example.org with "unsubscribe directfb-dev" as subject.