I am trying to set the Pixel format type on an AVCaptureConnection but it terminates for all the RGB settings but works for the kCVPixelFormatType_32BGRA.
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '*** -[AVCaptureVideoDataOutput setVideoSettings:] Unsupported
pixel format type - use -availableVideoCVPixelFormatTypes'
The code that produces this error is this:
let settings: [AnyHashable: Any] = [kCVPixelBufferPixelFormatTypeKey as AnyHashable: kCVPixelFormatType_30RGB]
output.videoSettings = settings as! [String : Any]