IPhone : is zooming possible while recording video in avfoundation?

on Saturday, February 21, 2015

I have been working with avfoundation and trying to zoom the video and record or zooming while recording by following code



[CaptureSession startRunning];
NSError *error;
[VideoDevice lockForConfiguration:&error];
[VideoDevice setActiveFormat:[VideoDevice.formats objectAtIndex:15]];
[VideoDevice rampToVideoZoomFactor:5.0 withRate:1.0];
[VideoDevice unlockForConfiguration];


and when I call



[MovieFileOutput startRecordingToOutputFileURL:outputURL recordingDelegate:self];


it is throwing



[AVCaptureMovieFileOutput startRecordingToOutputFileURL:recordingDelegate:] - no active/enabled connections.'


If I just take a still image then the zoom is working and I can capture still image but I can not only capture video after zooming or zooming while recording.


From this should I infer that still video zooming is not supported by IOS ?


Also I think when I change the video active format which support zoom, it causes the crash, though I am using



[CaptureSession setSessionPreset:AVCaptureSessionPresetHigh];


in my configuration.


Please advice!


0 comments:

Post a Comment