Closed Wohlstand closed 9 months ago
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...
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.
Yeah, getting closer and closer
To sum up:
CMake produces objects.a
, which contains libadlmidi.c.obj
that stops compilation, crying about "undefined references to vlc_module_name". I can't even open it, and objects.a
is simply not there while building under linux.
Okay, just for a test, Try to use autotools build, but before install ADLMIDI library into system first. If it will work, then I have some to change in the build code...
It's possibly I need to try review actual pkgconfig on Windows, it's possibly I forgot to link some important libraries...
On Windows I can't get past:
./configure: line 16932: syntax error near unexpected token 'vlc,'
./configure: line 16932: PKG_CHECK_MODULES(vlc, vlc-plugin >= 2.0)'
vlc sdk installed as previously, I even downloaded mingw-w64-x86_64-vlc
package, still nothing.
On Linux autotools build works fine.
Okay, a bit later I'll give you some test of CMake script you can try out...
Yeah, post it here, I can try out
Looks like 4cf3a53 fixed Windows build, I just compiled OPNMIDI vlc plugin, just I need to check out if it works...
... and looks like it doesn't. Sure, it compiles just fine, but VLC doesn't see/load it when placed in vlc/plugins/codec/. Maybe I'm doing sth wrong, though I doubt it at this point
What vlc --list
command is showing?
One note: if it's some Windows-specific MIDI plugin to play MIDI files via MIDI-Out, you need to rename it (for example, into .dll-off
) and restart VLC.
What vlc --list command is showing?
https://pastebin.com/ys8nbYx3 - there is no mention of any OPN/OPL/MIDI codec, fluidsynth was disabled by me
Looks like for Windows I need something different than this: https://forum.videolan.org/viewtopic.php?f=2&t=143829 to let built plugin be visible by VLC... Until this thread, Linux build was also invisible to VLC until missing macros was defined...
I don't have the setup to build this but maybe post the compiled dll so I can try analyzing this.
Together with built ADLMIDI/OPNMIDI DLL plugin, also please send any random DLL that is working on VLC.
as you wish - codecs.zip
They're mixed architectures, look. I think you have built the wrong target.
libadlmidi_plugin.dll: PE32 executable (DLL) (console) Intel 80386 (stripped to external PDB), for MS Windows
libfluidsynth_plugin.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
libopnmidi_plugin.dll: PE32 executable (DLL) (console) Intel 80386 (stripped to external PDB), for MS Windows
Ha-ha :fox_face: :rofl: So easy! I have though it was something worse, like missing macros... Try with 32-bit VLC build, or rebuild with MinGW-w64 for 64-bit arch...
So, let's for case of AppVeyor CI deploy the VLC plugins? (when we will take them working)
damn i'm ashamed of myself 🤦♂️ how could I forgot i want to force 64 bit vlc to read 32-bit plugins.. or not. interesting, still it's invisible to win32 vlc... i'm lost at this point
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.
Test and debug build on macOS platform.Replaced with a new issue.