我不知道用于获取原始YUV420p数据的值。首先是以下代码:
AVCaptureVideoDataOutput *output = [[AVCaptureVideoDataOutput alloc] init];
output.alwaysDiscardsLateVideoFrames = YES;
output.videoSettings = @{(id)kCVPixelBufferPixelFormatTypeKey: [NSNumber numberWithUnsignedInt:kCVPixelFormatType_420YpCbCr8BiPlanarFullRange]};
//output.videoSettings = @{(id)kCVPixelBufferPixelFormatTypeKey: [NSNumber numberWithUnsignedInt:kCVPixelFormatType_32BGRA]};
dispatch_queue_t queue;
queue = dispatch_queue_create("CameraQueue", NULL);
[output setSampleBufferDelegate:self queue:queue];
[session addOutput:output];
我注意到kCVPixelFormatType有一些值,有人知道哪个值对于获取原始YUV420p数据是正确的吗?
kCVPixelFormatType_420YpCbCr8Planar
kCVPixelFormatType_420YpCbCr8PlanarFullRange
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
可以是其中之一吗?