Reputation: 6477
I have the following code to determine ProRes and HDR support on iOS devices:
extension AVCaptureDevice.Format {
var supports10bitHDR:Bool {
let mediaType = CMFormatDescriptionGetMediaType(formatDescription)
let mediaSubtype = CMFormatDescriptionGetMediaSubType(formatDescription)
return mediaType == kCMMediaType_Video && mediaSubtype == kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange
}
var supportsProRes422:Bool {
let mediaType = CMFormatDescriptionGetMediaType(formatDescription)
let mediaSubtype = CMFormatDescriptionGetMediaSubType(formatDescription)
return (mediaType == kCMMediaType_Video && (mediaSubtype == kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange))
}
}
However, on iPad Pro with M2 chip, supportsProRes422
is returning false for every format in array device.formats
(for the default wide angle camera). Is this an AVFoundation bug or something intentional? How do I enable ProRes recording on iPad Pro M2 device?
Upvotes: 2
Views: 171