<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">Le mar. 12 juin 2018 19:38, jimfcarroll <<a href="mailto:jimfcarroll@gmail.com">jimfcarroll@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hello,<br>
<br>
I started another thread but have my problem narrowed down to the name of<br>
the plugin library. <br>
<br>
Under 1.8.3 my plugin library was named <a href="http://libgstbreakout-1.0.so" rel="noreferrer noreferrer" target="_blank">libgstbreakout-1.0.so</a>. This worked<br>
fine. The very same code built against 1.14.0 results in the same library<br>
but the plugin no loner loads unless I change the name of the library to<br>
libgstbreakout.so.<br>
<br>
I can see in the code why this is happening. For both gst-inspect-1.0 and<br>
gst-launch-1.0 I get something like the following using GST_DEBUG=:*7<br>
<br>
gstpluginloader.c:719:do_plugin_load: Plugin scanner loading file<br>
/tmp/<a href="http://libgstbreakout-1.0.so" rel="noreferrer noreferrer" target="_blank">libgstbreakout-1.0.so</a>. tag 2<br>
gstplugin.c:760:_priv_gst_plugin_load_file_for_registry: attempt to load<br>
plugin "/tmp/<a href="http://libgstbreakout-1.0.so" rel="noreferrer noreferrer" target="_blank">libgstbreakout-1.0.so</a>"<br>
gstplugin.c:811:_priv_gst_plugin_load_file_for_registry: Could not find<br>
symbol 'gst_plugin_breakout_1_get_desc', falling back to gst_plugin_desc<br>
gstplugin.c:818:_priv_gst_plugin_load_file_for_registry: Could not find<br>
plugin entry point in "/tmp/<a href="http://libgstbreakout-1.0.so" rel="noreferrer noreferrer" target="_blank">libgstbreakout-1.0.so</a>"<br>
<br>
The function extract_symname is confusing the '.' in 1.0 with the '.' before<br>
.so and assumes the name of the plugin implied by the file is breakout_1 (it<br>
also converts all '-'s to '_').<br>
<br>
How is it that many (most?) plugins are named <a href="http://libgstXXXXXX-1.0.so" rel="noreferrer noreferrer" target="_blank">libgstXXXXXX-1.0.so</a>. This is<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">None of the plugins are name like this in GStreamer itself.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
EXPECTED in the Java API. As a matter of fact, you need to bend over<br>
backward every time you run your program if it's not by adding template<br>
strings as a -D parameter on the command line.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">This comment is unclear and would need clarification. What does Java have to do with C plugins ?</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
What's the right way to do this?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Feel free to propose an improvement to the parser if you feel that versioning your plugin is needed. The truth is that this is useless since plugins are placed in a folder that is already versionned for you, gstreamer-1.0/. The loader still support plugins built against older GStreamer header. But since 1.14, and this is noted in the release note, plugins shared object and plugin name must match and is used to construct the uniquely named C entry point for that plugin. We wanted this so that we can have static and dynamic plugins originating from the same build, assuming you want PIC for both. While porting GStreamer, I only found very few places were this was difficult, and we extended the symbol generator as needed. Notably, there is support for shared object named by the Python build tool.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks<br>
Jim<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div>