How to read h264 stream for DeepStream SDK sample projects?

At present, the deep stream SDK sample codes work only for video files, but not for streaming from the webcam.
Is there any quick trick to make sample code to work for Video Stream from the WebCam?

  1. We are using c920 Logitech webcam
  2. The sample code we are interested in nvDecInfer_detection in the SDK folder

We have posted similar question in this link - https://stackoverflow.com/questions/49135496/how-to-read-h264-stream-as-a-file-from-the-usb-webcam-directly-in-c-without-us

I am also struggling on the same issue, tried to change the parameters to use the webcam, just getting error and aborting the application. Only works for recorded video from disk.
+1

Also, following,