Breaking down your statement we get:
let obj = NSNumber(integer: kCMPixelFormat_32BGRA)
let key = kCVPixelBufferPixelFormatTypeKey
var rgbOutputSettings : NSDictionary = NSDictionary(object: obj, forKey: key)
The problem is that kCVPixelBufferPixelFormatTypeKey
can be of more that a single type. Quoting the documentation (emphasis mine):
kCVPixelBufferPixelFormatTypeKey:
The pixel format for this buffer (type CFNumber, or type CFArray containing an array of CFNumber types (actually type OSType)).
I've converted into String to make it compile:
let key: String = kCVPixelBufferPixelFormatTypeKey as String
Maybe that's not want you need, if you need to achieve something like this