pub type SCVideoStreamAnalysisChangeHandler = *mut DynBlock<dyn Fn(*mut SCSensitivityAnalysis, *mut NSError)>;Available on crate features
SCSensitivityAnalysis and SCVideoStreamAnalyzer and block2 only.Expand description
A handler your app provides to receive video-stream analysis results.
Your app implements this handler and the framework calls it when the analyzer’s video stream detects sensitive content, or an error providing corresponding analysis, or error as input parameters.
This handler receives an instance of SCSensitivityAnalysis, and an
<doc
://com.apple.documentation/documentation/swift/error>, for example:
analyzer.analysisChangedHandler = { analysis, error in
self.analysis = analysis
if analysis.shouldInterruptVideo {
// ...
}
if analysis.shouldIndicateSensitivity {
// ...
}
if analysis.shouldMuteAudio {
// ...
}
}See also Apple’s documentation