processSurface(_:outSurface:timestamp:options:)
Processes a surface by analyzing pixels for sequences of flashing lights and mitigates them by dimming the content.
Declaration
func processSurface(_ inSurface: IOSurfaceRef, outSurface: inout IOSurfaceRef, timestamp: CFAbsoluteTime, options: [MAFlashingLightsProcessor.OptionKey : Any]? = nil) -> MAFlashingLightsProcessor.ResultParameters
- inSurface:
The input Iosurfaceref to process for flashing lights.
- outSurface:
The output Iosurfaceref for storing the mitigated video frame. This is the surface to display to the user.
- timestamp:
The time when your app displays the video frame to the user. The flashing lights processor uses the timestamp to determine the video’s real-time frame rate for the detection algorithm.
- options:
An options dictionary for additional parameters.
Return Value
An MAFlashingLightsProcessor.Result object that indicates whether the processor successfully processed the input surface, the intensity of flashing lights in the input surface, and the amount of mitigation in the output surface.