GstGLDisplay
GstGLDisplay represents a connection to the underlying windowing system. Elements are required to make use of GstContext to share and propagate a GstGLDisplay.
There are a number of environment variables that influence the choice of platform and window system specific functionality.
- GST_GL_WINDOW influences the window system to use. Common values are 'x11', 'wayland', 'surfaceless', 'win32' or 'cocoa'.
- GST_GL_PLATFORM influences the OpenGL platform to use. Common values are 'egl', 'glx', 'wgl' or 'cgl'.
- GST_GL_API influences the OpenGL API requested by the OpenGL platform. Common values are 'opengl', 'opengl3' and 'gles2'.
Certain window systems require a special function to be called to initialize threading support. As this GStreamer GL library does not preclude concurrent access to the windowing system, it is strongly advised that applications ensure that threading support has been initialized before any other toolkit/library functionality is accessed. Failure to do so could result in sudden application abortion during execution. The most notably example of such a function is X11's XInitThreads().
GstGLDisplay
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstGLDisplay
The contents of a GstGLDisplay are private and should only be accessed through the provided API
Class structure
GstGL.GLDisplay
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──GstGL.GLDisplay
The contents of a GstGL.GLDisplay are private and should only be accessed through the provided API
GstGL.GLDisplay
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──GstGL.GLDisplay
The contents of a GstGL.GLDisplay are private and should only be accessed through the provided API
Constructors
gst_gl_display_new
GstGLDisplay * gst_gl_display_new ()
a new GstGLDisplay
Since : 1.4
GstGL.GLDisplay.prototype.new
function GstGL.GLDisplay.prototype.new(): {
// javascript wrapper for 'gst_gl_display_new'
}
a new GstGL.GLDisplay
Since : 1.4
GstGL.GLDisplay.new
def GstGL.GLDisplay.new ():
#python wrapper for 'gst_gl_display_new'
a new GstGL.GLDisplay
Since : 1.4
gst_gl_display_new_with_type
GstGLDisplay * gst_gl_display_new_with_type (GstGLDisplayType type)
Will always return a GstGLDisplay of a single type. This differs from gst_gl_display_new and the seemingly equivalent call gst_gl_display_new_with_type (GST_GL_DISPLAY_TYPE_ANY) in that the latter may return NULL.
Parameters:
type
–
a new GstGLDisplay or NULL if type is not supported
Since : 1.20
GstGL.GLDisplay.prototype.new_with_type
function GstGL.GLDisplay.prototype.new_with_type(type: GstGL.GLDisplayType): {
// javascript wrapper for 'gst_gl_display_new_with_type'
}
Will always return a GstGL.GLDisplay of a single type. This differs from GstGL.GLDisplay.prototype.new and the seemingly equivalent call gst_gl_display_new_with_type (GST_GL_DISPLAY_TYPE_ANY) in that the latter may return NULL.
Parameters:
a new GstGL.GLDisplay or null if type is not supported
Since : 1.20
GstGL.GLDisplay.new_with_type
def GstGL.GLDisplay.new_with_type (type):
#python wrapper for 'gst_gl_display_new_with_type'
Will always return a GstGL.GLDisplay of a single type. This differs from GstGL.GLDisplay.new and the seemingly equivalent call gst_gl_display_new_with_type (GST_GL_DISPLAY_TYPE_ANY) in that the latter may return NULL.
Parameters:
a new GstGL.GLDisplay or None if type is not supported
Since : 1.20
Methods
gst_gl_display_add_context
gboolean gst_gl_display_add_context (GstGLDisplay * display, GstGLContext * context)
whether context was successfully added. FALSE may be returned if there already exists another context for context's active thread.
Must be called with the object lock held.
Since : 1.6
GstGL.GLDisplay.prototype.add_context
function GstGL.GLDisplay.prototype.add_context(context: GstGL.GLContext): {
// javascript wrapper for 'gst_gl_display_add_context'
}
Parameters:
Since : 1.6
GstGL.GLDisplay.add_context
def GstGL.GLDisplay.add_context (self, context):
#python wrapper for 'gst_gl_display_add_context'
Parameters:
Since : 1.6
gst_gl_display_create_context
gboolean gst_gl_display_create_context (GstGLDisplay * display, GstGLContext * other_context, GstGLContext ** p_context, GError ** error)
It requires the display's object lock to be held.
Parameters:
display
–
other_context
(
[transfer: none][nullable])
–
other GstGLContext to share resources with.
p_context
(
[transfer: full][out])
–
resulting GstGLContext
error
–
resulting GError
whether a new context could be created.
Since : 1.6
GstGL.GLDisplay.prototype.create_context
function GstGL.GLDisplay.prototype.create_context(other_context: GstGL.GLContext): {
// javascript wrapper for 'gst_gl_display_create_context'
}
It requires the display's object lock to be held.
Returns a tuple made of:
whether a new context could be created.
whether a new context could be created.
Since : 1.6
GstGL.GLDisplay.create_context
@raises(GLib.GError)
def GstGL.GLDisplay.create_context (self, other_context):
#python wrapper for 'gst_gl_display_create_context'
It requires the display's object lock to be held.
Returns a tuple made of:
whether a new context could be created.
whether a new context could be created.
Since : 1.6
gst_gl_display_create_window
GstGLWindow * gst_gl_display_create_window (GstGLDisplay * display)
Parameters:
display
–
a new GstGLWindow for display or NULL.
GstGL.GLDisplay.prototype.create_window
function GstGL.GLDisplay.prototype.create_window(): {
// javascript wrapper for 'gst_gl_display_create_window'
}
Parameters:
a new GstGL.GLWindow for display or null.
GstGL.GLDisplay.create_window
def GstGL.GLDisplay.create_window (self):
#python wrapper for 'gst_gl_display_create_window'
Parameters:
a new GstGL.GLWindow for display or None.
gst_gl_display_ensure_context
gboolean gst_gl_display_ensure_context (GstGLDisplay * display, GstGLContext * other_context, GstGLContext ** context, GError ** error)
Ensures that the display has a valid GL context for the current thread. If context already contains a valid context, this does nothing.
Parameters:
display
–
other_context
(
[transfer: none][nullable])
–
other GstGLContext to share resources with.
context
(
[inout][transfer: full][nullable])
–
the resulting GstGLContext
error
(
[out][transfer: full][nullable])
–
possible error
wether context contains a valid context.
Since : 1.24
GstGL.GLDisplay.prototype.ensure_context
function GstGL.GLDisplay.prototype.ensure_context(other_context: GstGL.GLContext, context: GstGL.GLContext): {
// javascript wrapper for 'gst_gl_display_ensure_context'
}
Ensures that the display has a valid GL context for the current thread. If context already contains a valid context, this does nothing.
Returns a tuple made of:
wether context contains a valid context.
wether context contains a valid context.
Since : 1.24
GstGL.GLDisplay.ensure_context
@raises(GLib.GError)
def GstGL.GLDisplay.ensure_context (self, other_context, context):
#python wrapper for 'gst_gl_display_ensure_context'
Ensures that the display has a valid GL context for the current thread. If context already contains a valid context, this does nothing.
Returns a tuple made of:
wether context contains a valid context.
wether context contains a valid context.
Since : 1.24
gst_gl_display_filter_gl_api
gst_gl_display_filter_gl_api (GstGLDisplay * display, GstGLAPI gl_api)
limit the use of OpenGL to the requested gl_api. This is intended to allow application and elements to request a specific set of OpenGL API's based on what they support. See gst_gl_context_get_gl_api for the retrieving the API supported by a GstGLContext.
GstGL.GLDisplay.prototype.filter_gl_api
function GstGL.GLDisplay.prototype.filter_gl_api(gl_api: GstGL.GLAPI): {
// javascript wrapper for 'gst_gl_display_filter_gl_api'
}
limit the use of OpenGL to the requested gl_api. This is intended to allow application and elements to request a specific set of OpenGL API's based on what they support. See GstGL.GLContext.prototype.get_gl_api for the retrieving the API supported by a GstGL.GLContext.
GstGL.GLDisplay.filter_gl_api
def GstGL.GLDisplay.filter_gl_api (self, gl_api):
#python wrapper for 'gst_gl_display_filter_gl_api'
limit the use of OpenGL to the requested gl_api. This is intended to allow application and elements to request a specific set of OpenGL API's based on what they support. See GstGL.GLContext.get_gl_api for the retrieving the API supported by a GstGL.GLContext.
gst_gl_display_find_window
GstGLWindow * gst_gl_display_find_window (GstGLDisplay * display, gpointer data, GCompareFunc compare_func)
Execute compare_func over the list of windows stored by display. The first argument to compare_func is the GstGLWindow being checked and the second argument is data.
Parameters:
display
–
data
–
some data to pass to compare_func
compare_func
(
[scope call][closure])
–
a comparison function to run
The first GstGLWindow that causes a match from compare_func
Since : 1.12
deprecated : 1.18: Use gst_gl_display_retrieve_window() instead.
GstGL.GLDisplay.prototype.find_window
function GstGL.GLDisplay.prototype.find_window(data: Object, compare_func: GLib.CompareFunc): {
// javascript wrapper for 'gst_gl_display_find_window'
}
Execute compare_func over the list of windows stored by display. The first argument to compare_func is the GstGL.GLWindow being checked and the second argument is data.
Parameters:
some data to pass to compare_func
a comparison function to run
The first GstGL.GLWindow that causes a match from compare_func
Since : 1.12
deprecated : 1.18: Use gst_gl_display_retrieve_window() instead.
GstGL.GLDisplay.find_window
def GstGL.GLDisplay.find_window (self, *data, compare_func):
#python wrapper for 'gst_gl_display_find_window'
Execute compare_func over the list of windows stored by display. The first argument to compare_func is the GstGL.GLWindow being checked and the second argument is data.
Parameters:
some data to pass to compare_func
a comparison function to run
The first GstGL.GLWindow that causes a match from compare_func
Since : 1.12
deprecated : 1.18: Use gst_gl_display_retrieve_window() instead.
gst_gl_display_get_gl_api
GstGLAPI gst_gl_display_get_gl_api (GstGLDisplay * display)
see gst_gl_display_filter_gl_api for what the returned value represents
Parameters:
display
–
the GstGLAPI configured for display
GstGL.GLDisplay.prototype.get_gl_api
function GstGL.GLDisplay.prototype.get_gl_api(): {
// javascript wrapper for 'gst_gl_display_get_gl_api'
}
see GstGL.GLDisplay.prototype.filter_gl_api for what the returned value represents
Parameters:
the GstGL.GLAPI configured for display
GstGL.GLDisplay.get_gl_api
def GstGL.GLDisplay.get_gl_api (self):
#python wrapper for 'gst_gl_display_get_gl_api'
see GstGL.GLDisplay.filter_gl_api for what the returned value represents
Parameters:
the GstGL.GLAPI configured for display
gst_gl_display_get_gl_api_unlocked
GstGLAPI gst_gl_display_get_gl_api_unlocked (GstGLDisplay * display)
Parameters:
display
–
GstGL.GLDisplay.prototype.get_gl_api_unlocked
function GstGL.GLDisplay.prototype.get_gl_api_unlocked(): {
// javascript wrapper for 'gst_gl_display_get_gl_api_unlocked'
}
Parameters:
GstGL.GLDisplay.get_gl_api_unlocked
def GstGL.GLDisplay.get_gl_api_unlocked (self):
#python wrapper for 'gst_gl_display_get_gl_api_unlocked'
Parameters:
gst_gl_display_get_gl_context_for_thread
GstGLContext * gst_gl_display_get_gl_context_for_thread (GstGLDisplay * display, GThread * thread)
the GstGLContext current on thread or NULL
Must be called with the object lock held.
Since : 1.6
GstGL.GLDisplay.prototype.get_gl_context_for_thread
function GstGL.GLDisplay.prototype.get_gl_context_for_thread(thread: GThread (not introspectable)): {
// javascript wrapper for 'gst_gl_display_get_gl_context_for_thread'
}
Parameters:
the GstGL.GLContext current on thread or null
Must be called with the object lock held.
Since : 1.6
GstGL.GLDisplay.get_gl_context_for_thread
def GstGL.GLDisplay.get_gl_context_for_thread (self, thread):
#python wrapper for 'gst_gl_display_get_gl_context_for_thread'
Parameters:
the GstGL.GLContext current on thread or None
Must be called with the object lock held.
Since : 1.6
gst_gl_display_get_handle
guintptr gst_gl_display_get_handle (GstGLDisplay * display)
Parameters:
display
–
the native handle for the display
Since : 1.4
GstGL.GLDisplay.prototype.get_handle
function GstGL.GLDisplay.prototype.get_handle(): {
// javascript wrapper for 'gst_gl_display_get_handle'
}
Parameters:
the native handle for the display
Since : 1.4
GstGL.GLDisplay.get_handle
def GstGL.GLDisplay.get_handle (self):
#python wrapper for 'gst_gl_display_get_handle'
Parameters:
the native handle for the display
Since : 1.4
gst_gl_display_get_handle_type
GstGLDisplayType gst_gl_display_get_handle_type (GstGLDisplay * display)
Parameters:
display
–
the GstGLDisplayType of display
Since : 1.4
GstGL.GLDisplay.prototype.get_handle_type
function GstGL.GLDisplay.prototype.get_handle_type(): {
// javascript wrapper for 'gst_gl_display_get_handle_type'
}
Parameters:
the GstGL.GLDisplayType of display
Since : 1.4
GstGL.GLDisplay.get_handle_type
def GstGL.GLDisplay.get_handle_type (self):
#python wrapper for 'gst_gl_display_get_handle_type'
Parameters:
the GstGL.GLDisplayType of display
Since : 1.4
gst_gl_display_remove_context
gst_gl_display_remove_context (GstGLDisplay * display, GstGLContext * context)
Must be called with the object lock held.
Since : 1.18
GstGL.GLDisplay.prototype.remove_context
function GstGL.GLDisplay.prototype.remove_context(context: GstGL.GLContext): {
// javascript wrapper for 'gst_gl_display_remove_context'
}
Must be called with the object lock held.
Since : 1.18
GstGL.GLDisplay.remove_context
def GstGL.GLDisplay.remove_context (self, context):
#python wrapper for 'gst_gl_display_remove_context'
Must be called with the object lock held.
Since : 1.18
gst_gl_display_remove_window
gboolean gst_gl_display_remove_window (GstGLDisplay * display, GstGLWindow * window)
if window could be removed from display
Since : 1.12
GstGL.GLDisplay.prototype.remove_window
function GstGL.GLDisplay.prototype.remove_window(window: GstGL.GLWindow): {
// javascript wrapper for 'gst_gl_display_remove_window'
}
if window could be removed from display
Since : 1.12
GstGL.GLDisplay.remove_window
def GstGL.GLDisplay.remove_window (self, window):
#python wrapper for 'gst_gl_display_remove_window'
if window could be removed from display
Since : 1.12
gst_gl_display_retrieve_window
GstGLWindow * gst_gl_display_retrieve_window (GstGLDisplay * display, gpointer data, GCompareFunc compare_func)
Execute compare_func over the list of windows stored by display. The first argument to compare_func is the GstGLWindow being checked and the second argument is data.
Parameters:
display
–
data
–
some data to pass to compare_func
compare_func
(
[scope call][closure])
–
a comparison function to run
The first GstGLWindow that causes a match from compare_func
Since : 1.18
GstGL.GLDisplay.prototype.retrieve_window
function GstGL.GLDisplay.prototype.retrieve_window(data: Object, compare_func: GLib.CompareFunc): {
// javascript wrapper for 'gst_gl_display_retrieve_window'
}
Execute compare_func over the list of windows stored by display. The first argument to compare_func is the GstGL.GLWindow being checked and the second argument is data.
Parameters:
some data to pass to compare_func
a comparison function to run
The first GstGL.GLWindow that causes a match from compare_func
Since : 1.18
GstGL.GLDisplay.retrieve_window
def GstGL.GLDisplay.retrieve_window (self, *data, compare_func):
#python wrapper for 'gst_gl_display_retrieve_window'
Execute compare_func over the list of windows stored by display. The first argument to compare_func is the GstGL.GLWindow being checked and the second argument is data.
Parameters:
some data to pass to compare_func
a comparison function to run
The first GstGL.GLWindow that causes a match from compare_func
Since : 1.18
Signals
create-context
GstGLContext * create_context_callback (GstGLDisplay * self, GstGLContext * context, gpointer user_data)
Overrides the GstGLContext creation mechanism. It can be called in any thread and it is emitted with display's object lock held.
Parameters:
self
–
context
(
[transfer: none])
–
other context to share resources with.
user_data
–
the new context.
Flags: Run Last
create-context
function create_context_callback(self: GstGL.GLDisplay, context: GstGL.GLContext, user_data: Object): {
// javascript callback for the 'create-context' signal
}
Overrides the GstGLContext creation mechanism. It can be called in any thread and it is emitted with display's object lock held.
Parameters:
other context to share resources with.
the new context.
Flags: Run Last
create-context
def create_context_callback (self, context, *user_data):
#python callback for the 'create-context' signal
Overrides the GstGLContext creation mechanism. It can be called in any thread and it is emitted with display's object lock held.
Parameters:
other context to share resources with.
the new context.
Flags: Run Last
Virtual Methods
create_window
GstGLWindow * create_window (GstGLDisplay * display)
Parameters:
display
–
vfunc_create_window
function vfunc_create_window(display: GstGL.GLDisplay): {
// javascript implementation of the 'create_window' virtual method
}
Parameters:
do_create_window
def do_create_window (display):
#python implementation of the 'create_window' virtual method
Parameters:
get_handle
guintptr get_handle (GstGLDisplay * display)
Parameters:
display
–
vfunc_get_handle
function vfunc_get_handle(display: GstGL.GLDisplay): {
// javascript implementation of the 'get_handle' virtual method
}
Parameters:
do_get_handle
def do_get_handle (display):
#python implementation of the 'get_handle' virtual method
Parameters:
Functions
gst_context_get_gl_display
gboolean gst_context_get_gl_display (GstContext * context, GstGLDisplay ** display)
Whether display was in context
Since : 1.4
GstGL.prototype.context_get_gl_display
function GstGL.prototype.context_get_gl_display(context: Gst.Context): {
// javascript wrapper for 'gst_context_get_gl_display'
}
Parameters:
Returns a tuple made of:
Whether display was in context
Whether display was in context
Since : 1.4
GstGL.context_get_gl_display
def GstGL.context_get_gl_display (context):
#python wrapper for 'gst_context_get_gl_display'
Parameters:
Returns a tuple made of:
Whether display was in context
Whether display was in context
Since : 1.4
gst_context_set_gl_display
gst_context_set_gl_display (GstContext * context, GstGLDisplay * display)
Sets display on context
Since : 1.4
GstGL.prototype.context_set_gl_display
function GstGL.prototype.context_set_gl_display(context: Gst.Context, display: GstGL.GLDisplay): {
// javascript wrapper for 'gst_context_set_gl_display'
}
Sets display on context
Since : 1.4
GstGL.context_set_gl_display
def GstGL.context_set_gl_display (context, display):
#python wrapper for 'gst_context_set_gl_display'
Sets display on context
Since : 1.4
Function Macros
GST_GL_DISPLAY_CAST
#define GST_GL_DISPLAY_CAST(obj) ((GstGLDisplay*)(obj))
gst_gl_display_lock
#define gst_gl_display_lock(display) GST_OBJECT_LOCK (display)
gst_gl_display_unlock
#define gst_gl_display_unlock(display) GST_OBJECT_UNLOCK (display)
Enumerations
GstGLDisplayType
Members
GST_GL_DISPLAY_TYPE_NONE
(0)
–
no display type
GST_GL_DISPLAY_TYPE_X11
(1)
–
X11 display
GST_GL_DISPLAY_TYPE_WAYLAND
(2)
–
Wayland display
GST_GL_DISPLAY_TYPE_COCOA
(4)
–
Cocoa display
GST_GL_DISPLAY_TYPE_WIN32
(8)
–
Win32 display
GST_GL_DISPLAY_TYPE_DISPMANX
(16)
–
Dispmanx display
GST_GL_DISPLAY_TYPE_EGL
(32)
–
EGL display
GST_GL_DISPLAY_TYPE_VIV_FB
(64)
–
Vivante Framebuffer display
GST_GL_DISPLAY_TYPE_GBM
(128)
–
Mesa3D GBM display
GST_GL_DISPLAY_TYPE_EGL_DEVICE
(256)
–
EGLDevice display.
(Since: 1.18)GST_GL_DISPLAY_TYPE_EAGL
(512)
–
EAGL display.
(Since: 1.20)GST_GL_DISPLAY_TYPE_WINRT
(1024)
–
WinRT display.
(Since: 1.20)GST_GL_DISPLAY_TYPE_ANDROID
(2048)
–
Android display.
(Since: 1.20)GST_GL_DISPLAY_TYPE_EGL_SURFACELESS
(4096)
–
Mesa3D surfaceless display using the EGL_PLATFORM_SURFACELESS_MESA extension.
(Since: 1.24)GST_GL_DISPLAY_TYPE_ANY
(4294967295)
–
any display type
GstGL.GLDisplayType
Members
GstGL.GLDisplayType.NONE
(0)
–
no display type
GstGL.GLDisplayType.X11
(1)
–
X11 display
GstGL.GLDisplayType.WAYLAND
(2)
–
Wayland display
GstGL.GLDisplayType.COCOA
(4)
–
Cocoa display
GstGL.GLDisplayType.WIN32
(8)
–
Win32 display
GstGL.GLDisplayType.DISPMANX
(16)
–
Dispmanx display
GstGL.GLDisplayType.EGL
(32)
–
EGL display
GstGL.GLDisplayType.VIV_FB
(64)
–
Vivante Framebuffer display
GstGL.GLDisplayType.GBM
(128)
–
Mesa3D GBM display
GstGL.GLDisplayType.EGL_DEVICE
(256)
–
EGLDevice display.
(Since: 1.18)GstGL.GLDisplayType.EAGL
(512)
–
EAGL display.
(Since: 1.20)GstGL.GLDisplayType.WINRT
(1024)
–
WinRT display.
(Since: 1.20)GstGL.GLDisplayType.ANDROID
(2048)
–
Android display.
(Since: 1.20)GstGL.GLDisplayType.EGL_SURFACELESS
(4096)
–
Mesa3D surfaceless display using the EGL_PLATFORM_SURFACELESS_MESA extension.
(Since: 1.24)GstGL.GLDisplayType.ANY
(4294967295)
–
any display type
GstGL.GLDisplayType
Members
GstGL.GLDisplayType.NONE
(0)
–
no display type
GstGL.GLDisplayType.X11
(1)
–
X11 display
GstGL.GLDisplayType.WAYLAND
(2)
–
Wayland display
GstGL.GLDisplayType.COCOA
(4)
–
Cocoa display
GstGL.GLDisplayType.WIN32
(8)
–
Win32 display
GstGL.GLDisplayType.DISPMANX
(16)
–
Dispmanx display
GstGL.GLDisplayType.EGL
(32)
–
EGL display
GstGL.GLDisplayType.VIV_FB
(64)
–
Vivante Framebuffer display
GstGL.GLDisplayType.GBM
(128)
–
Mesa3D GBM display
GstGL.GLDisplayType.EGL_DEVICE
(256)
–
EGLDevice display.
(Since: 1.18)GstGL.GLDisplayType.EAGL
(512)
–
EAGL display.
(Since: 1.20)GstGL.GLDisplayType.WINRT
(1024)
–
WinRT display.
(Since: 1.20)GstGL.GLDisplayType.ANDROID
(2048)
–
Android display.
(Since: 1.20)GstGL.GLDisplayType.EGL_SURFACELESS
(4096)
–
Mesa3D surfaceless display using the EGL_PLATFORM_SURFACELESS_MESA extension.
(Since: 1.24)GstGL.GLDisplayType.ANY
(4294967295)
–
any display type
Constants
GST_GL_DISPLAY_CONTEXT_TYPE
#define GST_GL_DISPLAY_CONTEXT_TYPE "gst.gl.GLDisplay"
The name used in GstContext queries for requesting a GstGLDisplay
The results of the search are