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

This forum is about all development around libVLC.
flybirdinsky
New Cone
New Cone
Posts: 3
Joined: 09 Nov 2016 05:33

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

Postby flybirdinsky » 09 Nov 2016 05:51

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 09 Nov 2016 17:33

Err, VLC only supports DLL plugins on Windows. That should be obvious from looking at the VLC installation directory.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

flybirdinsky
New Cone
New Cone
Posts: 3
Joined: 09 Nov 2016 05:33

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

Postby flybirdinsky » 10 Nov 2016 07:48

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.

flybirdinsky
New Cone
New Cone
Posts: 3
Joined: 09 Nov 2016 05:33

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

Postby flybirdinsky » 11 Nov 2016 13:25

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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 16 guests