2013-11-22 95 views

回答

0

對不起,我沒有注意到。看到編輯的答案,也許你覺得它很有用。

- (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 ]; 
    }