Customised plugins in deepstream 4.0

I am having trouble understanding how plugins are integrated with deepstream. I have modified the sample plugin template gstdsexample and built and installed the plugin at the appropriate location. Now if I wish to utilise the plugin with one of the sample apps , say - deepstream-app present in the deepstream sdk, what my next steps should be ?

Moving further, let’s say I wish to build a wrapper library utilising the deepstream-app codes and the customized plugin, what are the things which I should keep in mind ?

Any help is appreciated.

gstdsexample is just a GStreamer plugin, refer https://gstreamer.freedesktop.org/documentation/plugin-development/introduction/preface.html?gi-language=c. The gstdsexample lib will be loaded dynamically and initialized as other GStreamer plugin.

So, if I create a plugin based on gstdsexample , run its makefile which copies the shared lib generated to /opt/nvidia/deepstream/lib/gst-plugins and then try to run the sample app given in the deepstream sdk. Will the plugin automatically get detected via the sample-app or am I missing some steps inbetween ?

Yes, also you can add the path by setting the GST_PLUGIN_PATH like:

export GST_PLUGIN_PATH=$Your_usr/lib/x86_64-linux-gnu/gstreamer-1.0_path