我正在尝试从样本缓冲区中获取图像,但该方法甚至没有触发。我做错了吗?
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
fromConnection:(AVCaptureConnection *)connection {
NSLog(@"Sample Buffered");
CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
IOSurfaceRef surface = CVPixelBufferGetIOSurface(imageBuffer);
CIImage* ciImage = [[CIImage alloc] initWithIOSurface:surface];
}