static int AndroidWindow_ConfigureJavaSurface(vout_display_sys_t *sys, android_window *p_window, bool *p_java_configured) { /* setBuffersGeometry is broken before ics. Use * AJavaWindow_setBuffersGeometry to configure the surface on the java side * synchronously. AJavaWindow_setBuffersGeometry return en error when you * don't need to call it (ie, after ics). if this call succeed, you need to * get a new surface handle. That's why AndroidWindow_DisconnectSurface is * called here. */ if (AWindowHandler_setBuffersGeometry(sys->p_awh, p_window->id, p_window->fmt.i_width, p_window->fmt.i_height, p_window->i_android_hal) == VLC_SUCCESS) { *p_java_configured = true; AndroidWindow_DisconnectSurface(sys, p_window); if (AndroidWindow_ConnectSurface(sys, p_window) != 0) return -1; } else *p_java_configured = false; return 0; }
static void AndroidWindow_Destroy(vout_display_t *vd, android_window *p_window) { AndroidWindow_DisconnectSurface(vd->sys, p_window); free(p_window); }