GstGLContext
GstGLContext wraps an OpenGL context object in a uniform API. As a result of the limitation on OpenGL context, this object is not thread safe unless specified and must only be activated in a single thread.
Environment variables:
-
GST_GL_API
: select which OpenGL API to create and OpenGL context for. Depending on the platform, the available values are 'opengl', 'opengl3' (core profile), and 'gles2'. See the the GstGLAPI enumeration for more details. -
GST_GL_PLATFORM
: select which OpenGL platform to create an OpenGL context with. Depending on the platform and the dependencies available build-time, the available values are, 'glx', 'egl', 'cgl', 'wgl', and 'eagl' -
GST_GL_CONFIG
: select the configuration used for creating the OpenGL context and OpenGL surface. Written out as a GstStructure that has been serialized to string. e.g.GST_GL_CONFIG="gst-gl-context-config,red-size=8,green-size=8,blue-size=8,alpha-size=8,depth-size=16"
. Not all platforms will support the same level of functionality.
GstGLContext
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstGLContext
Opaque GstGLContext object
Members
gl_vtable
(GstGLFuncs *)
–
a list of OpenGL function pointers
Class structure
GstGL.GLContext
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──GstGL.GLContext
Opaque GstGL.GLContext object
Members
gl_vtable
(GstGL.GLFuncs)
–
a list of OpenGL function pointers
GstGL.GLContext
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──GstGL.GLContext
Opaque GstGL.GLContext object
Members
gl_vtable
(GstGL.GLFuncs)
–
a list of OpenGL function pointers
Constructors
gst_gl_context_new
GstGLContext * gst_gl_context_new (GstGLDisplay * display)
Create a new GstGLContext with the specified display
Parameters:
display
–
a new GstGLContext
Since : 1.4
GstGL.GLContext.prototype.new
function GstGL.GLContext.prototype.new(display: GstGL.GLDisplay): {
// javascript wrapper for 'gst_gl_context_new'
}
Create a new GstGL.GLContext with the specified display
Parameters:
a new GstGL.GLContext
Since : 1.4
GstGL.GLContext.new
def GstGL.GLContext.new (display):
#python wrapper for 'gst_gl_context_new'
Create a new GstGL.GLContext with the specified display
Parameters:
a new GstGL.GLContext
Since : 1.4
gst_gl_context_new_wrapped
GstGLContext * gst_gl_context_new_wrapped (GstGLDisplay * display, guintptr handle, GstGLPlatform context_type, GstGLAPI available_apis)
Wraps an existing OpenGL context into a GstGLContext.
Note: The caller is responsible for ensuring that the OpenGL context represented by handle stays alive while the returned GstGLContext is active.
context_type must not be GST_GL_PLATFORM_NONE or GST_GL_PLATFORM_ANY
available_apis must not be GST_GL_API_NONE or GST_GL_API_ANY
Parameters:
display
–
handle
–
the OpenGL context to wrap
context_type
–
a GstGLPlatform specifying the type of context in handle
available_apis
–
a GstGLAPI containing the available OpenGL apis in handle
a GstGLContext wrapping handle
Since : 1.4
GstGL.GLContext.prototype.new_wrapped
function GstGL.GLContext.prototype.new_wrapped(display: GstGL.GLDisplay, handle: Number, context_type: GstGL.GLPlatform, available_apis: GstGL.GLAPI): {
// javascript wrapper for 'gst_gl_context_new_wrapped'
}
Wraps an existing OpenGL context into a GstGL.GLContext.
Note: The caller is responsible for ensuring that the OpenGL context represented by handle stays alive while the returned GstGL.GLContext is active.
context_type must not be GstGL.GLPlatform.NONE or GstGL.GLPlatform.ANY
available_apis must not be GstGL.GLAPI.NONE or GstGL.GLAPI.ANY
Parameters:
the OpenGL context to wrap
a GstGL.GLPlatform specifying the type of context in handle
a GstGL.GLAPI containing the available OpenGL apis in handle
a GstGL.GLContext wrapping handle
Since : 1.4
GstGL.GLContext.new_wrapped
def GstGL.GLContext.new_wrapped (display, handle, context_type, available_apis):
#python wrapper for 'gst_gl_context_new_wrapped'
Wraps an existing OpenGL context into a GstGL.GLContext.
Note: The caller is responsible for ensuring that the OpenGL context represented by handle stays alive while the returned GstGL.GLContext is active.
context_type must not be GstGL.GLPlatform.NONE or GstGL.GLPlatform.ANY
available_apis must not be GstGL.GLAPI.NONE or GstGL.GLAPI.ANY
Parameters:
the OpenGL context to wrap
a GstGL.GLPlatform specifying the type of context in handle
a GstGL.GLAPI containing the available OpenGL apis in handle
a GstGL.GLContext wrapping handle
Since : 1.4
Methods
gst_gl_context_activate
gboolean gst_gl_context_activate (GstGLContext * context, gboolean activate)
(De)activate the OpenGL context represented by this context.
In OpenGL terms, calls eglMakeCurrent or similar with this context and the currently set window. See gst_gl_context_set_window for details.
Whether the activation succeeded
Since : 1.4
GstGL.GLContext.prototype.activate
function GstGL.GLContext.prototype.activate(activate: Number): {
// javascript wrapper for 'gst_gl_context_activate'
}
(De)activate the OpenGL context represented by this context.
In OpenGL terms, calls eglMakeCurrent or similar with this context and the currently set window. See GstGL.GLContext.prototype.set_window for details.
Parameters:
Whether the activation succeeded
Since : 1.4
GstGL.GLContext.activate
def GstGL.GLContext.activate (self, activate):
#python wrapper for 'gst_gl_context_activate'
(De)activate the OpenGL context represented by this context.
In OpenGL terms, calls eglMakeCurrent or similar with this context and the currently set window. See GstGL.GLContext.set_window for details.
Parameters:
Whether the activation succeeded
Since : 1.4
gst_gl_context_check_feature
gboolean gst_gl_context_check_feature (GstGLContext * context, const gchar * feature)
Check for an OpenGL feature being supported.
Note: Most features require that the context be created before it is possible to determine their existence and so will fail if that is not the case.
Whether feature is supported by context
Since : 1.4
GstGL.GLContext.prototype.check_feature
function GstGL.GLContext.prototype.check_feature(feature: String): {
// javascript wrapper for 'gst_gl_context_check_feature'
}
Check for an OpenGL feature being supported.
Note: Most features require that the context be created before it is possible to determine their existence and so will fail if that is not the case.
Parameters:
a platform specific feature
Whether feature is supported by context
Since : 1.4
GstGL.GLContext.check_feature
def GstGL.GLContext.check_feature (self, feature):
#python wrapper for 'gst_gl_context_check_feature'
Check for an OpenGL feature being supported.
Note: Most features require that the context be created before it is possible to determine their existence and so will fail if that is not the case.
Parameters:
a platform specific feature
Whether feature is supported by context
Since : 1.4
gst_gl_context_check_framebuffer_status
gboolean gst_gl_context_check_framebuffer_status (GstGLContext * context, guint fbo_target)
Must be called with context current.
Parameters:
context
–
fbo_target
–
the GL value of the framebuffer target, GL_FRAMEBUFFER, GL_READ_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER
whether whether the current framebuffer is complete
Since : 1.10
GstGL.GLContext.prototype.check_framebuffer_status
function GstGL.GLContext.prototype.check_framebuffer_status(fbo_target: Number): {
// javascript wrapper for 'gst_gl_context_check_framebuffer_status'
}
Must be called with context current.
Parameters:
the GL value of the framebuffer target, GL_FRAMEBUFFER, GL_READ_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER
whether whether the current framebuffer is complete
Since : 1.10
GstGL.GLContext.check_framebuffer_status
def GstGL.GLContext.check_framebuffer_status (self, fbo_target):
#python wrapper for 'gst_gl_context_check_framebuffer_status'
Must be called with context current.
Parameters:
the GL value of the framebuffer target, GL_FRAMEBUFFER, GL_READ_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER
whether whether the current framebuffer is complete
Since : 1.10
gst_gl_context_check_gl_version
gboolean gst_gl_context_check_gl_version (GstGLContext * context, GstGLAPI api, gint maj, gint min)
Parameters:
context
–
api
–
api type required
maj
–
major version required
min
–
minor version required
whether OpenGL context implements the required api and specified version.
Since : 1.4
GstGL.GLContext.prototype.check_gl_version
function GstGL.GLContext.prototype.check_gl_version(api: GstGL.GLAPI, maj: Number, min: Number): {
// javascript wrapper for 'gst_gl_context_check_gl_version'
}
Parameters:
api type required
major version required
minor version required
whether OpenGL context implements the required api and specified version.
Since : 1.4
GstGL.GLContext.check_gl_version
def GstGL.GLContext.check_gl_version (self, api, maj, min):
#python wrapper for 'gst_gl_context_check_gl_version'
Parameters:
api type required
major version required
minor version required
whether OpenGL context implements the required api and specified version.
Since : 1.4
gst_gl_context_clear_framebuffer
gst_gl_context_clear_framebuffer (GstGLContext * context)
Unbind the current framebuffer
Parameters:
context
–
Since : 1.10
GstGL.GLContext.prototype.clear_framebuffer
function GstGL.GLContext.prototype.clear_framebuffer(): {
// javascript wrapper for 'gst_gl_context_clear_framebuffer'
}
Unbind the current framebuffer
Parameters:
Since : 1.10
GstGL.GLContext.clear_framebuffer
def GstGL.GLContext.clear_framebuffer (self):
#python wrapper for 'gst_gl_context_clear_framebuffer'
Unbind the current framebuffer
Parameters:
Since : 1.10
gst_gl_context_clear_shader
gst_gl_context_clear_shader (GstGLContext * context)
Clear's the currently set shader from the GL state machine.
Note: must be called in the GL thread.
Parameters:
context
–
GstGL.GLContext.prototype.clear_shader
function GstGL.GLContext.prototype.clear_shader(): {
// javascript wrapper for 'gst_gl_context_clear_shader'
}
Clear's the currently set shader from the GL state machine.
Note: must be called in the GL thread.
Parameters:
GstGL.GLContext.clear_shader
def GstGL.GLContext.clear_shader (self):
#python wrapper for 'gst_gl_context_clear_shader'
Clear's the currently set shader from the GL state machine.
Note: must be called in the GL thread.
Parameters:
gst_gl_context_create
gboolean gst_gl_context_create (GstGLContext * context, GstGLContext * other_context, GError ** error)
Creates an OpenGL context with the specified other_context as a context to share shareable OpenGL objects with. See the OpenGL specification for what is shared between OpenGL contexts.
Since 1.20, the configuration can be overriden with the environment variable
GST_GL_CONFIG
which is a stringified GstStructure as would be returned
from gst_gl_context_get_config. If GST_GL_CONFIG
is not set, then the
config will be chosen from other_context by calling
gst_gl_context_get_config on other_context. Otherwise, a default
configuration is used.
Calling gst_gl_context_request_config) before calling
gst_gl_context_create will override the config from other_context but
will not override the GST_GL_CONFIG
environment variable.
If an error occurs, and error is not NULL, then error will contain details of the error and FALSE will be returned.
Should only be called once.
Parameters:
context
–
a GstGLContext:
other_context
(
[nullable])
–
a GstGLContext to share OpenGL objects with
error
–
a GError
whether the context could successfully be created
Since : 1.4
GstGL.GLContext.prototype.create
function GstGL.GLContext.prototype.create(other_context: GstGL.GLContext): {
// javascript wrapper for 'gst_gl_context_create'
}
Creates an OpenGL context with the specified other_context as a context to share shareable OpenGL objects with. See the OpenGL specification for what is shared between OpenGL contexts.
Since 1.20, the configuration can be overriden with the environment variable
GST_GL_CONFIG
which is a stringified Gst.Structure as would be returned
from GstGL.GLContext.prototype.get_config. If GST_GL_CONFIG
is not set, then the
config will be chosen from other_context by calling
GstGL.GLContext.prototype.get_config on other_context. Otherwise, a default
configuration is used.
Calling GstGL.GLContext.prototype.request_config) before calling
GstGL.GLContext.prototype.create will override the config from other_context but
will not override the GST_GL_CONFIG
environment variable.
If an error occurs, and error is not null, then error will contain details of the error and false will be returned.
Should only be called once.
whether the context could successfully be created
Since : 1.4
GstGL.GLContext.create
@raises(GLib.GError)
def GstGL.GLContext.create (self, other_context):
#python wrapper for 'gst_gl_context_create'
Creates an OpenGL context with the specified other_context as a context to share shareable OpenGL objects with. See the OpenGL specification for what is shared between OpenGL contexts.
Since 1.20, the configuration can be overriden with the environment variable
GST_GL_CONFIG
which is a stringified Gst.Structure as would be returned
from GstGL.GLContext.get_config. If GST_GL_CONFIG
is not set, then the
config will be chosen from other_context by calling
GstGL.GLContext.get_config on other_context. Otherwise, a default
configuration is used.
Calling GstGL.GLContext.request_config) before calling
GstGL.GLContext.create will override the config from other_context but
will not override the GST_GL_CONFIG
environment variable.
If an error occurs, and error is not None, then error will contain details of the error and False will be returned.
Should only be called once.
whether the context could successfully be created
Since : 1.4
gst_gl_context_destroy
gst_gl_context_destroy (GstGLContext * context)
Destroys an OpenGL context.
Should only be called after gst_gl_context_create has been successfully called for this context.
Parameters:
context
–
a GstGLContext:
Since : 1.6
GstGL.GLContext.prototype.destroy
function GstGL.GLContext.prototype.destroy(): {
// javascript wrapper for 'gst_gl_context_destroy'
}
Destroys an OpenGL context.
Should only be called after GstGL.GLContext.prototype.create has been successfully called for this context.
Parameters:
Since : 1.6
GstGL.GLContext.destroy
def GstGL.GLContext.destroy (self):
#python wrapper for 'gst_gl_context_destroy'
Destroys an OpenGL context.
Should only be called after GstGL.GLContext.create has been successfully called for this context.
Parameters:
Since : 1.6
gst_gl_context_fill_info
gboolean gst_gl_context_fill_info (GstGLContext * context, GError ** error)
Fills context's info (version, extensions, vtable, etc) from the GL context in the current thread. Typically used with wrapped contexts to allow wrapped contexts to be used as regular GstGLContext's.
Since : 1.6
GstGL.GLContext.prototype.fill_info
function GstGL.GLContext.prototype.fill_info(): {
// javascript wrapper for 'gst_gl_context_fill_info'
}
Fills context's info (version, extensions, vtable, etc) from the GL context in the current thread. Typically used with wrapped contexts to allow wrapped contexts to be used as regular GstGL.GLContext's.
Parameters:
Since : 1.6
GstGL.GLContext.fill_info
@raises(GLib.GError)
def GstGL.GLContext.fill_info (self):
#python wrapper for 'gst_gl_context_fill_info'
Fills context's info (version, extensions, vtable, etc) from the GL context in the current thread. Typically used with wrapped contexts to allow wrapped contexts to be used as regular GstGL.GLContext's.
Parameters:
Since : 1.6
gst_gl_context_get_config
GstStructure * gst_gl_context_get_config (GstGLContext * context)
Retrieve the OpenGL configuration for this context. The context must have been successfully created for this function to return a valid value.
Not all implementations currently support retrieving the config and will return NULL when not supported.
Parameters:
context
–
the GstGLContext
the configuration chosen for this OpenGL context.
Since : 1.20
GstGL.GLContext.prototype.get_config
function GstGL.GLContext.prototype.get_config(): {
// javascript wrapper for 'gst_gl_context_get_config'
}
Retrieve the OpenGL configuration for this context. The context must have been successfully created for this function to return a valid value.
Not all implementations currently support retrieving the config and will return null when not supported.
Parameters:
the GstGL.GLContext
the configuration chosen for this OpenGL context.
Since : 1.20
GstGL.GLContext.get_config
def GstGL.GLContext.get_config (self):
#python wrapper for 'gst_gl_context_get_config'
Retrieve the OpenGL configuration for this context. The context must have been successfully created for this function to return a valid value.
Not all implementations currently support retrieving the config and will return None when not supported.
Parameters:
the GstGL.GLContext
the configuration chosen for this OpenGL context.
Since : 1.20
gst_gl_context_get_display
GstGLDisplay * gst_gl_context_get_display (GstGLContext * context)
Parameters:
context
–
a GstGLContext:
the GstGLDisplay associated with this context
Since : 1.4
GstGL.GLContext.prototype.get_display
function GstGL.GLContext.prototype.get_display(): {
// javascript wrapper for 'gst_gl_context_get_display'
}
Parameters:
the GstGL.GLDisplay associated with this context
Since : 1.4
GstGL.GLContext.get_display
def GstGL.GLContext.get_display (self):
#python wrapper for 'gst_gl_context_get_display'
Parameters:
the GstGL.GLDisplay associated with this context
Since : 1.4
gst_gl_context_get_gl_api
GstGLAPI gst_gl_context_get_gl_api (GstGLContext * context)
Get the currently enabled OpenGL api.
The currently available API may be limited by the GstGLDisplay in use and/or the GstGLWindow chosen.
Parameters:
context
–
the available OpenGL api
Since : 1.4
GstGL.GLContext.prototype.get_gl_api
function GstGL.GLContext.prototype.get_gl_api(): {
// javascript wrapper for 'gst_gl_context_get_gl_api'
}
Get the currently enabled OpenGL api.
The currently available API may be limited by the GstGL.GLDisplay in use and/or the GstGL.GLWindow chosen.
Parameters:
the available OpenGL api
Since : 1.4
GstGL.GLContext.get_gl_api
def GstGL.GLContext.get_gl_api (self):
#python wrapper for 'gst_gl_context_get_gl_api'
Get the currently enabled OpenGL api.
The currently available API may be limited by the GstGL.GLDisplay in use and/or the GstGL.GLWindow chosen.
Parameters:
the available OpenGL api
Since : 1.4
gst_gl_context_get_gl_context
guintptr gst_gl_context_get_gl_context (GstGLContext * context)
Gets the backing OpenGL context used by context.
Parameters:
context
–
a GstGLContext:
The platform specific backing OpenGL context
Since : 1.4
GstGL.GLContext.prototype.get_gl_context
function GstGL.GLContext.prototype.get_gl_context(): {
// javascript wrapper for 'gst_gl_context_get_gl_context'
}
Gets the backing OpenGL context used by context.
Parameters:
The platform specific backing OpenGL context
Since : 1.4
GstGL.GLContext.get_gl_context
def GstGL.GLContext.get_gl_context (self):
#python wrapper for 'gst_gl_context_get_gl_context'
Gets the backing OpenGL context used by context.
Parameters:
The platform specific backing OpenGL context
Since : 1.4
gst_gl_context_get_gl_platform
GstGLPlatform gst_gl_context_get_gl_platform (GstGLContext * context)
Gets the OpenGL platform that used by context.
Parameters:
context
–
a GstGLContext:
The platform specific backing OpenGL context
Since : 1.4
GstGL.GLContext.prototype.get_gl_platform
function GstGL.GLContext.prototype.get_gl_platform(): {
// javascript wrapper for 'gst_gl_context_get_gl_platform'
}
Gets the OpenGL platform that used by context.
Parameters:
The platform specific backing OpenGL context
Since : 1.4
GstGL.GLContext.get_gl_platform
def GstGL.GLContext.get_gl_platform (self):
#python wrapper for 'gst_gl_context_get_gl_platform'
Gets the OpenGL platform that used by context.
Parameters:
The platform specific backing OpenGL context
Since : 1.4
gst_gl_context_get_gl_platform_version
gst_gl_context_get_gl_platform_version (GstGLContext * context, gint * major, gint * minor)
Get the version of the OpenGL platform (GLX, EGL, etc) used. Only valid after a call to gst_gl_context_create.
Parameters:
context
–
major
(
[out])
–
return for the major version
minor
(
[out])
–
return for the minor version
GstGL.GLContext.prototype.get_gl_platform_version
function GstGL.GLContext.prototype.get_gl_platform_version(): {
// javascript wrapper for 'gst_gl_context_get_gl_platform_version'
}
Get the version of the OpenGL platform (GLX, EGL, etc) used. Only valid after a call to GstGL.GLContext.prototype.create.
Parameters:
GstGL.GLContext.get_gl_platform_version
def GstGL.GLContext.get_gl_platform_version (self):
#python wrapper for 'gst_gl_context_get_gl_platform_version'
Get the version of the OpenGL platform (GLX, EGL, etc) used. Only valid after a call to GstGL.GLContext.create.
Parameters:
gst_gl_context_get_gl_version
gst_gl_context_get_gl_version (GstGLContext * context, gint * maj, gint * min)
Returns the OpenGL version implemented by context. See gst_gl_context_get_gl_api for retrieving the OpenGL api implemented by context.
Parameters:
context
–
maj
(
[out])
–
resulting major version
min
(
[out])
–
resulting minor version
Since : 1.4
GstGL.GLContext.prototype.get_gl_version
function GstGL.GLContext.prototype.get_gl_version(): {
// javascript wrapper for 'gst_gl_context_get_gl_version'
}
Returns the OpenGL version implemented by context. See GstGL.GLContext.prototype.get_gl_api for retrieving the OpenGL api implemented by context.
Parameters:
Since : 1.4
GstGL.GLContext.get_gl_version
def GstGL.GLContext.get_gl_version (self):
#python wrapper for 'gst_gl_context_get_gl_version'
Returns the OpenGL version implemented by context. See GstGL.GLContext.get_gl_api for retrieving the OpenGL api implemented by context.
Parameters:
Since : 1.4
gst_gl_context_get_proc_address
gpointer gst_gl_context_get_proc_address (GstGLContext * context, const gchar * name)
Get a function pointer to a specified opengl function, name. If the the specific function does not exist, NULL is returned instead.
Platform specific functions (names starting 'egl', 'glX', 'wgl', etc) can also be retrieved using this method.
Note: This function may return valid function pointers that may not be valid to call in context. The caller is responsible for ensuring that the returned function is a valid function to call in context by either checking the OpenGL API and version or for an appropriate OpenGL extension.
Note: On success, you need to cast the returned function pointer to the
correct type to be able to call it correctly. On 32-bit Windows, this will
include the GSTGLAPI
identifier to use the correct calling convention.
e.g.
void (GSTGLAPI *PFN_glGetIntegerv) (GLenum name, GLint * ret)
a function pointer or NULL
Since : 1.4
GstGL.GLContext.prototype.get_proc_address
function GstGL.GLContext.prototype.get_proc_address(name: String): {
// javascript wrapper for 'gst_gl_context_get_proc_address'
}
Get a function pointer to a specified opengl function, name. If the the specific function does not exist, NULL is returned instead.
Platform specific functions (names starting 'egl', 'glX', 'wgl', etc) can also be retrieved using this method.
Note: This function may return valid function pointers that may not be valid to call in context. The caller is responsible for ensuring that the returned function is a valid function to call in context by either checking the OpenGL API and version or for an appropriate OpenGL extension.
Note: On success, you need to cast the returned function pointer to the
correct type to be able to call it correctly. On 32-bit Windows, this will
include the GSTGLAPI
identifier to use the correct calling convention.
e.g.
void (GSTGLAPI *PFN_glGetIntegerv) (GLenum name, GLint * ret)
Since : 1.4
GstGL.GLContext.get_proc_address
def GstGL.GLContext.get_proc_address (self, name):
#python wrapper for 'gst_gl_context_get_proc_address'
Get a function pointer to a specified opengl function, name. If the the specific function does not exist, NULL is returned instead.
Platform specific functions (names starting 'egl', 'glX', 'wgl', etc) can also be retrieved using this method.
Note: This function may return valid function pointers that may not be valid to call in context. The caller is responsible for ensuring that the returned function is a valid function to call in context by either checking the OpenGL API and version or for an appropriate OpenGL extension.
Note: On success, you need to cast the returned function pointer to the
correct type to be able to call it correctly. On 32-bit Windows, this will
include the GSTGLAPI
identifier to use the correct calling convention.
e.g.
void (GSTGLAPI *PFN_glGetIntegerv) (GLenum name, GLint * ret)
Since : 1.4
gst_gl_context_get_thread
GThread * gst_gl_context_get_thread (GstGLContext * context)
Parameters:
context
–
The GThread, context is current in or NULL
Since : 1.6
GstGL.GLContext.prototype.get_thread
function GstGL.GLContext.prototype.get_thread(): {
// javascript wrapper for 'gst_gl_context_get_thread'
}
Parameters:
The GThread (not introspectable), context is current in or NULL
Since : 1.6
GstGL.GLContext.get_thread
def GstGL.GLContext.get_thread (self):
#python wrapper for 'gst_gl_context_get_thread'
Parameters:
The GThread (not introspectable), context is current in or NULL
Since : 1.6
gst_gl_context_get_window
GstGLWindow * gst_gl_context_get_window (GstGLContext * context)
Parameters:
context
–
the currently set window
Since : 1.4
GstGL.GLContext.prototype.get_window
function GstGL.GLContext.prototype.get_window(): {
// javascript wrapper for 'gst_gl_context_get_window'
}
Parameters:
the currently set window
Since : 1.4
GstGL.GLContext.get_window
def GstGL.GLContext.get_window (self):
#python wrapper for 'gst_gl_context_get_window'
Parameters:
the currently set window
Since : 1.4
gst_gl_context_request_config
gboolean gst_gl_context_request_config (GstGLContext * context, GstStructure * gl_config)
Set the OpenGL configuration for this context. The context must not have been created for this function to succeed. Setting a NULL config has the affect of removing any specific configuration request.
Not all implementations currently support retrieving the config and this function will return FALSE when not supported.
Note that calling this function may cause a subsequent gst_gl_context_create to fail if config could not be matched with the platform-specific configuration.
Note that the actual config used may be differ from the requested values.
Parameters:
context
–
the GstGLContext
gl_config
(
[nullable][transfer: full])
–
a configuration structure for configuring the OpenGL context
whether gl_config could be successfully set on context
Since : 1.20
GstGL.GLContext.prototype.request_config
function GstGL.GLContext.prototype.request_config(gl_config: Gst.Structure): {
// javascript wrapper for 'gst_gl_context_request_config'
}
Set the OpenGL configuration for this context. The context must not have been created for this function to succeed. Setting a null config has the affect of removing any specific configuration request.
Not all implementations currently support retrieving the config and this function will return FALSE when not supported.
Note that calling this function may cause a subsequent GstGL.GLContext.prototype.create to fail if config could not be matched with the platform-specific configuration.
Note that the actual config used may be differ from the requested values.
whether gl_config could be successfully set on context
Since : 1.20
GstGL.GLContext.request_config
def GstGL.GLContext.request_config (self, gl_config):
#python wrapper for 'gst_gl_context_request_config'
Set the OpenGL configuration for this context. The context must not have been created for this function to succeed. Setting a None config has the affect of removing any specific configuration request.
Not all implementations currently support retrieving the config and this function will return FALSE when not supported.
Note that calling this function may cause a subsequent GstGL.GLContext.create to fail if config could not be matched with the platform-specific configuration.
Note that the actual config used may be differ from the requested values.
whether gl_config could be successfully set on context
Since : 1.20
gst_gl_context_set_window
gboolean gst_gl_context_set_window (GstGLContext * context, GstGLWindow * window)
Set's the current window on context to window. The window can only be changed before gst_gl_context_create has been called and the window is not already running.
Whether the window was successfully updated
Since : 1.4
GstGL.GLContext.prototype.set_window
function GstGL.GLContext.prototype.set_window(window: GstGL.GLWindow): {
// javascript wrapper for 'gst_gl_context_set_window'
}
Set's the current window on context to window. The window can only be changed before GstGL.GLContext.prototype.create has been called and the window is not already running.
Parameters:
Whether the window was successfully updated
Since : 1.4
GstGL.GLContext.set_window
def GstGL.GLContext.set_window (self, window):
#python wrapper for 'gst_gl_context_set_window'
Set's the current window on context to window. The window can only be changed before GstGL.GLContext.create has been called and the window is not already running.
Parameters:
Whether the window was successfully updated
Since : 1.4
gst_gl_context_supports_glsl_profile_version
gboolean gst_gl_context_supports_glsl_profile_version (GstGLContext * context, GstGLSLVersion version, GstGLSLProfile profile)
Whether context supports the combination of version with profile
GstGL.GLContext.prototype.supports_glsl_profile_version
function GstGL.GLContext.prototype.supports_glsl_profile_version(version: GstGL.GLSLVersion, profile: GstGL.GLSLProfile): {
// javascript wrapper for 'gst_gl_context_supports_glsl_profile_version'
}
Parameters:
Whether context supports the combination of version with profile
GstGL.GLContext.supports_glsl_profile_version
def GstGL.GLContext.supports_glsl_profile_version (self, version, profile):
#python wrapper for 'gst_gl_context_supports_glsl_profile_version'
Parameters:
Whether context supports the combination of version with profile
gst_gl_context_supports_precision
gboolean gst_gl_context_supports_precision (GstGLContext * context, GstGLSLVersion version, GstGLSLProfile profile)
whether context supports the 'precision' specifier in GLSL shaders
Since : 1.16
GstGL.GLContext.prototype.supports_precision
function GstGL.GLContext.prototype.supports_precision(version: GstGL.GLSLVersion, profile: GstGL.GLSLProfile): {
// javascript wrapper for 'gst_gl_context_supports_precision'
}
Parameters:
whether context supports the 'precision' specifier in GLSL shaders
Since : 1.16
GstGL.GLContext.supports_precision
def GstGL.GLContext.supports_precision (self, version, profile):
#python wrapper for 'gst_gl_context_supports_precision'
Parameters:
whether context supports the 'precision' specifier in GLSL shaders
Since : 1.16
gst_gl_context_supports_precision_highp
gboolean gst_gl_context_supports_precision_highp (GstGLContext * context, GstGLSLVersion version, GstGLSLProfile profile)
whether context supports the 'precision highp' specifier in GLSL shaders
Since : 1.16
GstGL.GLContext.prototype.supports_precision_highp
function GstGL.GLContext.prototype.supports_precision_highp(version: GstGL.GLSLVersion, profile: GstGL.GLSLProfile): {
// javascript wrapper for 'gst_gl_context_supports_precision_highp'
}
Parameters:
whether context supports the 'precision highp' specifier in GLSL shaders
Since : 1.16
GstGL.GLContext.supports_precision_highp
def GstGL.GLContext.supports_precision_highp (self, version, profile):
#python wrapper for 'gst_gl_context_supports_precision_highp'
Parameters:
whether context supports the 'precision highp' specifier in GLSL shaders
Since : 1.16
gst_gl_context_swap_buffers
gst_gl_context_swap_buffers (GstGLContext * context)
Swap the front and back buffers on the window attached to context. This will display the frame on the next refresh cycle.
Parameters:
context
–
GstGL.GLContext.prototype.swap_buffers
function GstGL.GLContext.prototype.swap_buffers(): {
// javascript wrapper for 'gst_gl_context_swap_buffers'
}
Swap the front and back buffers on the window attached to context. This will display the frame on the next refresh cycle.
Parameters:
GstGL.GLContext.swap_buffers
def GstGL.GLContext.swap_buffers (self):
#python wrapper for 'gst_gl_context_swap_buffers'
Swap the front and back buffers on the window attached to context. This will display the frame on the next refresh cycle.
Parameters:
gst_gl_context_thread_add
gst_gl_context_thread_add (GstGLContext * context, GstGLContextThreadFunc func, gpointer data)
Execute func in the OpenGL thread of context with data
MT-safe
Parameters:
context
–
func
(
[scope call][closure])
–
data
–
user data to call func with
Since : 1.4
GstGL.GLContext.prototype.thread_add
function GstGL.GLContext.prototype.thread_add(func: GstGL.GLContextThreadFunc, data: Object): {
// javascript wrapper for 'gst_gl_context_thread_add'
}
Execute func in the OpenGL thread of context with data
MT-safe
Parameters:
user data to call func with
Since : 1.4
GstGL.GLContext.thread_add
def GstGL.GLContext.thread_add (self, func, *data):
#python wrapper for 'gst_gl_context_thread_add'
Execute func in the OpenGL thread of context with data
MT-safe
Parameters:
user data to call func with
Since : 1.4
Functions
gst_gl_context_default_get_proc_address
gpointer gst_gl_context_default_get_proc_address (GstGLAPI gl_api, const gchar * name)
A default implementation of the various GetProcAddress functions that looks for name in the OpenGL shared libraries or in the current process.
See also: gst_gl_context_get_proc_address
an address pointing to name or NULL
Since : 1.4
GstGL.GLContext.prototype.default_get_proc_address
function GstGL.GLContext.prototype.default_get_proc_address(gl_api: GstGL.GLAPI, name: String): {
// javascript wrapper for 'gst_gl_context_default_get_proc_address'
}
A default implementation of the various GetProcAddress functions that looks for name in the OpenGL shared libraries or in the current process.
See also: GstGL.GLContext.prototype.get_proc_address
Parameters:
then function to get the address of
Since : 1.4
GstGL.GLContext.default_get_proc_address
def GstGL.GLContext.default_get_proc_address (gl_api, name):
#python wrapper for 'gst_gl_context_default_get_proc_address'
A default implementation of the various GetProcAddress functions that looks for name in the OpenGL shared libraries or in the current process.
See also: GstGL.GLContext.get_proc_address
Since : 1.4
gst_gl_context_get_current
GstGLContext * gst_gl_context_get_current ()
See also gst_gl_context_activate.
the GstGLContext active in the current thread or NULL
Since : 1.6
GstGL.GLContext.prototype.get_current
function GstGL.GLContext.prototype.get_current(): {
// javascript wrapper for 'gst_gl_context_get_current'
}
See also GstGL.GLContext.prototype.activate.
the GstGL.GLContext active in the current thread or null
Since : 1.6
GstGL.GLContext.get_current
def GstGL.GLContext.get_current ():
#python wrapper for 'gst_gl_context_get_current'
See also GstGL.GLContext.activate.
the GstGL.GLContext active in the current thread or None
Since : 1.6
gst_gl_context_get_current_gl_api
GstGLAPI gst_gl_context_get_current_gl_api (GstGLPlatform platform, guint * major, guint * minor)
If an error occurs, major and minor are not modified and GST_GL_API_NONE is returned.
Parameters:
platform
–
the GstGLPlatform to retrieve the API for
major
(
[out][allow-none])
–
the major version
minor
(
[out][allow-none])
–
the minor version
The version supported by the OpenGL context current in the calling thread or GST_GL_API_NONE
Since : 1.6
GstGL.GLContext.prototype.get_current_gl_api
function GstGL.GLContext.prototype.get_current_gl_api(platform: GstGL.GLPlatform): {
// javascript wrapper for 'gst_gl_context_get_current_gl_api'
}
If an error occurs, major and minor are not modified and GstGL.GLAPI.NONE is returned.
Parameters:
the GstGL.GLPlatform to retrieve the API for
Returns a tuple made of:
The version supported by the OpenGL context current in the calling thread or GstGL.GLAPI.NONE
The version supported by the OpenGL context current in the calling thread or GstGL.GLAPI.NONE
The version supported by the OpenGL context current in the calling thread or GstGL.GLAPI.NONE
Since : 1.6
GstGL.GLContext.get_current_gl_api
def GstGL.GLContext.get_current_gl_api (platform):
#python wrapper for 'gst_gl_context_get_current_gl_api'
If an error occurs, major and minor are not modified and GstGL.GLAPI.NONE is returned.
Parameters:
the GstGL.GLPlatform to retrieve the API for
Returns a tuple made of:
The version supported by the OpenGL context current in the calling thread or GstGL.GLAPI.NONE
The version supported by the OpenGL context current in the calling thread or GstGL.GLAPI.NONE
The version supported by the OpenGL context current in the calling thread or GstGL.GLAPI.NONE
Since : 1.6
gst_gl_context_get_current_gl_context
guintptr gst_gl_context_get_current_gl_context (GstGLPlatform context_type)
Parameters:
context_type
–
a GstGLPlatform specifying the type of context to retrieve
The OpenGL context handle current in the calling thread or NULL
Since : 1.6
GstGL.GLContext.prototype.get_current_gl_context
function GstGL.GLContext.prototype.get_current_gl_context(context_type: GstGL.GLPlatform): {
// javascript wrapper for 'gst_gl_context_get_current_gl_context'
}
Parameters:
a GstGL.GLPlatform specifying the type of context to retrieve
Since : 1.6
GstGL.GLContext.get_current_gl_context
def GstGL.GLContext.get_current_gl_context (context_type):
#python wrapper for 'gst_gl_context_get_current_gl_context'
Parameters:
a GstGL.GLPlatform specifying the type of context to retrieve
Since : 1.6
gst_gl_context_get_proc_address_with_platform
gpointer gst_gl_context_get_proc_address_with_platform (GstGLPlatform context_type, GstGLAPI gl_api, const gchar * name)
Attempts to use the context_type specific GetProcAddress implementations to retrieve name.
See also gst_gl_context_get_proc_address.
a function pointer for name, or NULL
Since : 1.6
GstGL.GLContext.prototype.get_proc_address_with_platform
function GstGL.GLContext.prototype.get_proc_address_with_platform(context_type: GstGL.GLPlatform, gl_api: GstGL.GLAPI, name: String): {
// javascript wrapper for 'gst_gl_context_get_proc_address_with_platform'
}
Attempts to use the context_type specific GetProcAddress implementations to retrieve name.
See also GstGL.GLContext.prototype.get_proc_address.
Parameters:
the name of the function to retrieve
Since : 1.6
GstGL.GLContext.get_proc_address_with_platform
def GstGL.GLContext.get_proc_address_with_platform (context_type, gl_api, name):
#python wrapper for 'gst_gl_context_get_proc_address_with_platform'
Attempts to use the context_type specific GetProcAddress implementations to retrieve name.
See also GstGL.GLContext.get_proc_address.
Parameters:
the name of the function to retrieve
Since : 1.6
Virtual Methods
activate
gboolean activate (GstGLContext * context, gboolean activate)
call eglMakeCurrent or similar
Parameters:
context
–
activate
–
vfunc_activate
function vfunc_activate(context: GstGL.GLContext, activate: Number): {
// javascript implementation of the 'activate' virtual method
}
call eglMakeCurrent or similar
Parameters:
do_activate
def do_activate (context, activate):
#python implementation of the 'activate' virtual method
call eglMakeCurrent or similar
Parameters:
check_feature
gboolean check_feature (GstGLContext * context, const gchar * feature)
Parameters:
context
–
feature
–
vfunc_check_feature
function vfunc_check_feature(context: GstGL.GLContext, feature: String): {
// javascript implementation of the 'check_feature' virtual method
}
Parameters:
do_check_feature
def do_check_feature (context, feature):
#python implementation of the 'check_feature' virtual method
Parameters:
choose_format
gboolean choose_format (GstGLContext * context, GError ** error)
choose a format for the framebuffer
Parameters:
context
–
error
–
vfunc_choose_format
function vfunc_choose_format(context: GstGL.GLContext): {
// javascript implementation of the 'choose_format' virtual method
}
choose a format for the framebuffer
Parameters:
do_choose_format
def do_choose_format (context):
#python implementation of the 'choose_format' virtual method
choose a format for the framebuffer
Parameters:
create_context
gboolean create_context (GstGLContext * context, GstGLAPI gl_api, GstGLContext * other_context, GError ** error)
create the OpenGL context
Parameters:
context
–
gl_api
–
other_context
–
error
–
vfunc_create_context
function vfunc_create_context(context: GstGL.GLContext, gl_api: GstGL.GLAPI, other_context: GstGL.GLContext): {
// javascript implementation of the 'create_context' virtual method
}
create the OpenGL context
Parameters:
do_create_context
def do_create_context (context, gl_api, other_context):
#python implementation of the 'create_context' virtual method
create the OpenGL context
Parameters:
destroy_context
destroy_context (GstGLContext * context)
destroy the OpenGL context
Parameters:
context
–
vfunc_destroy_context
function vfunc_destroy_context(context: GstGL.GLContext): {
// javascript implementation of the 'destroy_context' virtual method
}
destroy the OpenGL context
Parameters:
do_destroy_context
def do_destroy_context (context):
#python implementation of the 'destroy_context' virtual method
destroy the OpenGL context
Parameters:
get_config
GstStructure * get_config (GstGLContext * context)
Retrieve the configuration in use by this context. See also gst_gl_context_get_config.
Parameters:
context
–
the GstGLContext
the configuration chosen for this GstGLContext
Since : 1.20
vfunc_get_config
function vfunc_get_config(context: GstGL.GLContext): {
// javascript implementation of the 'get_config' virtual method
}
Retrieve the configuration in use by this context. See also GstGL.GLContext.prototype.get_config.
Parameters:
the GstGL.GLContext
the configuration chosen for this GstGL.GLContext
Since : 1.20
do_get_config
def do_get_config (context):
#python implementation of the 'get_config' virtual method
Retrieve the configuration in use by this context. See also GstGL.GLContext.get_config.
Parameters:
the GstGL.GLContext
the configuration chosen for this GstGL.GLContext
Since : 1.20
get_gl_api
GstGLAPI get_gl_api (GstGLContext * context)
get the available OpenGL api's that this context can work with
Parameters:
context
–
vfunc_get_gl_api
function vfunc_get_gl_api(context: GstGL.GLContext): {
// javascript implementation of the 'get_gl_api' virtual method
}
get the available OpenGL api's that this context can work with
Parameters:
do_get_gl_api
def do_get_gl_api (context):
#python implementation of the 'get_gl_api' virtual method
get the available OpenGL api's that this context can work with
Parameters:
get_gl_context
guintptr get_gl_context (GstGLContext * context)
get the backing platform specific OpenGL context
Parameters:
context
–
vfunc_get_gl_context
function vfunc_get_gl_context(context: GstGL.GLContext): {
// javascript implementation of the 'get_gl_context' virtual method
}
get the backing platform specific OpenGL context
Parameters:
do_get_gl_context
def do_get_gl_context (context):
#python implementation of the 'get_gl_context' virtual method
get the backing platform specific OpenGL context
Parameters:
get_gl_platform
GstGLPlatform get_gl_platform (GstGLContext * context)
Parameters:
context
–
vfunc_get_gl_platform
function vfunc_get_gl_platform(context: GstGL.GLContext): {
// javascript implementation of the 'get_gl_platform' virtual method
}
Parameters:
do_get_gl_platform
def do_get_gl_platform (context):
#python implementation of the 'get_gl_platform' virtual method
Parameters:
get_gl_platform_version
get_gl_platform_version (GstGLContext * context, gint * major, gint * minor)
Parameters:
context
–
major
–
minor
–
vfunc_get_gl_platform_version
function vfunc_get_gl_platform_version(context: GstGL.GLContext): {
// javascript implementation of the 'get_gl_platform_version' virtual method
}
Parameters:
do_get_gl_platform_version
def do_get_gl_platform_version (context):
#python implementation of the 'get_gl_platform_version' virtual method
Parameters:
request_config
gboolean request_config (GstGLContext * context, GstStructure * gl_config)
Request a configuration for this context to use.
Unknown fields within gl_config should be ignored by subclasses.
See also gst_gl_context_request_config.
Parameters:
context
–
the GstGLContext
gl_config
(
[nullable][transfer: full])
–
a configuration structure for configuring on context
Whether gl_config could be successfull set on context.
Since : 1.20
vfunc_request_config
function vfunc_request_config(context: GstGL.GLContext, gl_config: Gst.Structure): {
// javascript implementation of the 'request_config' virtual method
}
Request a configuration for this context to use.
Unknown fields within gl_config should be ignored by subclasses.
See also GstGL.GLContext.prototype.request_config.
Whether gl_config could be successfull set on context.
Since : 1.20
do_request_config
def do_request_config (context, gl_config):
#python implementation of the 'request_config' virtual method
Request a configuration for this context to use.
Unknown fields within gl_config should be ignored by subclasses.
See also GstGL.GLContext.request_config.
Whether gl_config could be successfull set on context.
Since : 1.20
swap_buffers
swap_buffers (GstGLContext * context)
swap the default framebuffer's front/back buffers
Parameters:
context
–
vfunc_swap_buffers
function vfunc_swap_buffers(context: GstGL.GLContext): {
// javascript implementation of the 'swap_buffers' virtual method
}
swap the default framebuffer's front/back buffers
Parameters:
do_swap_buffers
def do_swap_buffers (context):
#python implementation of the 'swap_buffers' virtual method
swap the default framebuffer's front/back buffers
Parameters:
Functions
gst_gl_context_error_quark
GQuark gst_gl_context_error_quark ()
the quark used for GstGLContext in GError's
GstGL.prototype.gl_context_error_quark
function GstGL.prototype.gl_context_error_quark(): {
// javascript wrapper for 'gst_gl_context_error_quark'
}
the quark used for GstGL.GLContext in GError (not introspectable)'s
GstGL.gl_context_error_quark
def GstGL.gl_context_error_quark ():
#python wrapper for 'gst_gl_context_error_quark'
the quark used for GstGL.GLContext in GError (not introspectable)'s
Enumerations
GstGLContextError
OpenGL context errors.
Members
GST_GL_CONTEXT_ERROR_FAILED
(0)
–
Failed for an unspecified reason
GST_GL_CONTEXT_ERROR_WRONG_CONFIG
(1)
–
The configuration requested is not correct
GST_GL_CONTEXT_ERROR_WRONG_API
(2)
–
The OpenGL API requested is not correct
GST_GL_CONTEXT_ERROR_OLD_LIBS
(3)
–
The OpenGL libraries are too old
GST_GL_CONTEXT_ERROR_CREATE_CONTEXT
(4)
–
glXCreateContext (or similar) failed
GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE
(5)
–
A resource is not available
GstGL.GLContextError
OpenGL context errors.
Members
GstGL.GLContextError.FAILED
(0)
–
Failed for an unspecified reason
GstGL.GLContextError.WRONG_CONFIG
(1)
–
The configuration requested is not correct
GstGL.GLContextError.WRONG_API
(2)
–
The OpenGL API requested is not correct
GstGL.GLContextError.OLD_LIBS
(3)
–
The OpenGL libraries are too old
GstGL.GLContextError.CREATE_CONTEXT
(4)
–
glXCreateContext (or similar) failed
GstGL.GLContextError.RESOURCE_UNAVAILABLE
(5)
–
A resource is not available
GstGL.GLContextError
OpenGL context errors.
Members
GstGL.GLContextError.FAILED
(0)
–
Failed for an unspecified reason
GstGL.GLContextError.WRONG_CONFIG
(1)
–
The configuration requested is not correct
GstGL.GLContextError.WRONG_API
(2)
–
The OpenGL API requested is not correct
GstGL.GLContextError.OLD_LIBS
(3)
–
The OpenGL libraries are too old
GstGL.GLContextError.CREATE_CONTEXT
(4)
–
glXCreateContext (or similar) failed
GstGL.GLContextError.RESOURCE_UNAVAILABLE
(5)
–
A resource is not available
Constants
GST_GL_CONTEXT_ERROR
#define GST_GL_CONTEXT_ERROR (gst_gl_context_error_quark ())
Error domain for GStreamer's GL context module. Errors in this domain will be from the GstGLContextError enumeration
GST_GL_CONTEXT_TYPE_CGL
#define GST_GL_CONTEXT_TYPE_CGL "gst.gl.context.CGL"
GstGL.GL_CONTEXT_TYPE_CGL
GstGL.GL_CONTEXT_TYPE_CGL
GST_GL_CONTEXT_TYPE_EAGL
#define GST_GL_CONTEXT_TYPE_EAGL "gst.gl.context.EAGL"
GstGL.GL_CONTEXT_TYPE_EAGL
GstGL.GL_CONTEXT_TYPE_EAGL
GST_GL_CONTEXT_TYPE_EGL
#define GST_GL_CONTEXT_TYPE_EGL "gst.gl.context.EGL"
GstGL.GL_CONTEXT_TYPE_EGL
GstGL.GL_CONTEXT_TYPE_EGL
GST_GL_CONTEXT_TYPE_GLX
#define GST_GL_CONTEXT_TYPE_GLX "gst.gl.context.GLX"
GstGL.GL_CONTEXT_TYPE_GLX
GstGL.GL_CONTEXT_TYPE_GLX
GST_GL_CONTEXT_TYPE_WGL
#define GST_GL_CONTEXT_TYPE_WGL "gst.gl.context.WGL"
GstGL.GL_CONTEXT_TYPE_WGL
GstGL.GL_CONTEXT_TYPE_WGL
Callbacks
GstGLContextThreadFunc
(*GstGLContextThreadFunc) (GstGLContext * context, gpointer data)
Represents a function to run in the GL thread with context and data
GstGL.GLContextThreadFunc
function GstGL.GLContextThreadFunc(context: GstGL.GLContext, data: Object): {
// javascript wrapper for 'GstGLContextThreadFunc'
}
Represents a function to run in the GL thread with context and data
GstGL.GLContextThreadFunc
def GstGL.GLContextThreadFunc (context, data):
#python wrapper for 'GstGLContextThreadFunc'
Represents a function to run in the GL thread with context and data
The results of the search are