#include "ffjni.h"
#include "mediacodec_surface.h"
-void *ff_mediacodec_surface_ref(void *surface, void *log_ctx)
+FFANativeWindow *ff_mediacodec_surface_ref(void *surface, void *log_ctx)
{
JNIEnv *env = NULL;
return (*env)->NewGlobalRef(env, surface);
}
-int ff_mediacodec_surface_unref(void *surface, void *log_ctx)
+int ff_mediacodec_surface_unref(FFANativeWindow *window, void *log_ctx)
{
JNIEnv *env = NULL;
return AVERROR_EXTERNAL;
}
- (*env)->DeleteGlobalRef(env, surface);
+ (*env)->DeleteGlobalRef(env, window);
return 0;
}