My Android App need to show video using native c++ code. So I want to transfer a Surface (which is returned from SurfaceView.getHolder().getSurface()) to the native c++ function.
I have search and find there too many examples using JNI like this:
static JNICALL setDisplaySurface(JNIEnv* env, jobject obj, jobject jsurface) {
........
}
win = ANativeWindow_fromSurface(get_jni_env(), (jobject)surface);
the 2nd param of ANativeWindow_fromSurface is as of type jobject.
But I can't find one using JNA, so frustrated.
How to do it using JNA ?
tnanks