SINVideoFrameCallback
Objective-C
@protocol SINVideoFrameCallback <NSObject>
Swift
protocol SINVideoFrameCallback : NSObjectProtocol
Video frame handler must adopt SINVideoFrameCallback protocol
-
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
completionHandleris mandatory.Declaration
Objective-C
- (void)onFrame:(CVPixelBufferRef)cvPixelBuffer completionHandler:(void (^)(CVPixelBufferRef))completionHandler;Swift
func onFrame(_ cvPixelBuffer: CVPixelBuffer!, completionHandler: ((CVPixelBuffer?) -> Void)!)Parameters
cvPixelBufferThe raw video frame buffer.
completionHandlerCompletion handler block, to be invoked with processed output pixel buffer as argument.
SINVideoFrameCallback Protocol Reference