GNOME Bugzilla – Bug 785168
d3dvideosink: not recognized as a plugin on msys2
Last modified: 2017-07-20 22:37:40 UTC
$ gst-inspect-1.0 /D/msys64/mingw64/lib/gstreamer-1.0/libgstd3dvideosink.dll Could not load plugin file: File "D:/msys64/mingw64/lib/gstreamer-1.0/libgstd3dvideosink.dll" is not a GStreamer plugin
Could you attach the output of GST_DEBUG=*REGISTRY*:5 gst-inspect-1.0 /D/msys64/mingw64/lib/gstreamer-1.0/libgstd3dvideosink.dll And the global symbols available inside the .dll? (I don't how to do that under windows ;)).
Created attachment 356043 [details] verbose inspect output
$ ntldd --list-exports /D/msys64/mingw64/lib/gstreamer-1.0/libgstd3dvideosink.dll [1] gst_plugin_d3dsinkwrapper_get_desc (0x28d0) <0> [2] gst_plugin_d3dsinkwrapper_register (0x28e0) <0>
directsoundsrc works fine but directsoundsink has the same issue. I am building master under msys2...
(In reply to Philippe Renon from comment #3) > $ ntldd --list-exports > /D/msys64/mingw64/lib/gstreamer-1.0/libgstd3dvideosink.dll > [1] gst_plugin_d3dsinkwrapper_get_desc (0x28d0) <0> > [2] gst_plugin_d3dsinkwrapper_register (0x28e0) <0> Well, these are different from the plugin name, they need to match the plugin dll/so file in master unfortunately. Changing either the plugin name to 'd3dvideosink' or changing the library name to 'd3dsinkwrapper' in both Makefile.am and meson.build will fix this.
Any idea why it broke all of sudden ?
Same issue with directsoundsink: $ ntldd --list-exports /D/msys64/mingw64/lib/gstreamer-1.0/libgstdirectsoundsink.dll [1] gst_plugin_directsound_get_desc (0x3630) <0> [2] gst_plugin_directsound_register (0x3640) <0>
In 1.12 we did an internal ABI break around the plugin naming in order to cleanup static plugin support and reduce build time and complexity. But now we need the plugin name to match the shared library name. Apparently I forgot these.
Created attachment 356046 [details] [review] d3dsinkwrapper: Make the DLL name match the plugin name Otherwise, since 1.12, the plugin gets blacklisted.
Comment on attachment 356046 [details] [review] d3dsinkwrapper: Make the DLL name match the plugin name d3dsink*wrapper*, really? Can we maybe rename this? :) Otherwise please also get this into 1.12...
Created attachment 356047 [details] [review] directsound: Fix DLL name to match plugin name
Created attachment 356048 [details] [review] d3dsinkwrapper: Make the DLL name match the plugin name Otherwise, since 1.12, the plugin gets blacklisted.
(In reply to Sebastian Dröge (slomo) from comment #10) > Comment on attachment 356046 [details] [review] [review] > d3dsinkwrapper: Make the DLL name match the plugin name > > d3dsink*wrapper*, really? Can we maybe rename this? :) > > Otherwise please also get this into 1.12... No issue with that, it's just a little more disruptive to change plugin name as it's visible from registry.
Created attachment 356049 [details] [review] d3dsinkwrapper: Make the DLL name match the plugin name Updated so the plugin is now libgstd3d.dll (no more clash with the element names). I also notice that the change in the Makefile.am wasn't complete. Again, please test this first to confirm I haven't fat fingered something and that we don't badger 1.12 branch with mistakes. I'm not really setup to test at the moment.
I checked all base/good/bad plugins and found another one: $ ntldd --list-exports /D/msys64/mingw64/lib/gstreamer-1.0/libgstwaveformsink.dll [1] gst_plugin_waveform_get_desc (0x2850) <0> [2] gst_plugin_waveform_register (0x2860) <0> Building plugins-ugly now...
Created attachment 356052 [details] [review] directsound: Fix DLL name to match plugin name Was missing a \ in the cruft list.
Created attachment 356053 [details] [review] waveform: Fix DLL name to match plugin name This one is missing the meson.build, just to mention.
Ugly is fine afaict. Note that I only checked plugins available on windows. If you push the changes to master, I can test them.
(In reply to Philippe Renon from comment #18) > If you push the changes to master, I can test them. Well, the idea is to review / test them before doing that. Otherwise we have to patch on top of broken patches and that's ugly. Cerbero allow adding patches to git/master recipes for that purpose.
If it's too complicated, maybe if someone could at least make a review and look attentively for potential typo, that would be good. Then we can probably merge in master and test there before backporting.
I might have forgot to mention, but "gst-inspect-1.0 -b" will give you the list of plugin that has been blacklisted.
On msys2 we don't use cerbero. Msys2 comes with pacman (a package manager) and tools to build packages. For example, here is the "recipe" to build gst-plugins-bad : https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-gst-plugins-bad/PKGBUILD
I had a look at the patches and did not spot anything glaringly wrong.
And no plugins are currently blacklisted in my environment. Not sure this is expected. Shouldn't the "broken" plugins be blacklisted ? $ gst-inspect-1.0.exe -b Blacklisted files: Total count: 0 blacklisted files
> In 1.12 we did an internal ABI break around the plugin naming ... Isn't this only in master? I don't think it went into 1.12, although we did start renaming some plugins earlier.
(In reply to Tim-Philipp Müller from comment #25) > > In 1.12 we did an internal ABI break around the plugin naming ... > > Isn't this only in master? I don't think it went into 1.12, although we did > start renaming some plugins earlier. It is in 1.12
Aren't we talking about https://cgit.freedesktop.org/gstreamer/gstreamer/commit/gst/gstplugin.c?id=e7ede5a487d8c1571a4387a5f8eeb4d5e73a9553 ? I can't see that commit on 1.12
Tim is correct, we renamed in 1.12, but only made that mandatory in git master (1.13). So forget about anything I said about backporting, I was just confused. There is no need to backport this. But from Philippe's "ntldd --list-exports" he's building with the new plugin interface, so I guess pacman can build from master despite the linked recipe being 1.12. Anyway, let's merge this to master, there is at least two pairs of eyes that have looked at it.
Attachment 356052 [details] pushed as 608abe4 - directsound: Fix DLL name to match plugin name Attachment 356053 [details] pushed as 7edf41b - waveform: Fix DLL name to match plugin name
Comment on attachment 356049 [details] [review] d3dsinkwrapper: Make the DLL name match the plugin name Leaving the bug open until Philippe can confirm this is really fixed. Attachment 356049 [details] pushed as 3e0db49 - d3dsinkwrapper: Make the DLL name match the plugin name
Yes, msys2 can also build master. Sorry if I gave the impression to build 1.12. But I think the ticker was opened against master. I tested the changes. Unfortunately we missed a typo in directsound/Makefile.am The line: libgstdirectsound_la_SOURCES = gstdirectsound.c gstdirectsoundplugin.c should be: libgstdirectsound_la_SOURCES = gstdirectsoundsink.c gstdirectsoundplugin.c With that fix everything compiles fine but both d3d and directsound have no features... $ gst-inspect-1.0.exe d3d Plugin Details: Name d3d Description Direct3D plugin Filename C:\msys64\mingw32\lib\gstreamer-1.0\libgstd3d.dll Version 1.13.0.1 License LGPL Source module gst-plugins-bad Source release date 2017-07-20 20:57 (UTC) Binary package GStreamer Bad Plug-ins git Origin URL Unknown package origin 0 features: $ gst-inspect-1.0.exe directsound Plugin Details: Name directsound Description Direct Sound plugin library Filename C:\msys64\mingw32\lib\gstreamer-1.0\libgstdirectsound.dll Version 1.13.0.1 License LGPL Source module gst-plugins-good Source release date 2017-07-20 20:16 (UTC) Binary package GStreamer Good Plug-ins git Origin URL Unknown package origin 0 features: On the other hand, waveform is fine: $ gst-inspect-1.0.exe waveform Plugin Details: Name waveform Description WaveForm win32 API plugin Filename C:\msys64\mingw32\lib\gstreamer-1.0\libgstwaveform.dll Version 1.13.0.1 License LGPL Source module gst-plugins-good Source release date 2017-07-20 20:16 (UTC) Binary package GStreamer Good Plug-ins git Origin URL Unknown package origin waveformsink: WaveForm Audio Sink 1 features: +-- 1 elements
Author: Nicolas Dufresne <nicolas.dufresne@collabora.com> Date: Thu Jul 20 17:21:05 2017 -0400 directsound: Fix .c file name in Makefile This was broken by accident, bad search and replace.
The empty feature is strange. Can you remove C:\msys64\mingw32\lib\gstreamer-1.0\libgstdirectsoundsink.dll, and the other two ancient files. I'd then also remove the registry and try again, just to make sure. After removing the registry, try setting GST_DEBUG=2 (at least) when running gst-insepct-1.0, it might help understand what happens.
The old libraries were removed thanks to pacman ;) Removing the registry did the trick. Btw, on Windows / msys2, the registry is in a really weird place: C:\Users\Utilisateur\AppData\Local\Microsoft\Windows\INetCache\gstreamer-1.0\registry.i686.bin $ gst-inspect-1.0.exe d3d 2> inspect.log Plugin Details: Name d3d Description Direct3D plugin Filename C:\msys64\mingw32\lib\gstreamer-1.0\libgstd3d.dll Version 1.13.0.1 License LGPL Source module gst-plugins-bad Source release date 2017-07-20 20:57 (UTC) Binary package GStreamer Bad Plug-ins git Origin URL Unknown package origin d3dvideosink: Direct3D video sink 1 features: +-- 1 elements $ gst-inspect-1.0.exe directsound Plugin Details: Name directsound Description Direct Sound plugin library Filename C:\msys64\mingw32\lib\gstreamer-1.0\libgstdirectsound.dll Version 1.13.0.1 License LGPL Source module gst-plugins-good Source release date 2017-07-20 20:16 (UTC) Binary package GStreamer Good Plug-ins git Origin URL Unknown package origin directsoundsink: Direct Sound Audio Sink 1 features: +-- 1 elements Nice, now I can go on vacation light headed :)
Have a good time, for us the next step is to move cerbero a recent msys2 (still on GCC 4.7).