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 783333 - Fix plugin loading on windows with meson build
Fix plugin loading on windows with meson build
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Windows
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-01 22:58 UTC by Matej Knopp
Modified: 2017-07-05 10:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (691 bytes, patch)
2017-06-01 22:59 UTC, Matej Knopp
committed Details | Review

Description Matej Knopp 2017-06-01 22:58:22 UTC
Remove gst prefix from plugin file
Comment 1 Matej Knopp 2017-06-01 22:59:20 UTC
Created attachment 353036 [details] [review]
Patch
Comment 2 Nirbheek Chauhan 2017-06-23 09:13:28 UTC
I changed the commit message a bit, thanks and sorry for the delay :)
Comment 3 Sebastian Dröge (slomo) 2017-06-23 09:15:35 UTC
This is not complete, I think. There are also plugins that are not libgst*.{so,dll} but instead lib*.{so,dll}. This case is handled for lib* but not for without lib prefix now.
Comment 4 Nirbheek Chauhan 2017-06-23 09:27:41 UTC
lib* is already handled though; right above that.
Comment 5 Nirbheek Chauhan 2017-06-23 09:29:10 UTC
Oh, you mean if a lib*.dll file is built with MSVC, it will be *.dll without the prefix. I guess since not enough people try that right now, it would be good to be strict about that anyway.
Comment 6 Sebastian Dröge (slomo) 2017-06-23 09:35:58 UTC
I would add another case (if all else fails) that checks as for the whole DLL filename (without extension) as plugin name. Then everything will work consistently between toolchains.
Comment 7 Nicolas Dufresne (ndufresne) 2017-06-23 16:45:27 UTC
(In reply to Sebastian Dröge (slomo) from comment #6)
> I would add another case (if all else fails) that checks as for the whole
> DLL filename (without extension) as plugin name. Then everything will work
> consistently between toolchains.

Make sense, should not be hard to add. For the reference, Farstream have plugins that don't have the gst prefix, in case you want a way to test. Otherwise, you can just rename a libgstblabla.dll into blabla.dll, this should be valid.
Comment 8 Tim-Philipp Müller 2017-07-03 19:55:54 UTC
> I would add another case (if all else fails) that checks as for the whole
> DLL filename (without extension) as plugin name.

I think this is already handled. The code is currently:

  guint prefix_len = 0;

  if (g_str_has_prefix (bname, "libgst"))
    prefix_len += 6;
  else if (g_str_has_prefix (bname, "lib"))
    prefix_len += 3;
  else if (g_str_has_prefix (bname, "gst"))
    prefix_len += 3;

which is in effect the same as an additional

  else
    prefix_len = 0

at the end, which is what we're talking about, right?
Comment 9 Tim-Philipp Müller 2017-07-05 10:22:09 UTC
commit f29082bfe1feb3e89e5f52bbd26d081fb7382a6b (HEAD -> master)
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Mon Jul 3 21:06:24 2017 +0100

    plugin: clarify code that deduces plugin name from file name
    
    Make the final else branch explicit for clarity.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783333