Hi Kyle, yes, DirectFB can do that. In principle, it is already doing that. Depending on your install path, if I do "ls /opt/local/lib/directfb-1.3-0/interfaces/IDirectFBVideoProvider" I get: libidirectfbvideoprovider_gif.so libidirectfbvideoprovider_v4l.so These are 'standalone' libraries, so you need to just create one like this yourself. As defined by configuration, DirectFB will look into this directory and try to load all libraries, assuming each one to be a Video Provider. On each user activity on a file, DirectFB will poll the libraries, to see if they recognise the provided format. What is left for you to do is to implement a Probe function which looks like: static DFBResult Probe( IDirectFBVideoProvider_ProbeContext *ctx ) { if (!memcmp( ctx->header, "GIF89", 5 )) return DFB_OK; else return DFB_UNSUPPORTED; }
Always looking forward to contributions! Greets Niels Kyle Mallory wrote: > I just started playing w/ DirectFB today, and in particular ++DFB. > I'm developing an application for an embedded device (aren't we all?) > and DFB has been a dream solution so far. > > My question has two parts: Can Video Providers be implemented > 'dynamically' or at runtime, or do they have to be compiled into the > DirectFB libraries? Also, is there a basic template for writing new > Video Providers and registering them? > > Background: My UI is heavy on animated icons and such. I was just > starting a class to handle animating a series of images, when I > concluded that a VideoProvider is probably my best solution, also a > significant portion of my device is a media player for various media > types. As such, eventually I'll need to develop a VideoProvider for > those media formats as well. For the animated icons I'm looking for a > VideoProvider that animates a series of PNGs, so in a sense, a > VideoProvider based on an ImageProvider. > > On the surface, it appears DirectFB could easily handle this, but > digging into the code, its not quite so clear. My preference would be > able to use a stock DirectFB with custom providers registered at > runtime. > > Any help would be appreciated. Outside of proprietary video formats, > any providers I code I'm happy to contribute back to the project. > > > Thanks, > > Kyle Mallory > > _______________________________________________ > directfb-users mailing list > directfb-users@directfb.org > http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users > > -- .------------------------------------------. | DirectFB - Hardware accelerated graphics | | http://www.directfb.org/ | "------------------------------------------" _______________________________________________ directfb-users mailing list directfb-users@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users