views:

81

answers:

3

Hello All,

I was wondering if anyone anywhere had an example of an AVCapture session using AVCaptureVideoDataOutput working -- I am using the default CMSampleBuffer from the AVFoundation data output callback method - but when I save it to camera roll it is all black except the last 5 frames which I have to manually scrub to :S

any help in regards to my issue would be greatly appreciated.

Cheers,

Michael

+1  A: 

Download WWDC Session videos, http://tuvix.apple.com/videos/wwdc/2010/

Session 409 - Using Camera with AV Foundation contains great introduction to use AVCapture.

Bolek Tekielski
Thankyou so very much >_< -- I can't believe I never thought to look through them :D
Michael O'Brien
A: 

Yes. Take a look at this: http://www.benjaminloulier.com/posts/2-ios4-and-direct-access-to-the-camera

Pinhassi
I probably should have marked this as answered as I fixed the issue a while ago. Also - fyi - that example you led to is not appropriate for saving to video files - thankyou for the response though :)
Michael O'Brien
A: 

I re-wrote the entire thing to use a AVAssetWriterPixelBufferAdaptor and a series of image editing/drawing functions I wrote to achieve my overlaying goals. I will post a tutorial as soon as I get a spare weekend ;)

Michael O'Brien