Capturing video with opencv to use in jetson-inference

i need to use cv::videocapture to capture the video from the camera and use it with the jetson-inference library. i am coding in cpp

Please reference to below sample.