After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785168 - d3dvideosink: not recognized as a plugin on msys2
d3dvideosink: not recognized as a plugin on msys2
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.13.x
Other Windows
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-20 12:54 UTC by Philippe Renon
Modified: 2017-07-20 22:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
verbose inspect output (1.22 MB, text/plain)
2017-07-20 13:33 UTC, Philippe Renon
  Details
d3dsinkwrapper: Make the DLL name match the plugin name (1.48 KB, patch)
2017-07-20 14:31 UTC, Nicolas Dufresne (ndufresne)
none Details | Review
directsound: Fix DLL name to match plugin name (2.51 KB, patch)
2017-07-20 14:38 UTC, Nicolas Dufresne (ndufresne)
none Details | Review
d3dsinkwrapper: Make the DLL name match the plugin name (2.09 KB, patch)
2017-07-20 14:40 UTC, Nicolas Dufresne (ndufresne)
none Details | Review
d3dsinkwrapper: Make the DLL name match the plugin name (3.15 KB, patch)
2017-07-20 14:47 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
directsound: Fix DLL name to match plugin name (2.52 KB, patch)
2017-07-20 15:00 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
waveform: Fix DLL name to match plugin name (1.87 KB, patch)
2017-07-20 15:03 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review

Description Philippe Renon 2017-07-20 12:54:10 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
Comment 1 Matthew Waters (ystreet00) 2017-07-20 13:09:41 UTC
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 ;)).
Comment 2 Philippe Renon 2017-07-20 13:33:09 UTC
Created attachment 356043 [details]
verbose inspect output
Comment 3 Philippe Renon 2017-07-20 13:36:32 UTC
$ 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>
Comment 4 Philippe Renon 2017-07-20 13:40:10 UTC
directsoundsrc works fine but directsoundsink has the same issue.

I am building master under msys2...
Comment 5 Matthew Waters (ystreet00) 2017-07-20 13:55:26 UTC
(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.
Comment 6 Philippe Renon 2017-07-20 14:05:46 UTC
Any idea why it broke all of sudden ?
Comment 7 Philippe Renon 2017-07-20 14:14:21 UTC
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>
Comment 8 Nicolas Dufresne (ndufresne) 2017-07-20 14:29:08 UTC
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.
Comment 9 Nicolas Dufresne (ndufresne) 2017-07-20 14:31:07 UTC
Created attachment 356046 [details] [review]
d3dsinkwrapper: Make the DLL name match the plugin name

Otherwise, since 1.12, the plugin gets blacklisted.
Comment 10 Sebastian Dröge (slomo) 2017-07-20 14:35:40 UTC
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...
Comment 11 Nicolas Dufresne (ndufresne) 2017-07-20 14:38:53 UTC
Created attachment 356047 [details] [review]
directsound: Fix DLL name to match plugin name
Comment 12 Nicolas Dufresne (ndufresne) 2017-07-20 14:40:48 UTC
Created attachment 356048 [details] [review]
d3dsinkwrapper: Make the DLL name match the plugin name

Otherwise, since 1.12, the plugin gets blacklisted.
Comment 13 Nicolas Dufresne (ndufresne) 2017-07-20 14:42:33 UTC
(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.
Comment 14 Nicolas Dufresne (ndufresne) 2017-07-20 14:47:30 UTC
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.
Comment 15 Philippe Renon 2017-07-20 14:56:10 UTC
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...
Comment 16 Nicolas Dufresne (ndufresne) 2017-07-20 15:00:33 UTC
Created attachment 356052 [details] [review]
directsound: Fix DLL name to match plugin name

Was missing a \ in the cruft list.
Comment 17 Nicolas Dufresne (ndufresne) 2017-07-20 15:03:06 UTC
Created attachment 356053 [details] [review]
waveform: Fix DLL name to match plugin name

This one is missing the meson.build, just to mention.
Comment 18 Philippe Renon 2017-07-20 15:12:40 UTC
Ugly is fine afaict. Note that I only checked plugins available on windows.

If you push the changes to master, I can test them.
Comment 19 Nicolas Dufresne (ndufresne) 2017-07-20 15:14:33 UTC
(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.
Comment 20 Nicolas Dufresne (ndufresne) 2017-07-20 15:48:32 UTC
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.
Comment 21 Nicolas Dufresne (ndufresne) 2017-07-20 15:52:57 UTC
I might have forgot to mention, but "gst-inspect-1.0 -b" will give you the list of plugin that has been blacklisted.
Comment 22 Philippe Renon 2017-07-20 15:57:08 UTC
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
Comment 23 Philippe Renon 2017-07-20 16:07:22 UTC
I had a look at the patches and did not spot anything glaringly wrong.
Comment 24 Philippe Renon 2017-07-20 16:23:35 UTC
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
Comment 25 Tim-Philipp Müller 2017-07-20 16:38:39 UTC
> 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.
Comment 26 Thibault Saunier 2017-07-20 16:49:38 UTC
(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
Comment 27 Tim-Philipp Müller 2017-07-20 17:17:00 UTC
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
Comment 28 Nicolas Dufresne (ndufresne) 2017-07-20 19:43:40 UTC
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.
Comment 29 Nicolas Dufresne (ndufresne) 2017-07-20 19:46:55 UTC
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 30 Nicolas Dufresne (ndufresne) 2017-07-20 19:48:19 UTC
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
Comment 31 Philippe Renon 2017-07-20 21:15:01 UTC
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
Comment 32 Nicolas Dufresne (ndufresne) 2017-07-20 21:22:15 UTC
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.
Comment 33 Nicolas Dufresne (ndufresne) 2017-07-20 21:28:06 UTC
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.
Comment 34 Philippe Renon 2017-07-20 21:42:58 UTC
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 :)
Comment 35 Nicolas Dufresne (ndufresne) 2017-07-20 22:37:40 UTC
Have a good time, for us the next step is to move cerbero a recent msys2 (still on GCC 4.7).