BradLarson / GPUImage2

GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing.
BSD 3-Clause "New" or "Revised" License
4.85k stars 605 forks source link

Value of type 'AVCaptureVideoDataOutput' has no member 'availableVideoPixelFormatTypes' after update Xcode12 #321

Closed wuyy closed 3 years ago

wuyy commented 3 years ago

What should I replace this property?

75DEDE51-E27D-4070-84C6-2B07ABF8847C

Darwel commented 3 years ago

It still works for me.Xcode 12

geoffhufford commented 3 years ago

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.

Darwel commented 3 years ago

It should be a bug of AVFoundation iOS 14 Simulator framework. Use iOS Device.

Darwel commented 3 years ago

Or use [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange] for iOS simulator. iOS 13.7 iPhone 11 simulator works for me.

babucha commented 3 years ago
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
                }
            }

...