Modernization and bug fixing of Apple's AVCam sample project