CSI camera instead of rtsp or file in ‘‘deepstream-nvdsanalytics-test’’

Hi, I am working on Jetson nano, with deepstream 5.0, jetpack 4.4 dp, tensorrt 7.1.

I would like to be able to feed the inference, tracking and counting pipeline of the ‘‘deepstream-nvdsanalytics-test’’ C++ app with a CSI camera instead of the native RTSP support or local video files. How can I modify the original C++ program ? Could it read a kind of [source0] … in the config file.txt such as some of the other sample apps ? Thanks

Duplicated with Deepstream 5.0 adding CSI camera support in C++ in the deepstream-nvdsanalytics-test app