3
我想从CMSampleBufferRef中检索一个CVPixelBufferRef,以便改变CVPixelBufferRef来动态覆盖水印。CMSampleBufferGetImageBuffer返回null
我正在使用CMSampleBufferGetImageBuffer(sampleBuffer)
来实现此目的。我打印返回的CVPixelBufferRef的结果,但它始终为空。
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {
CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
NSLog(@"PixelBuffer %@",pixelBuffer);
...
}
我有什么我失踪?