Plugin for VLC Media player
This plugin must allows to play MIDI files through libADLMIDI by using of VLC Media Player.
The working example is stored in utils/vlc_plugin folder. Buildable on Linux with libvlccore-dev and libvlc-dev packages. Possibly on other platforms which is not tested.
- [x] Fix CMake build (built plugin wont be loaded by VLC. However, same built by autotools-built works fine).
- [x] Add more public codec settings (embedded bank ID, Volume model, Deep-tremolo, deep-vibrato, scaling modulation, etc.)
- [x] Support for both VLC 2.2.2 and latest.
- [x] Test and debug build on Windows platform.
- [x] Make the proper recognizing of codec plugin installation target path (on Linux it's different on Ubuntu 16 and on Ubuntu 18 and not same), and install the compiled SO into that path.
- [ ] Test and debug build on macOS platform.
CMake build of VLC plugin has been fixed!
Thanks for the help to Rémi Denis-Courmont on VideoLAN forums: https://forum.videolan.org/viewtopic.php?f=2&t=143829
Attempt to build plugin under Windows 7 x64 results in:
Linux Mint works 100% fine.
Yeah, I never tested the plugin on Windows, and also, it supports VLC 2.2.2 version only yet, and I will need to add support for latest version by macros.
Okay, on the official forum one of developers have pointed me libvlc_version.h header which will help me to make a codec be compatible with both legacy and moder versions of VLC. However, for now, I will need to install more fresh VLC build than my in-system to port current stuff into it.
OK WTF: (building plugin under Ubuntu 18.04 running inside virtualbox)
Which version of VLC? At me was VLC 2.2.2 and the newer VLC has different API I must to support to fix this
Aw shiiit, it's 3.0.1 :(
At me is a second thing that is built from source VLC 3 I wasn't tested. For now I working on a fix for some, and I'll also try to port to it
Just now I have added support for VLC 3! @papiezak , please pull fresh stuff and try again! :wink: (I have used this file as example to compare: https://github.com/videolan/vlc/blob/master/modules/codec/fluidsynth.c as originally my codec is directly basing of FluidSynth's plugin)
Gotta to backport my changes to OPNMIDI
it was built without of UI, but even that it now successfully plays music from a console by my plugins! :wink: So, feel free to test arround plugin again, also try to test it on Windows too...
OK, let me check...
- Linux... builds fine, works fine as well! (but I didn't test much)
- Windows... uh oh
(it's goes on and on )
EDIT: Removing "@" tokens from libvlc_version.h gives EXACTLY the same errors as my first attempts to build plugin under Win 7
How to install: Just put the "libadlmidi_plugin.so" (or SymLink to it) into /usr/lib/vlc/plugins/codec/"
About of win build: I'll need to test this out by myself, this still look weird...
On Ubuntu 18.04 (and most likely in an upcoming Linux Mint 19) it goes to /usr/lib/x86_64-linux-gnu/vlc/plugins/codec. That's why I had slight problems
Drums on at least this particular XG midi are broken at one point. (time position around 00:46) Example: badxg.zip
@papiezak , I have tried this file, and it seems works fine. What do you think is wrong? Try out super-fresh version. I have tested in both VLC and built-in MIDI player.
Yeah, sorry my bad, it was a very stupid bug in my DMXOPL mod bank. But is it okay if I don't see any public codec settings except (custom) bank selection and amount of chips? Your main post says it's done already :suspect:
You right, damn, forgot to add them, gonna to add them on a quick hand... P.S. Is VLC plugin now buildable on Windows? (Did you tested build recently?)
last time i used windows (a week ago) it wasnt :disappointed: but I will check, give me some time...
Now setup is this
Similar for OPNMIDI:

aaand here goes nothing:
OK am I doing something wrong?
Did you even installed VLC SDK? (or build it from sources)
Or maybe need to append more search paths here? https://github.com/Wohlstand/libADLMIDI/blob/ccfb31ab7cd966aeddb106f7a1c3efec6834dccc/cmake/FindLIBVLC.cmake#L35-L44
Oh, one thing you need, you need to use MinGW-w64, you need to compile complete VLC from sources. And yeah, as I looked VLC docs, VLC no more supports vanilla MinGW (32-bit only) toolchains.
I didn't compile VLC or its SDK from sources. SDK files, devel headers, import libraries come with official 7-zip package.
Anyway, try to use MinGW-w64 toolchain instead of vanilla. I have tried to find their pre-built SDK package, but found nothing, can you link me that? I wanna try to build the things by myself...
Grab it then - https://get.videolan.org/vlc/3.0.3/win32/vlc-3.0.3-win32.7z
Speaking of plugin -
everything is installed correctly, findLIBVLC.cmake is modified appropriately ( I think), libvlccore is taken from that package and it's the result.
Seems you are trying to link x86_64 with X86_32, carefully check the archirecture of toolchain and the package (try to use 64-bit MinGW-w64 and 64-bit VLC), or be sure you have 32-bit MinGW-w64 toolchain.