setOnFramesCallback

abstract fun setOnFramesCallback(onFrames: (frames: List<FrameOrDepth>) -> Unit?)

Sets the callback called on thread with each set of synchronized Frames and Depth frames, or removes it with null. The callback must dispose every frame.