> PlayTo was never supposed to render to hidden or virtual surfaces.
>  
> Does it mean so far you always had a dummy surface allocated, wasting
> the memory that it required?
>  
> Display Layers have "Sources" which can be defined by the driver and
> usually just include one which is the default DLSID_SURFACE, but you
> can register a layer without this source, just providing two decoder
> sources for example.
>  
> The source can be selected with SetConfiguration() of the layer.
>  
> The question is with video providers, how to select the decoder to use
> or query the source to be selected at the layer?
>  
> And what to do with the PlayTo wanting a surface? Maybe add another method?

On STB810 (pnx8950 based) and STB225 DFB1.0 we used virtual surfaces.  
These had no associated memory  but reported sizes etc and this was done by 
using the allocate surface function for video layers:

dfb_surface_create_preallocated(core, config->width, config->height,
                                config->format, CSP_SYSTEMONLY,
                                Caps, NULL, NULL, NULL, 0, 0, ret_surface);

This AFAIK meant we had a surface but no memory attached.

This allowed us to call GetSurface on a VideoLayer and then we used the surface 
handle 
to look up what video layer we really meant and make sure our decoder output to 
that layer.
Also solved issues where our HW always has layer 0 = video.  Whereas DFB has 
Primary FB layer as 0

I am now trying to move to DFB1.2 and did not like V1 of my DFB1.0 driver as it 
relied on FBDev system.
So I used your rather nice davinci driver as a basis.  
This also will make it Open and more supportable in the future.

However I now want to handle virtual surfaces and this is a difference to the 
davinci.

I am happy passing a NULL surface to PlayTo but I have no way of getting the 
Source etc as you indicated above.  This means I have
no easy way of specifiying which of the 2 video layers I am rendering to.  I 
could hack the ctx parameter but this is a dirty hack.

Should PlayTo be modified to take either a surface or a Layer?
Could we move CreateVideoProvider from top level interface to Surface/Layer so 
that either can create a VideoProvider.
i.e DisplayLayer->CreateVideoProvider and Surface->CreateVideoProvider.
The Video Provider could then be passed the 'parent' creator in the Construct 
call and then we would be able to handle both Layer or Surface.

I am looking for some advice and am happy to try things out as we try to make a 
better version of the DFB1.2 driver.

Cheers
Dan



_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to