This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public func CVPixelBufferGetPixelFormatName(pixelBuffer: CVPixelBuffer) -> String { | |
let p = CVPixelBufferGetPixelFormatType(pixelBuffer) | |
switch p { | |
case kCVPixelFormatType_1Monochrome: return "kCVPixelFormatType_1Monochrome" | |
case kCVPixelFormatType_2Indexed: return "kCVPixelFormatType_2Indexed" | |
case kCVPixelFormatType_4Indexed: return "kCVPixelFormatType_4Indexed" | |
case kCVPixelFormatType_8Indexed: return "kCVPixelFormatType_8Indexed" | |
case kCVPixelFormatType_1IndexedGray_WhiteIsZero: return "kCVPixelFormatType_1IndexedGray_WhiteIsZero" | |
case kCVPixelFormatType_2IndexedGray_WhiteIsZero: return "kCVPixelFormatType_2IndexedGray_WhiteIsZero" | |
case kCVPixelFormatType_4IndexedGray_WhiteIsZero: return "kCVPixelFormatType_4IndexedGray_WhiteIsZero" |