0
如何使從幀電影 -captureOutput捕獲:didOutputSampleBuffer:fromConnection 並保存到照片庫?使從captureOutput捕獲幀視頻:didOutputSampleBuffer:fromConnection
謝謝。
如何使從幀電影 -captureOutput捕獲:didOutputSampleBuffer:fromConnection 並保存到照片庫?使從captureOutput捕獲幀視頻:didOutputSampleBuffer:fromConnection
謝謝。
對不起,我沒有注意到。看到編輯的答案,也許你覺得它很有用。
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {
CVPixelBufferRef pixelBuffer = (CVPixelBufferRef) CMSampleBufferGetImageBuffer(sampleBuffer);
CIImage *image = [CIImage imageWithCVPixelBuffer:pixelBuffer];
[_coreImageContext drawImage:image inRect:[image extent] fromRect:[image extent]];
[_context presentRenderbuffer:GL_RENDERBUFFER ];
}