Commit ad576857 authored by flx42's avatar flx42 Committed by Jean-Baptiste Kempf

jni: add a function to notify that hardware acceleration failed

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <>
parent 0cbb118f
......@@ -58,6 +58,22 @@ void jni_UnlockAndroidSurface() {
void jni_EventHardwareAccelerationError()
if (vout_android_gui == NULL)
JNIEnv *env;
(*myVm)->AttachCurrentThread(myVm, &env, NULL);
jclass cls = (*env)->GetObjectClass(env, vout_android_gui);
jmethodID methodId = (*env)->GetMethodID(env, cls, "eventHardwareAccelerationError", "()V");
(*env)->CallVoidMethod(env, vout_android_gui, methodId);
(*env)->DeleteLocalRef(env, cls);
void jni_SetAndroidSurfaceSizeEnv(JNIEnv *p_env, int width, int height, int visible_width, int visible_height, int sar_num, int sar_den)
if (vout_android_gui == NULL)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment