,
것은 동영상 파일로 저장 :
당신은 AVCaptureMovieFileOutput 객체를 사용하여 파일에 동영상 데이터를 저장합니다. (AVCaptureMovieFileOutput은 기본 동작의 대부분을 정의하는 AVCaptureFileOutput의 구체적인 하위 클래스입니다.) 최대 녹화 지속 시간 또는 최대 파일 크기와 같은 동영상 파일 출력의 다양한 측면을 구성 할 수 있습니다. 주어진 디스크 공간보다 적은 공간이 남아 있으면 녹음을 금지 할 수도 있습니다. didFinishRecordingToOutputFileAtURL : fromConnections 다음 captureOutput의 구현에서
AVCaptureMovieFileOutput *aMovieFileOutput = [[AVCaptureMovieFileOutput alloc] init];
CMTime maxDuration = <#Create a CMTime to represent the maximum duration#>;
aMovieFileOutput.maxRecordedDuration = maxDuration;
aMovieFileOutput.minFreeDiskSpaceLimit = <#An appropriate minimum given the quality of the movie format and the duration#>;
The resolution and bit rate for the output depend on the capture session’s sessionPreset. The video encoding is typically H.264 and audio encoding is typically AAC. The actual values vary by device.*
AVCaptureMovieFileOutput *aMovieFileOutput = <#Get a movie file output#>;
NSURL *fileURL = <#A file URL that identifies the output location#>;
[aMovieFileOutput startRecordingToOutputFileURL:fileURL recordingDelegate:<#The delegate#>];
대리인 :, 오류가 카메라 롤 앨범에 결과 동영상을 작성할 수 있습니다. 또한 발생할 수있는 오류를 확인해야합니다.