pub unsafe trait AVCaptureFileOutputRecordingDelegate: NSObjectProtocol {
// Provided methods
unsafe fn captureOutput_didStartRecordingToOutputFileAtURL_fromConnections(
&self,
output: &AVCaptureFileOutput,
file_url: &NSURL,
connections: &NSArray<AVCaptureConnection>,
)
where Self: Sized + Message { ... }
unsafe fn captureOutput_didStartRecordingToOutputFileAtURL_startPTS_fromConnections(
&self,
output: &AVCaptureFileOutput,
file_url: &NSURL,
start_pts: CMTime,
connections: &NSArray<AVCaptureConnection>,
)
where Self: Sized + Message { ... }
unsafe fn captureOutput_didPauseRecordingToOutputFileAtURL_fromConnections(
&self,
output: &AVCaptureFileOutput,
file_url: &NSURL,
connections: &NSArray<AVCaptureConnection>,
)
where Self: Sized + Message { ... }
unsafe fn captureOutput_didResumeRecordingToOutputFileAtURL_fromConnections(
&self,
output: &AVCaptureFileOutput,
file_url: &NSURL,
connections: &NSArray<AVCaptureConnection>,
)
where Self: Sized + Message { ... }
unsafe fn captureOutput_willFinishRecordingToOutputFileAtURL_fromConnections_error(
&self,
output: &AVCaptureFileOutput,
file_url: &NSURL,
connections: &NSArray<AVCaptureConnection>,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn captureOutput_didFinishRecordingToOutputFileAtURL_fromConnections_error(
&self,
output: &AVCaptureFileOutput,
output_file_url: &NSURL,
connections: &NSArray<AVCaptureConnection>,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
}AVCaptureFileOutput only.Expand description
Defines an interface for delegates of AVCaptureFileOutput to respond to events that occur in the process of recording a single file.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn captureOutput_didStartRecordingToOutputFileAtURL_fromConnections(
&self,
output: &AVCaptureFileOutput,
file_url: &NSURL,
connections: &NSArray<AVCaptureConnection>,
)
Available on crate features AVCaptureOutputBase and AVCaptureSession only.
unsafe fn captureOutput_didStartRecordingToOutputFileAtURL_fromConnections( &self, output: &AVCaptureFileOutput, file_url: &NSURL, connections: &NSArray<AVCaptureConnection>, )
AVCaptureOutputBase and AVCaptureSession only.Informs the delegate when the output has started writing to a file.
Parameter output: The capture file output that started writing the file.
Parameter fileURL: The file URL of the file that is being written.
Parameter connections: An array of AVCaptureConnection objects attached to the file output that provided the data that is being written to the file.
This method is called when the file output has started writing data to a file. 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: will always be called, even if no data is written.
Clients should not assume that this method will be called on a specific thread, and should also try to make this method as efficient as possible.
Sourceunsafe fn captureOutput_didStartRecordingToOutputFileAtURL_startPTS_fromConnections(
&self,
output: &AVCaptureFileOutput,
file_url: &NSURL,
start_pts: CMTime,
connections: &NSArray<AVCaptureConnection>,
)
Available on crate features AVCaptureOutputBase and AVCaptureSession and objc2-core-media only.
unsafe fn captureOutput_didStartRecordingToOutputFileAtURL_startPTS_fromConnections( &self, output: &AVCaptureFileOutput, file_url: &NSURL, start_pts: CMTime, connections: &NSArray<AVCaptureConnection>, )
AVCaptureOutputBase and AVCaptureSession and objc2-core-media only.Informs the delegate when the output has started writing to a file.
Parameter output: The capture file output that started writing the file.
Parameter fileURL: The file URL of the file that is being written.
Parameter startPTS: The timestamp of the first buffer written to the file, synced with AVCaptureSession.synchronizationClock
Parameter connections: An array of AVCaptureConnection objects attached to the file output that provided the data that is being written to the file.
This method is called when the file output has started writing data to a file. 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: will always be called, even if no data is written.
If this method is implemented, the alternative delegate callback -captureOutput:didStartRecordingToOutputFileAtURL:fromConnections will not be called.
Clients should not assume that this method will be called on a specific thread, and should also try to make this method as efficient as possible.
Sourceunsafe fn captureOutput_didPauseRecordingToOutputFileAtURL_fromConnections(
&self,
output: &AVCaptureFileOutput,
file_url: &NSURL,
connections: &NSArray<AVCaptureConnection>,
)
Available on crate features AVCaptureOutputBase and AVCaptureSession only.
unsafe fn captureOutput_didPauseRecordingToOutputFileAtURL_fromConnections( &self, output: &AVCaptureFileOutput, file_url: &NSURL, connections: &NSArray<AVCaptureConnection>, )
AVCaptureOutputBase and AVCaptureSession only.Called whenever the output is recording to a file and successfully pauses the recording at the request of the client.
Parameter output: The capture file output that has paused its file recording.
Parameter fileURL: The file URL of the file that is being written.
Parameter connections: An array of AVCaptureConnection objects attached to the file output that provided the data that is being written to the file.
Delegates can use this method to be informed when a request to pause recording is actually respected. It is safe for delegates to change what the file output is currently doing (starting a new file, for example) from within this method. If recording to a file is stopped, either manually or due to an error, this method is not guaranteed to be called, even if a previous call to pauseRecording was made.
Clients should not assume that this method will be called on a specific thread, and should also try to make this method as efficient as possible.
Sourceunsafe fn captureOutput_didResumeRecordingToOutputFileAtURL_fromConnections(
&self,
output: &AVCaptureFileOutput,
file_url: &NSURL,
connections: &NSArray<AVCaptureConnection>,
)
Available on crate features AVCaptureOutputBase and AVCaptureSession only.
unsafe fn captureOutput_didResumeRecordingToOutputFileAtURL_fromConnections( &self, output: &AVCaptureFileOutput, file_url: &NSURL, connections: &NSArray<AVCaptureConnection>, )
AVCaptureOutputBase and AVCaptureSession only.Called whenever the output, at the request of the client, successfully resumes a file recording that was paused.
Parameter output: The capture file output that has resumed its paused file recording.
Parameter fileURL: The file URL of the file that is being written.
Parameter connections: An array of AVCaptureConnection objects attached to the file output that provided the data that is being written to the file.
Delegates can use this method to be informed when a request to resume recording is actually respected. It is safe for delegates to change what the file output is currently doing (starting a new file, for example) from within this method. If recording to a file is stopped, either manually or due to an error, this method is not guaranteed to be called, even if a previous call to resumeRecording was made.
Clients should not assume that this method will be called on a specific thread, and should also try to make this method as efficient as possible.
Sourceunsafe fn captureOutput_willFinishRecordingToOutputFileAtURL_fromConnections_error(
&self,
output: &AVCaptureFileOutput,
file_url: &NSURL,
connections: &NSArray<AVCaptureConnection>,
error: Option<&NSError>,
)
Available on crate features AVCaptureOutputBase and AVCaptureSession only.
unsafe fn captureOutput_willFinishRecordingToOutputFileAtURL_fromConnections_error( &self, output: &AVCaptureFileOutput, file_url: &NSURL, connections: &NSArray<AVCaptureConnection>, error: Option<&NSError>, )
AVCaptureOutputBase and AVCaptureSession only.Informs the delegate when the output will stop writing new samples to a file.
Parameter output: The capture file output that will finish writing the file.
Parameter fileURL: The file URL of the file that is being written.
Parameter connections: An array of AVCaptureConnection objects attached to the file output that provided the data that is being written to the file.
Parameter error: An error describing what caused the file to stop recording, or nil if there was no error.
This method is called when the file output will stop recording new samples to the file at outputFileURL, 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 will be nil). This method will always be called for each recording request, even if no data is successfully written to the file.
Clients should not assume that this method will be called on a specific thread, and should also try to make this method as efficient as possible.
Sourceunsafe fn captureOutput_didFinishRecordingToOutputFileAtURL_fromConnections_error(
&self,
output: &AVCaptureFileOutput,
output_file_url: &NSURL,
connections: &NSArray<AVCaptureConnection>,
error: Option<&NSError>,
)
Available on crate features AVCaptureOutputBase and AVCaptureSession only.
unsafe fn captureOutput_didFinishRecordingToOutputFileAtURL_fromConnections_error( &self, output: &AVCaptureFileOutput, output_file_url: &NSURL, connections: &NSArray<AVCaptureConnection>, error: Option<&NSError>, )
AVCaptureOutputBase and AVCaptureSession only.Informs the delegate when all pending data has been written to an output file.
Parameter output: The capture file output that has finished writing the file.
Parameter outputFileURL: The file URL of the file that has been written.
Parameter connections: An array of AVCaptureConnection objects attached to the file output that provided the data that was written to the file.
Parameter error: An error describing what caused the file to stop recording, or nil if there was no error.
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 will be nil). This method will always be called for each recording request, even if no data is successfully written to the file.
Clients should not assume that this method will be called on a specific thread.
Delegates are required to implement this method.