Use OpenCV library to read image from webcam and use pyzbar to decode QR Code/Barcode from image.
OpenCV 4.1 has QRCodeDetector but can only detect 1 QR Code from image.
pyzbar can detect both QR Code and Barcode and return the code type as well.