SinchVideoFrameCallback

public protocol SinchVideoFrameCallback : AnyObject

Protocol that should be adopted by video frame callback

  • Callback handler that can be used to post-process video frames.

    Important

    The callback handler implementation must retain the input CVPixelBuffer object using CVPixelBufferRetain, and release it after invoking the completion handler, using CVPixelBufferRelease.

    Important

    Invoking the completionHandler is mandatory.

    Declaration

    Swift

    typealias OnFrameCompletionHandler = (_ buffer: CVPixelBuffer) -> Void

    Parameters

    cvPixelBuffer

    The raw video frame buffer.

    completionHandler

    Completion handler block, to be invoked with processed output pixel buffer as argument.

  • Undocumented

    Declaration

    Swift

    func onFrame(_ cvPixelBuffer: CVPixelBuffer, completionHandler: @escaping OnFrameCompletionHandler)