gboolean gst_egl_adaptation_create_native_window (GstEglAdaptationContext * ctx, gint width, gint height, gpointer * own_window_data) { EGLNativeWindowType window = platform_create_native_window (width, height, own_window_data); if (window) gst_egl_adaptation_set_window (ctx, (guintptr) window); GST_DEBUG_OBJECT (ctx->element, "Using window handle %p", (gpointer) window); return window != 0; }
static void gst_eglglessink_set_window_handle (GstXOverlay * overlay, guintptr id) { GstEglGlesSink *eglglessink = GST_EGLGLESSINK (overlay); g_return_if_fail (GST_IS_EGLGLESSINK (eglglessink)); GST_DEBUG_OBJECT (eglglessink, "We got a window handle: %p", (gpointer) id); /* OK, we have a new window */ GST_OBJECT_LOCK (eglglessink); gst_egl_adaptation_set_window (eglglessink->egl_context, id); eglglessink->have_window = ((gpointer) id != NULL); GST_OBJECT_UNLOCK (eglglessink); return; }