Runtime Configuration Changes for Gst-nvdsanalytics Plugin Settings

Here is sample code for modifying nvdsanalytics 's ROI at runtime.

1. modify plugin
please refer to gst-nvdsanalytics.diff (3.9 KB). add a new property “reload-cfg” for plugin. when it is set to 1. nvdsanalytics will reload once the configuration file in function gst_nvdsanalytics_transform_ip, meanwhile nvdsanalytics will recreate low level analysis instance NvDsAnalyticCtx. you need to rebuild nvdsanalytics plugin, and replace /opt/nvidia/deepstream/deepstream/lib/gst-plugins/libnvdsgst_dsanalytics.so with the new so.
2. modify application
please refer to test5.diff (1.4 KB), the application will set property reload-cfg to 1 after 20 seconds.
3. test
start the test5, then modify the configurations in config_nvdsanalytics.txt.

1 Like