Register new libnvdsgst_newplugin.so

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) AGX Xavier
• DeepStream Version 5.0
• JetPack Version (valid for Jetson only) 4.4

I am able to create my own newplugin using gst-dsexample and tested under the same element name “dsexample” and lib name libnvdsgst_dsexample.so.

Next step, create a new element name “newplugin” and lib name still using libnvdsgst_dsexample.so and it still works perfectly.

But when I try to spin out as a new libnvdsgst_newplugin.so by changing the Makefile:
from
LIB:=libnvdsgst_dsexample.so
to
LIB:=libnvdsgst_newplugin.so

I am able to “make” and “make install” without error. But when I run the pipeline or gst-inspect-1.0 newplugin and cannot find the element. If I resume the Makefile back to:
LIB:=libnvdsgst_dsexample.so
, and make/make install again, then I can run the pipeline or gst-inspect-1.0 newplugin again.

I wonder is there any step I am missing to “register” the “libnvdsgst_newplugin.so”? how? Please help. Thanks a lot.

P.S. I did “rm .cache/gst-gstreamer-1.1/registry.x86_64.bin” for element rescan/register. But it still behaves as above.

Have you register the new named plugin with GST_PLUGIN_DEFINE?
The name in GST_PLUGIN_DEFINE() should be the same to the *.so name.
For example, you need to change the codes in gstdsexample.cpp, with the library name as libnvdsgst_newplugin.so, you should register with the following codes:
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, nvdsgst_newplugin,
DESCRIPTION, dsexample_plugin_init, “5.0”, LICENSE, BINARY_PACKAGE, URL)

It is better to use your own elements and plugin names if you want to develop a new plugin.

2 Likes

Yes, after modify GST_PLUGIN_DEFINE, everything works as expected. Thank you Fiona.