Delay loading of GStreamer DLLs on Windows
Andy Robinson
andy at seventhstring.com
Wed Dec 9 03:43:43 PST 2015
If I use LoadLibrary then I would need to explicitly locate each
function I want to call, and keep pointers to them. Fortunately the C++
compiler, when it sees "foo()", doesn't care whether foo is a function
or a pointer to a function, so I wouldn't need to rewrite my code (I
think). But I think I would need to rewrite the GST header files to
declare "foo" as a pointer to a function rather than a function. Unless
there is some neat way of doing this?
I could, as you say, bundle the DLLs. My app download for Windows is
currently 2.2 MB so it seems a little strange to increase that to over
100 MB (the size of gstreamer-1.0-x86-1.6.1-merge-modules.zip), when
many of my users wouldn't need the extra capabilities that GStreamer
would provide. I would also have to think about how to comply with the
licenses, as my app is closed source so I can't just include everything
(GPL license, patents, etc).
Regards,
Andy Robinson, Seventh String Software, www.seventhstring.com
On 09/12/15 11:14, Nirbheek Chauhan wrote:
> On Wed, Dec 9, 2015 at 4:38 PM, Nirbheek Chauhan
> <nirbheek.chauhan at gmail.com> wrote:
>> On Tue, Dec 8, 2015 at 9:18 PM, Andy Robinson <andy at seventhstring.com> wrote:
>>> If anyone knows an easier / more elegant solution then please speak up!
>>>
>>
>> Is using LoadLibrary() not an option for you? It should work similar
>> to dlopen() on Linux and does not require the DLL to be present at
>> link time. It only requires the library to be present in the search
>> path at runtime.
>>
>
> Apologies; I missed that you mentioned that in your initial email.
> There is no other option since all symbols must be resolved at link
> time. As far as I know, there is no workaround for that.
>
> If I were you, I'd just ship the gstreamer libraries with the
> application unconditionally. No point doing all this work to save a
> few MBs. :)
>
More information about the gstreamer-devel
mailing list