When I stop recording video manually, using stopRecording() method of an instance of AVCaptureMovieFileOutput, it will call fileOutput(_:didFinishRecordingTo:from:error:) delegate method of AVCaptureFileOutputRecordingDelegate. But when I stop video automatically using maxRecordedDuration, the captureOutput(captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error:) delegate method will be called, that I couldn't find this method documentation on developer.apple.com website.
Also there is another method capture(_:didFinishRecordingToOutputFileAt:fromConnections:error:).
On AVCaptureFileOutputRecordingDelegate documentation there is only fileOutput methods and there is nothing about captureOutput or capture methods.
Is there a method that I handle the output file in it and will be called in any situations? so that I can handle the output in just one method.
I am not sure though it may be swift-api translation error. Some AVFoundation API have strange obj-c to swift api assignment.
From header file AVCaptureFileOutputRecordingDelegate has:
Swift api counterpart is:
I noticed both are different from your comment. Swift api correction may occure on SDK update. I recommend you to check SDK directory if it is SDK error.