glBindTexture(GL_TEXTURE_EXTERNAL_OES, 0);
mSurfTexture = new CJNISurfaceTexture(mVideoTextureId);
- mSurface = new CJNISurface(mSurfTexture);
+ mSurface = new CJNISurface(*mSurfTexture);
mVideoNativeWindow = ANativeWindow_fromSurface(env, mSurface->get_raw());
+ native_window_api_connect(mVideoNativeWindow.get(), NATIVE_WINDOW_API_MEDIA);
return true;
}
if (mVideoNativeWindow == NULL)
return;
+ native_window_api_disconnect(mVideoNativeWindow.get(), NATIVE_WINDOW_API_MEDIA);
ANativeWindow_release(mVideoNativeWindow.get());
mVideoNativeWindow = NULL;