Denis Oliver Kropp wrote:
> 
> Daniel Laird schrieb:
>> I was wondering what people thought about adding a 
>> IDirectFB_CreateVideoProviderByName function:
>> 
>> this would have a prototype like:
>> IDirectFB_CreateVideoProviderByName(
>>     IDirectFB *thiz, 
>>     const char* filename, 
>>     const char* videoprovidername, 
>>     IDirectFBVideoProvider **interface)
> 
> Some explicit implementation selection should be there, not only for 
> video providers.
> 
>> The reason for this is that if you have a number of VideoProviders
>> calling
>> Probe on each in turn can be time consuming and also requires data to be
>> going through the system.  
>> If you could shortcut this by specifying a name which could be the
>> VideoProviderName without lib or .so then this would allow a quick way of
>> saying - I know I am getting AVI data and I know which VideoProvider I
>> need.
> 
> It's also necessary to select between different suitable implementations.
> 
>> The only problem is that CreateVideoProvider uses a common function
>> DirectGetInterface and this change does not appear to fit easily with the
>> current implementation. 
>> 
>> I am a bit confused by the 'implementation' parameter to the
>> DirectGetInterface function, is this maybe what i should use to implement
>> the IDirectFB_CreateVideoProviderByName function?
> 
> Yes. The "implementation" is e.g. "ffmpeg" or "hw264".
> 
> -- 
> Best regards,
>    Denis Oliver Kropp
> 
> .------------------------------------------.
> | DirectFB - Hardware accelerated graphics |
> | http://www.directfb.org/                 |
> "------------------------------------------"
> 
> _______________________________________________
> directfb-dev mailing list
> [email protected]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
> 
> 

Currently in the DirectGetInterface function it checks against the
implementations and if not found tries dynamically loading each interface in
turn and seeing if the probe succeeds.
I would still need to have dynamic loading of interfaces but allow me to
specify an exact library rather than the current usage which is every one
within a given directory.

So I am still confused as to how I would add this functionality. But have an
idea - 

Currently if you have an implementation it tries to load it
If you specify a type and no implementation it loads all libraries
dynamically until probe succeeds

Perhaps I could add logic that says if you define both implementation AND
type that it just loads the given implementation of a certain type
dynamically 
The code would be put in between the current 
/*Check Implementations first*/
And
The DYNAMIC LINKING section.

I think this would work, what do you think?

Cheers
Dan

-- 
View this message in context: 
http://www.nabble.com/CreateVideoProvider-by-Name-tf3478829.html#a9731929
Sent from the DirectFB Dev mailing list archive at Nabble.com.


_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to