glEnsureElementData

Perform the steps necessary for retrieving a #GstGLDisplay and (optionally) an application provided #GstGLContext from the surrounding elements or from the application using the #GstContext mechanism.

If the contents of display_ptr or other_context_ptr are not null, then no #GstContext query is necessary for #GstGLDisplay or #GstGLContext retrieval or is performed.

This performs #GstContext queries (if necessary) for a winsys display connection with GST_GL_DISPLAY_CONTEXT_TYPE, "gst.x11.display.handle", and "GstWaylandDisplayHandleContextType" stopping after the first successful retrieval.

This also performs a #GstContext query (if necessary) for an optional application provided #GstGLContext using the name "gst.gl.app_context". The returned #GstGLContext will be shared with a GStreamer created OpenGL context.

Parameters

element gst.element.Element

the #GstElement running the query

displayPtr gstgl.gldisplay.GLDisplay

the resulting #GstGLDisplay

otherContextPtr gstgl.glcontext.GLContext

the resulting #GstGLContext

Return Value

Type: bool

whether a #GstGLDisplay exists in display_ptr