Can you please provide sample C/C++ code for CSI/MIPI based Camera using Deep stream

For CPU only case, please make sure whether the camera supports V4L2.

This is different case. Please check how to set up camera with Jetson Camera Software Development Solution — Jetson Linux Developer Guide documentation (nvidia.com)

For nvargcamerasrc please refer to Accelerated GStreamer — Jetson Linux Developer Guide documentation (nvidia.com)

For v4l2src, plesae refer to DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums