So, we are capturing frames by starting a AVCaptureVideoDataOutput session. In the capture function
func captureOutput(_ output: AVCaptureOutput, didOutput s