StreamModerator
public class StreamModerator : NSObject
A content moderator for video streams, e.g. the frames captured from device cameras.
Create one from a Moderator
instance using Moderator.createStreamModerator(...)
.
-
Represents when to give the
StreamModeratorDelegate
a new result.Default is
See moredecisionChanged
.Declaration
Swift
public enum NewResultStrategy
-
A delegate must be set to receive results.
Declaration
Swift
public weak var delegate: StreamModeratorDelegate?
-
Resets the statistics used to provide
inputFramesPerSecond
andprocessedFramesPerSecond
.This should be called when starting/resuming a capture session.
Declaration
Swift
public func resetFPSStats()
-
The FPS being consumed by the moderator.
Declaration
Swift
public var inputFramesPerSecond: Float { get }
-
The FPS being moderated, i.e. not dropped, by the moderator.
On low-powered devices, this may fall below the
inputFramesPerSecond
.Declaration
Swift
public var processedFramesPerSecond: Float { get }
-
Pass all stream frames to this method for moderation.
Declaration
Swift
public func process(frame: CVPixelBuffer)