获取AvCaptureVideoDataOutput的实际NSString availableVideoCVPixelFormatTypes [英] Getting actual NSString of AvCaptureVideoDataOutput availableVideoCVPixelFormatTypes
问题描述
我试图在AVFoundation输出上找到接受的格式:
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我明白了:
(NSArray *) $5 = 0x2087ad00 <__NSArrayM 0x2087ad00>(
875704438,
875704422,
1111970369
)
如何获取字符串值这些格式类型?
How do I get the string values of these format types?
谢谢
推荐答案
在运行iOS6的iPhone5上,这里是AVCaptureVideoDataOuput availableVideoCVPixelFormatTypes:
On an iPhone5 running iOS6, here are the AVCaptureVideoDataOuput availableVideoCVPixelFormatTypes:
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
kCVPixelFormatType_32BGRA
kCVPixelFormatType_32BGRA
信用到期的信用,我找到了一种方法来获得这里支持的价值。
https://gist.github.com/2327666
Credit where credit is due, I found a way to get the value supported here. https://gist.github.com/2327666
这篇关于获取AvCaptureVideoDataOutput的实际NSString availableVideoCVPixelFormatTypes的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!