GNOME Bugzilla – Bug 783333
Fix plugin loading on windows with meson build
Last modified: 2017-07-05 10:22:09 UTC
Remove gst prefix from plugin file
Created attachment 353036 [details] [review] Patch
I changed the commit message a bit, thanks and sorry for the delay :)
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.
lib* is already handled though; right above that.
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.
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.
(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.
> 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?
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