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
other

Target Operating System
Linux
QNX
other

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

SDK Manager Version
1.7.1.8928
other

Host Machine Version
native Ubuntu 18.04
other

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?