I have found great use of the RosyWriter example that Apple created, that allows you to capture video going through a GLSL layer from this link.
I want to extend it a bit by letting me capture not just videos, but also photos as well. Using the same capture session, same video settings, same resolution etc. (Essentially just capturing a single frame of video into a image)
It should be straight forward, but i can't seem to find where I need to grab the buffer from and save to the Photolibrary.
From what i understand i can use the delegate:
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection "
But I have not had any success doing it. Can anyone point me in the right direction?