AVCaptureFileOutputRecordingDelegate Protocol Reference

Adopted by
Delegate of an AVCaptureAudioDataOutput object.
Conforms to
Framework
/System/Library/Frameworks/AVFoundation.framework/
Availability
Available in iOS 4.0 and later.
Declared in
AVCaptureOutput.h

Overview

Defines an interface for delegates of AVCaptureFileOutput to respond to events that occur in the process of recording a single file.

The delegate of an AVCaptureFileOutput object must adopt the AVCaptureFileOutputRecordingDelegate protocol.

Tasks

Delegate Methods

Instance Methods

captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error:

Informs the delegate when all pending data has been written to an output file. (required)

- (void)captureOutput:(AVCaptureFileOutput *)captureOutput didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL fromConnections:(NSArray *)connections error:(NSError *)error
Parameters
captureOutput

The capture file output that has finished writing the file.

outputFileURL

The file URL of the file that is being written.

connections

An array of AVCaptureConnection objects attached to the file output that provided the data that is being written to the file.

error

If the file was not written successfully, an error object that describes the problem; otherwise nil.

Discussion

This method is called whenever a file is finished. If the file was forced to be finished due to an error, the error is described in the error parameter—otherwise, the error parameter is nil.

This method is called when the file output has finished writing all data to a file whose recording was stopped, either because startRecordingToOutputFileURL:recordingDelegate: or stopRecording were called, or because an error (described by the error parameter), occurred (if no error occurred, the error parameter is nil).

This method is always called for each recording request, even if no data is successfully written to the file.

You should not assume that this method will be called on a specific thread.

Availability
  • Available in iOS 4.0 and later.
Declared In
AVCaptureOutput.h

captureOutput:didStartRecordingToOutputFileAtURL:fromConnections:

Informs the delegate when the output has started writing to a file.

- (void)captureOutput:(AVCaptureFileOutput *)captureOutput didStartRecordingToOutputFileAtURL:(NSURL *)fileURL fromConnections:(NSArray *)connections
Parameters
captureOutput

The capture file output that started writing the file.

fileURL

The file URL of the file that is being written.

connections

An array of AVCaptureConnection objects attached to the file output that provided the data that is being written to the file.

Discussion

If an error condition prevents any data from being written, this method may not be called. captureOutput:willFinishRecordingToOutputFileAtURL:fromConnections:error: and captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error: are always called, even if no data is written.

You should not assume that this method will be called on a specific thread, and should make this method as efficient as possible.

Availability
  • Available in iOS 4.0 and later.
Declared In
AVCaptureOutput.h