when i print something in didOutputSampleBuffer, everything is OK, but when i append sampleBuffer to an array, camera preview is freezing, anyone can help me?
func didOutputSampleBuffer(sampleBuffer: CMSampleBuffer!) {
if shootingTag {
dispatch_async(dispatch_get_main_queue(), { () -> Void in
self.recordSampleBuffers.append(sampleBuffer)
})
}
}
I need to work with samplebuffer directly, so i add a function in GPUImageVideoCameraDelegate,
and change this:
when i print something in didOutputSampleBuffer, everything is OK, but when i append sampleBuffer to an array, camera preview is freezing, anyone can help me?