Page 1 of 1

Develop VLC plugin using .dll or .so instead of .a

Posted: 09 Nov 2016 05:51
by flybirdinsky
I developed my VLC plugin with .a library successfuly. But when I change to a dll or so file, that plugin is not found by VLC.
For example, I have a libcodec.dll and libcodec.dll.a. Based on previous successful VLC plugin (for .a static lib) project,
1. I change dll la file as below

dlname='libcodec.dll'
# Names of this library.
library_names='libcodec.dll.a'
# The name of the static archive.
old_library='' // leave it blank. Previous one is libcodec.a

2. use LoadLibrary and GetProcAddress to load dll function

But it does not work. My question is 1) Does VLC only support plugin based on static library? 2) If not, could anyone educate me the right way to do it?
Thanks.

Re: Develop VLC plugin using .dll or .so instead of .a

Posted: 09 Nov 2016 17:33
by RĂ©mi Denis-Courmont
Err, VLC only supports DLL plugins on Windows. That should be obvious from looking at the VLC installation directory.

Re: Develop VLC plugin using .dll or .so instead of .a

Posted: 10 Nov 2016 07:48
by flybirdinsky
Solved.

Above my solution is almost right. The issue is the location of second DLL referenced by vlc_plugin DLL. emm...., that is the common problem, i.e. DLL call another DLL. After solving the DLL position problem, VLC works. HAHA.... I can just update decoder core DLL without rebuilding whole VLC project now.

Re: Develop VLC plugin using .dll or .so instead of .a

Posted: 11 Nov 2016 13:25
by flybirdinsky
Is it possile to use LoadLibraryExW to replace LoadLibraryW in src/win32/plugin.c in VLC project? Currently DLL called by plugin dll have to be placed in system directory or vlc top directory. If use LoadLibraryExW, DLL can put together with plugin dll.
I tried it, but vlc does no work due to some other plugin, but it works for my own plugin if I did this specifically for my DLL.