1

-captureOutput:didOutputSampleBuffer:fromConnection でキャプチャされたフレームからムービーを作成し、フォト ライブラリに保存する方法は?

ありがとうございました。

4

1 に答える 1

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 ];
    }
于 2013-11-22T15:14:56.357 に答える