By Zmicier
on Wed, 06/20/2012 - 17:07
Greetings!
I want to record video from camera for further processing while tracking image with QCAR Tracker (my purpose is to capture video separately from AR overlay). Having no control over QCAR CameraDevice inputs, I am creating my own AVCaptureSession like this:
self.captureSession = [[AVCaptureSession alloc] init];
self.captureSession.sessionPreset = AVCaptureSessionPresetHigh;
AVCaptureDeviceInput *videoInput = [AVCaptureDeviceInput deviceInputWithDevice:[AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo] error:NULL];
if ([self.captureSession canAddInput:videoInput]) {
[self.captureSession addInput:videoInput];
}
self.movieFileOutput = [[AVCaptureMovieFileOutput alloc] init];
if ([self.captureSession canAddOutput:self.movieFileOutput]) {
[self.captureSession addOutput:self.movieFileOutput];
}
[self.captureSession startRunning];
But it seems that CameraDevice just doesn't work along with AVCaptureSession - when one starts running the other immediately gets stuck (reproduced on iPhone3GS with iOS5.0 and iPhone4S with iOS5.0.1).
I can retrieve images from camera with AVCaptureSession using AVCaptureVideoDataOutputSampleBufferDelegate. Is there any way to pass them to Tracker directly without using CameraDevice (just like some other AR tracking libraries allow)?
Thank you in advance,
Zmicier Predka
Re: CameraDevice and AVCaptureSession
Re: CameraDevice and AVCaptureSession
Re: CameraDevice and AVCaptureSession
Re: CameraDevice and AVCaptureSession
Re: CameraDevice and AVCaptureSession
Re: CameraDevice and AVCaptureSession
Re: CameraDevice and AVCaptureSession
Re: CameraDevice and AVCaptureSession