GstGLEGL.GLDisplayEGL

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned GstGL.GLDisplay GstGL.GLDisplay Gst.Object->GstGL.GLDisplay GstGLEGL.GLDisplayEGL GstGLEGL.GLDisplayEGL GstGL.GLDisplay->GstGLEGL.GLDisplayEGL

Subclasses:

None

Methods

Inherited:

GstGL.GLDisplay (16), Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

from_gl_display (display)

class

get_from_native (type, display)

class

new ()

class

new_surfaceless ()

class

new_with_egl_display (display)

set_foreign (foreign)

Virtual Methods

Inherited:

GstGL.GLDisplay (2), Gst.Object (1), GObject.Object (7)

Properties

Inherited:

Gst.Object (2)

Signals

Inherited:

GstGL.GLDisplay (1), Gst.Object (1), GObject.Object (1)

Fields

Inherited:

GstGL.GLDisplay (1), Gst.Object (1), GObject.Object (1)

Name

Type

Access

Description

display

object

r

foreign_display

bool

r

parent

GstGL.GLDisplay

r

Class Details

class GstGLEGL.GLDisplayEGL(**kwargs)
Bases:

GstGL.GLDisplay

Abstract:

No

Structure:

GstGLEGL.GLDisplayEGLClass

the contents of a GstGLEGL.GLDisplayEGL are private and should only be accessed through the provided API

classmethod from_gl_display(display)
Parameters:

display (GstGL.GLDisplay) – an existing GstGL.GLDisplay

Returns:

a new GstGLEGL.GLDisplayEGL

Return type:

GstGLEGL.GLDisplayEGL or None

Creates a EGL display connection from a native Display.

This function will return the same value for multiple calls with the same display.

The returned GstGLEGL.GLDisplayEGL will *not* be marked as foreign and will free some display global EGL resources on finalization. If an external API/user will be also handling the lifetime of the EGLDisplay, you should mark the returned GstGLEGL.GLDisplayEGL as foreign by calling GstGLEGL.GLDisplayEGL.set_foreign().

New in version 1.12.

classmethod get_from_native(type, display)
Parameters:
Returns:

A EGLDisplay or EGL_NO_DISPLAY

Return type:

object or None

Attempts to create a new EGLDisplay from display. If type is GstGL.GLDisplayType.ANY or GstGL.GLDisplayType.EGL_SURFACELESS, then display must be 0. type must not be GstGL.GLDisplayType.NONE.

New in version 1.12.

classmethod new()
Returns:

a new GstGLEGL.GLDisplayEGL or None

Return type:

GstGLEGL.GLDisplayEGL or None

Create a new GstGLEGL.GLDisplayEGL using the default EGL_DEFAULT_DISPLAY.

The returned GstGLEGL.GLDisplayEGL will by default free all EGL resources when finalized. See GstGLEGL.GLDisplayEGL.set_foreign() for details on if you need the EGLDisplay to remain alive.

classmethod new_surfaceless()
Returns:

a new GstGLEGL.GLDisplayEGL or None

Return type:

GstGLEGL.GLDisplayEGL or None

Create a new surfaceless GstGLEGL.GLDisplayEGL using the Mesa3D EGL_PLATFORM_SURFACELESS_MESA extension.

New in version 1.24.

classmethod new_with_egl_display(display)
Parameters:

display (object or None) –

Return type:

GstGLEGL.GLDisplayEGL

set_foreign(foreign)
Parameters:

foreign (bool) – whether self should be marked as containing a foreign EGLDisplay

Configure whether or not this EGL display is foreign and is managed by an external application/library.

A display marked as foreign will not have display global resources freed when this display is finalized. As such, any external API using the same EGLDisplay must keep the EGLDisplay alive while GStreamer is using any EGL or GL resources associated with that EGLDisplay. The reverse is also true and a foreign GstGLEGL.GLDisplayEGL must not be used after the associated EGLDisplay has been destroyed externally with eglTerminate().

A non-foreign GstGLEGL.GLDisplayEGL will destroy the associated EGLDisplay on finalization. This can also be useful when a user would like GStreamer to assume ownership of the EGLDisplay after calling e.g. GstGLEGL.GLDisplayEGL.new_with_egl_display().

New in version 1.26.