【发布时间】:2016-07-26 13:59:03
【问题描述】:
我正在尝试从 CMSampleBufferRef 检索 CVPixelBufferRef,以更改 CVPixelBufferRef 以动态覆盖水印。
我正在使用CMSampleBufferGetImageBuffer(sampleBuffer) 来实现这一目标。我正在打印返回的 CVPixelBufferRef 的结果,但它始终为空。
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {
CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
NSLog(@"PixelBuffer %@",pixelBuffer);
...
}
我还有什么遗漏的吗?
【问题讨论】:
标签: avfoundation cmsamplebufferref