Delay loading of GStreamer DLLs on Windows

Andy Robinson andy at seventhstring.com
Tue Dec 8 07:48:09 PST 2015


I guess that would be another way, but my app doesn't just use GStreamer 
for reading sound files but also for saving them, and for displaying 
video. This code is already written and works fine on Linux. So moving 
it all off into a dll would involve major surgery.

Another solution which might be easier would be for me to build "stub" 
versions of the GStreamer DLLs and distribute them with the app, while 
specifying a search path that would look in the standard GStreamer 
location first. That way, the real GStreamer would be found if present, 
and the nop stub versions if not.

If anyone knows an easier / more elegant solution then please speak up!

Regards,
Andy Robinson, Seventh String Software, www.seventhstring.com

On 08/12/15 15:22, Nicolas Dufresne wrote:
> Le mardi 08 décembre 2015 à 14:45 +0000, Andy Robinson a écrit :
>> Does anyone know a way around this? Have any of you written a Windows
>> app that uses GStreamer if the DLLs are present, but runs without
>> them
>> if they aren't?
>>
>> There is one obvious but clumsy workaround: use explicit LoadLibrary,
>> then locate pointers to all the desired functions & data. Horrible,
>> and
>> it seems to me that it would involve pretty much re-writing all the
>> gst
>> header files.
>
> I would opt for another solution. Instead of trying to delay load a
> library not designed for that, I would enclose all my GStreamer needs
> in a simple (function only) small library. That library would link
> directly to GStreamer. Then all I'd have to do is load that simplier
> library, with dlopen or delay load (whatever works).
>
> Nicolas
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>


More information about the gstreamer-devel mailing list