Below code is used to assign new Mat frame for each frame we get from video capture.
Sample sample; extern "C" JNIEXPORT void JNICALL Java_com_exampl