Error in running drivenet model using usb camera

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version

Target Operating System

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version

Host Machine Version
native Ubuntu 18.04

Drivenet sample has code functional for gmsl camera. I have changed the params protocol to usb camera but there are problems arising in the onProcess() function . Conversion of input file type to the file type that is compatible with the Drivenet code.

It would be helpful if you could recommend the changes to be made in the original drivenet sample code.

Dear @SinisterSirohi,
Could you please attach your code snippet to get more details about the error?