I'm using AVCaptureView to record videos and all works well when the record button is hit the first time. Able to record video and save it on disk after the recording ends. At this time though, I am not able to restart a second recording. The record button appears as the stop record button (instead of start record). The code is pretty straightforward
- (void)captureView:(AVCaptureView *)captureView startRecordingToFileOutput:(AVCaptureFileOutput *)fileOutput {
NSLog(@"started recording");
[VideoCaptureView.fileOutput startRecordingToOutputFileURL:_outputURL recordingDelegate:self];
}
- (void) captureOutput: (AVCaptureFileOutput *) captureOutput didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL fromConnections:(NSArray *)connections error:(NSError *)error {
NSLog(@"didFinishRecordingToOutputFileAtURL");
BOOL recordedSuccessfully = YES;
if ([error code] != noErr){
id value = [[error userInfo] objectForKey:AVErrorRecordingSuccessfullyFinishedKey];
NSLog(@"recording value %@", value);
if (value){
recordedSuccessfully = [value boolValue];
}
}
if (recordedSuccessfully){
NSLog(@"recorded Successfully");
At the end of this routine, I get the message 'recorded successfully' but the record button is not enabled.
Do I need to manually release the session or something so I can reset the view?