Closed wuyy closed 3 years ago
It still works for me.Xcode 12
I have the same issue. Just updated to Xcode 12.
Error building for iOS, no error building MacOS. FilterShowcase iOS example project will demonstrate the error.
It should be a bug of AVFoundation iOS 14 Simulator framework. Use iOS Device.
Or use [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange] for iOS simulator. iOS 13.7 iPhone 11 simulator works for me.
if captureAsYUV {
supportsFullYUVRange = false
#if targetEnvironment(simulator)
let supportedPixelFormats = [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange]
#else
let supportedPixelFormats = videoOutput.availableVideoPixelFormatTypes
#endif
for currentPixelFormat in supportedPixelFormats {
if ((currentPixelFormat as NSNumber).int32Value == Int32(kCVPixelFormatType_420YpCbCr8BiPlanarFullRange)) {
supportsFullYUVRange = true
}
}
...
What should I replace this property?