on Frame Captured
Called for every captured camera frame. Return the frame unchanged, or a new one.
Runs on the camera capture thread. Anything slower than one frame interval drops frames, so keep the work here bounded.
The SDK releases both the frame it passed in and the frame you return — do not release either yourself, and do not hold a reference past the call. A frame whose buffer cannot be converted to I420 is dropped. Throwing is safe but pointless: the original frame is sent on unchanged.
Parameters
video Frame
an I420 frame carrying the sensor's rotation; set rotation on the frame you return if your transform rotates it.