iosnsstringavcapturesessionavcaptureavcapturemoviefileoutput

Getting actual NSString of AvCaptureVideoDataOutput availableVideoCVPixelFormatTypes


I am trying to find the accepted formats on an AVFoundation output:

self.theOutput=[[AVCaptureVideoDataOutput alloc]init];
    if ([self.theSession canAddOutput:self.theOutput])
        [self.theSession addOutput:self.theOutput]; 

I am then inserting a breakpoint right after and:

po [self.theOutput availableVideoCVPixelFormatTypes]

and I get this:

(NSArray *) $5 = 0x2087ad00 <__NSArrayM 0x2087ad00>(
875704438,
875704422,
1111970369
)

How do I get the string values of these format types?

Thanks


Solution

  • On an iPhone5 running iOS6, here are the AVCaptureVideoDataOuput availableVideoCVPixelFormatTypes:

    kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange

    kCVPixelFormatType_420YpCbCr8BiPlanarFullRange

    kCVPixelFormatType_32BGRA

    Credit where credit is due, I found a way to get the value supported here. https://gist.github.com/2327666