MVallevand wrote:
> On Feb 12, 2008 6:20 PM, Denis Oliver Kropp <[EMAIL PROTECTED]> wrote:
>> Which driver are you using?
>
> The one installed in an embedded Syabas NMT
>
> Sorry this code is pretty rough, as I said I am just learning but I am
> hope you can make sense of it.
>
> {
> DFBCHECK(DirectFBInit( &argc, &argv ));
> DFBCHECK(DirectFBCreate( &dfb ));
> - dfb->SetCooperativeLevel(dfb, DFSCL_FULLSCREEN);
> DFBCHECK(dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ));
> DFBCHECK(layer->SetCooperativeLevel(layer, DLSCL_EXCLUSIVE));
You might wanna set the configuration, at least to set ARGB for transparency
over video (assuming an STB kind of device). Please run dfbinfo.
Maybe this is enough:
layer->SetOpacity( layer, 0 );
> - layer->GetConfiguration (layer, &layer_config);
> - memset( &dsc, 0, sizeof(DFBSurfaceDescription) );
> - dsc.flags = DSDESC_CAPS|DSDESC_WIDTH|DSDESC_HEIGHT;
> - dsc.width = layer_config.width;
> - dsc.height = layer_config.height;
> - dsc.caps = DSCAPS_PRIMARY;
>
> - DFBCHECK(dfb->CreateSurface(dfb, &dsc, &primary ));
Common mistake to use both primary surface and primary layer.
> + DFBCHECK(layer->GetSurface(layer, &primary));
>
> DFBCHECK(dfb->GetDisplayLayer( dfb, 1, &layer1 ));
> DFBCHECK(layer1->SetCooperativeLevel(layer1, DLSCL_EXCLUSIVE));
You might wanna set the configuration, at least to set UYVY.
> DFBCHECK(layer1->GetSurface(layer1, &second));
>
> - memset( &dsc, 0, sizeof(DFBSurfaceDescription) );
> layer1->GetConfiguration (layer1, &layer_config);
> - dsc.flags = DSDESC_CAPS|DSDESC_PIXELFORMAT|DSDESC_WIDTH|DSDESC_HEIGHT;
>
> - dsc.width = layer_config.width;
> - dsc.height = layer_config.height;
> - dsc.caps = DSCAPS_NONE;
> - dsc.pixelformat = DSPF_UYVY;
>
> - DFBCHECK(dfb->CreateSurface(dfb, &dsc, &second ));
Not needed.
Just work with primary and second layer surface.
--
Best regards,
Denis Oliver Kropp
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users