Quoting Colin Paton:
> Hi,
> 
> Thanks for your reply, and for looking into my problem. I'm afraid that I
> still can't get things to work :-(
> 
> I'm trying to get this going with the softmpeg plugin for VDR. As you
> guessed, I want to have an alpha blended OSD on top of the video. Video is
> currently playing back fine using the video overlay, and I'm trying to get
> the OSD code in softmpeg to work.

I just fixed a bug in font rendering for AiRGB destinations and the VDR OSD
now runs fast and correct using these two options in /etc/directfbrc:

pixelformat = AiRGB
no-translucent-windows

Which other options are you using?

These options won't be required after adding the correct logic to the VDR code.

> (I notice that the only way to get windows to display is to remove the call
> to dfb->SetCooperativeLevel(dfb, DFSCL_FULLSCREEN). When I do this the
> application starts up with a pointer and a light blue background.

That's correct. Using DFSCL_FULLSCREEN prevents any window stack updates.

> Previously, the video window did not show through this, but it appears to be
> doing so now! Strange.
> 
> (When you say that AiRGB is not accelerated - is this only blitting
> window->Primary surface, or does it mean that primary surface/video window
> blending is done in software as opposed to hardware?)

Only window->Primary is unaccelerated and made faster with
"no-translucent-windows".

>     videolayer->SetOpacity(videolayer,0xff);

This is currently not required.

>     /* Test the configuration, getting failed fields */
>     err = videolayer->TestConfiguration( videolayer, &dlc, &failed );
>     if (err)
>         DirectFBErrorFatal("Stream format not supported by overlay", err);

This can be removed, because the following call tests the configuration first.

>     err = videolayer->SetConfiguration( videolayer, &dlc );
>     if (err)
>         DirectFBErrorFatal( "videolayer->SetConfiguration failed", err );

[...]

>    DFBCHECK(videolayer->SetLevel(videolayer,1));

Remove that one and set DFB_CLE266_UNDERLAY environment variable instead.

> I then draw two rectangles on to the primary surface, one solid, and one
> alpha blended. It seems that an alpha channel of 0xff makes the full video
> window show through, and 0x00 makes the primary colour solid. This seems to
> occur regardless of whether I set the line 'dsc.pixelformat = DSPF_AiRGB or
> DSPF_RGB'

You probably forgot to add "DLCONF_PIXELFORMAT" to "dsc.flags".

Also, you have to set this pixel format for the primary layer,
but that's done if you use "pixelformat = AiRGB".

> void create_window_colin(void)
> {
>   DFBResult err;
>   DFBWindowDescription windowdesc;
>   IDirectFBWindow *osd;
>   IDirectFBSurface* surface;
> 
>   windowdesc.flags = (DFBWindowDescriptionFlags)(DWDESC_HEIGHT |
> DWDESC_WIDTH | DWDESC_POSX | DWDESC_POSY | DSDESC_PIXELFORMAT |
> DWDESC_CAPS);
> 
>   windowdesc.height = 300;
>   windowdesc.width = 400;
>   windowdesc.posx = 100;
>   windowdesc.posy = 200;
>   windowdesc.pixelformat = DSPF_AiRGB;
>   windowdesc.caps = DWCAPS_ALPHACHANNEL;
> 
>   DFBCHECK(primarylayer->CreateWindow(primarylayer, &windowdesc, &osd));
>   osd->SetOptions(osd, DWOP_NONE); // New test suggested by dok
>   osd->SetOpacity(osd, 0xff); // ff -> show window.
>    DFBCHECK(osd->GetSurface(osd, &surface));
> 
>   DFBCHECK(surface->SetColor(surface,0x00,0x00,0xff,0x7f));
>   DFBCHECK(surface->FillRectangle(surface,00,00,200,200));
>    DFBCHECK(surface->Flip(surface, 0, 0));

That should work if the other things are correct.

> What is worrying me is that, of course, tonight, video does appear to show
> through with the SetCooperativeLevel call removed, whereas at the weekend it
> didn't - just got the default blue background. To be fair, I'm not using
> exactly the same configuration - using my monitor and vesafb/cle266vgaio at
> the moment, wheras before I used viafb and the TV output.

Are you booting in 32 bit?

> If I set the window format to be DSPF_RGB32 I get a segmentation fault, the
> backtrace being
> Flipping_Thread()->dfb_window_repaint()->wind_of_change()->wind_of_change()-
> >update_region()->update_region()->update->region()->draw_background()->dfb_
> gfxcard_fillrectangle()->dfb_gfxcard_state_check().

Good to know.

> I also notice that a grep for AiRGB in gfxdrivers/cle266 shows nothing, but
> this might be a red herring.

That will change, but currently it's true.

-- 
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

                            Convergence GmbH


-- 
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with 
"unsubscribe directfb-dev" as subject.

Reply via email to