Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVCaptureSession pause?

I am using the AV Foundation for capturing images continuously after Apple released iOS 4.0 by following the codes given by, http://developer.apple.com/iphone/library/qa/qa2010/qa1702.html

However, when I call "[session startRunning];" it takes around 1-2 seconds to start the camera preview. So, this is frustrating to the end user as he needs to wait for some time.

Is there a way to Pause the session instead of stopping it since I can init the session at program launch and keep it pause until user navigates to the camera screen and start running it there ? Thanks for any help.

like image 502
chathuram Avatar asked Sep 02 '10 07:09

chathuram


1 Answers

Instead of pausing your session you can rather disable input connection.

e.g.

<your_video_preview_layer>.connection.enabled = NO;

so that it will not consume the data from the input device.

Hope this is what you're looking for.

like image 173
Eugene Dudnyk Avatar answered Sep 22 '22 10:09

Eugene Dudnyk