Opaque #GstGLAllocator struct
The #GstGLAllocatorClass only contains private data
Represents information about a GL buffer
the parent object
the #GstGLContext to use for GL operations
the buffer id for this memory
the GL target of this texture for binding purposes
Initializes the GL Buffer allocator. It is safe to call this function
multiple times. This must be called before any other GstGLBaseBuffer operation.
Opaque #GstGLAllocator struct
The #GstGLBaseBufferAllocatorClass only contains private data
#GstGLBaseFilter is a base class that provides the logic of getting the
GL context from the pipeline.
the currently configured #GstGLDisplay
the currently configured #GstGLContext
a #GstGLBufferPool is an object that allocates buffers with #GstGLMemory
A #GstGLBufferPool is created with gst_gl_buffer_pool_new()
#GstGLBufferPool implements the VideoMeta buffer pool option
#GST_BUFFER_POOL_OPTION_VIDEO_META
a #GstBufferPool that allocates buffers with #GstGLMemory
the #GstGLContext to use
Set @pool<-- -->s last buffer to @buffer for #GstGLPlatform<-- -->s that
require it.
a #GstGLBufferPool
a #GstBuffer
The #GstGLBufferPoolClass structure contains only private data
#GstGLColorConvert is an object that converts between color spaces and/or
formats using OpenGL Shaders.
A #GstGLColorConvert can be created with gst_gl_color_convert_new().
For handling stride scaling in the shader, see
gst_gl_color_convert_set_texture_scaling().
a new #GstGLColorConvert object
a #GstGLContext
Converts the data contained by @inbuf using the formats specified by the
#GstVideoInfo<!-- -->s passed to gst_gl_color_convert_set_caps()
a converted #GstBuffer or %NULL%
a #GstGLColorConvert
the texture ids for input formatted according to in_info
Initializes @convert with the information required for conversion.
a #GstGLColorConvert
input #GstCaps
output #GstCaps
The #GstGLColorConvertClass struct only contains private data
#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.
Create a new #GstGLContext with the specified @display
a new #GstGLContext
a #GstGLDisplay
Wraps an existing OpenGL context into a #GstGLContext.
a #GstGLContext wrapping @handle
a #GstGLDisplay
the OpenGL context to wrap
a #GstGLPlatform specifying the type of context in @handle
a #GstGLAPI containing the available OpenGL apis in @handle
See also gst_gl_context_activate().
the #GstGLContext active in the current thread or %NULL
If an error occurs, @major and @minor aren't modified and %GST_GL_API_NONE is
returned.
The version supported by the OpenGL context current in the calling
thread or %GST_GL_API_NONE
(allow-none): the major version
(allow-none): the minor version
The OpenGL context handle current in the calling thread or %NULL
(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
a #GstGLContext
%TRUE to activate, %FALSE to deactivate
Some 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
a #GstGLContext
a platform specific feature
Get the currently enabled OpenGL api.
The currently available API may be limited by the #GstGLDisplay in use and/or
the #GstGLWindow chosen.
the available OpenGL api
a #GstGLContext
Gets the backing OpenGL context used by @context.
The platform specific backing OpenGL context
a #GstGLContext:
Gets the OpenGL platform that used by @context.
The platform specific backing OpenGL context
a #GstGLContext:
Get a function pointer to a specified opengl function, @name. If the the
specific function does not exist, NULL is returned instead.
Platform specfic functions (names starting 'egl', 'glX', 'wgl', etc) can also
be retrieved using this method.
a function pointer or NULL
a #GstGLContext
an opengl function name
(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
a #GstGLContext
%TRUE to activate, %FALSE to deactivate
whether @context and @other_context are able to share OpenGL
resources.
a #GstGLContext
another #GstGLContext
Some 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
a #GstGLContext
a platform specific feature
whether OpenGL context implements the required api and specified
version.
a #GstGLContext
api type required
major version required
minor version required
Creates an OpenGL context in the current thread with the specified
@other_context as a context to share shareable OpenGL objects with. See the
OpenGL specification for what is shared between contexts.
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
a #GstGLContext:
a #GstGLContext to share OpenGL objects with
Destroys an OpenGL context.
Should only be called after gst_gl_context_create() has been successfully
called for this context.
a #GstGLContext:
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.
a #GstGLContext:
the #GstGLDisplay associated with this @context
a #GstGLContext:
Get the currently enabled OpenGL api.
The currently available API may be limited by the #GstGLDisplay in use and/or
the #GstGLWindow chosen.
the available OpenGL api
a #GstGLContext
Gets the backing OpenGL context used by @context.
The platform specific backing OpenGL context
a #GstGLContext:
Gets the OpenGL platform that used by @context.
The platform specific backing OpenGL context
a #GstGLContext:
Returns the OpenGL version implemented by @context. See
gst_gl_context_get_gl_api() for retreiving the OpenGL api implemented by
@context.
a #GstGLContext
resulting major version
resulting minor version
Get a function pointer to a specified opengl function, @name. If the the
specific function does not exist, NULL is returned instead.
Platform specfic functions (names starting 'egl', 'glX', 'wgl', etc) can also
be retrieved using this method.
a function pointer or NULL
a #GstGLContext
an opengl function name
The #GThread, @context is current in or NULL
a #GstGLContext
the currently set window
a #GstGLContext
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
a #GstGLContext
a #GstGLWindow
Execute @func in the OpenGL thread of @context with @data
MT-safe
a #GstGLContext
a #GstGLContextThreadFunc
user data to call @func with
The platform specific backing OpenGL context
a #GstGLContext:
the available OpenGL api
a #GstGLContext
The platform specific backing OpenGL context
a #GstGLContext:
a function pointer or NULL
a #GstGLContext
an opengl function name
Whether the activation succeeded
a #GstGLContext
%TRUE to activate, %FALSE to deactivate
Whether @feature is supported by @context
a #GstGLContext
a platform specific feature
Represents a function to run in the GL thread with @context and @data
a #GstGLContext
user data
#GstGLDisplay represents a connection to the underlying windowing system.
Elements are required to make use of #GstContext to share and propogate
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', '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' and 'gles2'.
<note>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().</note>
a new #GstGLDisplay
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.
a #GstGLDisplay
a #GstGLContext
It requires the display's object lock to be held.
whether a new context could be created.
a #GstGLDisplay
other #GstGLContext to share resources with.
resulting #GstGLContext
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 retreiving the
API supported by a #GstGLContext.
a #GstGLDisplay
see gst_gl_display_filter_gl_api() for what the returned value represents
the #GstGLAPI configured for @display
a #GstGLDisplay
the #GstGLContext current on @thread or %NULL
Must be called with the object lock held.
a #GstGLDisplay
a #GThread
the #GstGLDisplayType of @display
a #GstGLDisplay
Overrides the @GstGLContext creation mechanism.
It can be called in any thread and it is emitted with
display's object lock held.
the new context.
other context to share resources with.
#GstGLDownload is an object that downloads GL textures into system memory.
A #GstGLDownload can be created with gst_gl_download_new()
a new #GstGLDownload object
a #GstGLContext
Downloads the contents of @inbuf into @outbuf.
The output buffer contents must match the #GstVideoFormat passed
to gst_gl_download_set_format(), and the input buffer must
contain #GstGLMemory memory items.
This method supports downloading multiple views.
whether the download was successful
a #GstGLDownload
a #GstBuffer input buffer
a #GstBuffer output buffer
Downloads @texture_id into @data. @data size and format is specified by
the #GstVideoFormat passed to gst_gl_download_set_format()
This method can only be used for download a single view.
whether the download was successful
a #GstGLDownload
the texture id to download
the GL texture target
where the downloaded data should go
Initializes @download with the information required for download.
a #GstGLDownload
a #GstVideoInfo
The #GstGLDownloadClass struct only contains private data
#GstGLFilter is a base class that provides the logic of getting the GL context
from downstream and automatic upload/download for non-#GstGLMemory
#GstBuffer<!-- -->s.
Perform automatic upload if needed, call filter_texture vfunc and then an
automatic download if needed.
whether the transformation succeeded
a #GstGLFilter
Draws @texture into the OpenGL scene at the specified @width and @height.
a #GstGLFilter
the texture to draw
width of @texture
height of texture
Perform automatic upload if needed, call filter_texture vfunc and then an
automatic download if needed.
whether the transformation succeeded
a #GstGLFilter
an input buffer
an output buffer
Transforms @input into @output using @func on through FBO. @resize should
only ever be %TRUE whenever @input is the input texture of @filter.
a #GstGLFilter
whether to automatically resize the texture between the input size
and the output size
the input texture
the output texture
the function to transform @input into @output. called with @data
the data associated with @func
Transforms @input into @output using @shader on FBO. @resize should
only ever be %TRUE whenever @input is the input texture of @filter.
See also: gst_gl_filter_render_to_target()
a #GstGLFilter
whether to automatically resize the texture between the input size
and the output size
the input texture
the output texture
the shader to use.
the currently configured #GstBufferPool
the video info for input buffers
the video info for output buffers
GL Framebuffer object used for transformations
GL renderbuffer attached to @fbo
whether the transformation succeeded
a #GstGLFilter
GstGLMemory is a #GstGLBaseBuffer subclass providing support for the mapping of
GL textures.
#GstGLMemory is created through gst_gl_memory_alloc() or system memory can
be wrapped through gst_gl_memory_wrapped().
Data is uploaded or downloaded from the GPU as is necessary.
the parent object
the GL texture id for this memory
the GL texture target for this memory
the texture type
the texture's #GstVideoInfo
data alignment for system memory mapping
data plane in @info
GL shader scaling parameters for @valign and/or width/height
Copies @gl_mem into the texture specfified by @tex_id. The format of @tex_id
is specified by @tex_type, @width and @height.
If @respecify is %TRUE, then the copy is performed in terms of the texture
data. This is useful for splitting RGBA textures into RG or R textures or
vice versa. The requirement for this to succeed is that the backing texture
data must be the same size, i.e. say a RGBA8 texture is converted into a RG8
texture, then the RG texture must have twice as many pixels available for
output as the RGBA texture.
Otherwise, if @respecify is %FALSE, then the copy is performed per texel
using glCopyTexImage. See the OpenGL specification for details on the
mappings between texture formats.
Whether the copy suceeded
a #GstGLMemory
OpenGL texture id
a #GstVideoGLTextureType
width of @tex_id
height of @tex_id
stride of the backing texture data
whether to copy the data or copy per texel
Allocated a new #GstGlMemory.
a #GstMemory object with a GL texture specified by @vinfo
from @context
a #GstGLContext
a #GstAllocationParams
the #GstVideoInfo of the memory
the plane this memory will represent
the #GstVideoAlignment applied to @info
Initializes the GL Memory allocator. It is safe to call this function
multiple times. This must be called before any other GstGLMemory operation.
Adds the required #GstGLMemory<!-- -->s with the correct configuration to
@buffer based on @info. This version handles padding through @valign.
whether the memory's were sucessfully added.
a #GstGLContext
a #GstAllocationParams
a #GstVideoInfo
the #GstVideoAlignment applied to @info
a #GstBuffer
Wraps per plane data pointer in @data into the corresponding entry in
@textures based on @info and padding from @valign.
whether the memory's were sucessfully created.
a #GstGLContext
a #GstVideoInfo
a #GstVideoInfo
a list of per plane data pointers
a list of #GstGLMemory
Wrapped @data into a #GstGLMemory. This version will account for padding
added to the allocation and expressed through @valign.
a #GstGLMemory object with a GL texture specified by @v_info
from @context and contents specified by @data
a #GstGLContext
the #GstVideoInfo of the memory and data
the plane this memory will represent
the #GstVideoAlignment applied to @info
the data to wrap
data called with for @notify
function called with @user_data when @data needs to be freed
Wraps a texture handle into a #GstGLMemory.
a newly allocated #GstGLMemory
a #GstGLContext
the GL texture handle
the GL texture target
the #GstVideoInfo of the memory
The plane this memory will represent
user data
Destroy callback for the user data
#GstGLUpload is an object that uploads data from system memory into GL textures.
A #GstGLUpload can be created with gst_gl_upload_new()
a new #GstGLUpload object
a #GstGLContext
The #GstCaps set by gst_gl_upload_set_caps()
a #GstGLUpload
the input #GstCaps
the output #GstCaps
Uploads @buffer to the texture given by @tex_id. @tex_id is valid
until gst_gl_upload_release_buffer() is called.
whether the upload was successful
a #GstGLUpload
a #GstBuffer
Adds the required allocation parameters to support uploading.
a #GstGLUpload
a #GstQuery from a decide allocation
the proposed allocation query
Releases any buffers currently referenced by @upload
a #GstGLUpload
Initializes @upload with the information required for upload.
whether @in_caps and @out_caps could be set on @upload
a #GstGLUpload
input #GstCaps
output #GstCaps
The #GstGLUploadClass struct only contains private data
#GstGLUploadMeta is an object that uploads data from system memory into GL textures.
A #GstGLUpload can be created with gst_gl_upload_new()
a new #GstGLUploadMeta object
a #GstGLContext
Adds a #GstVideoGLTextureUploadMeta on @buffer using @upload
whether it was successful
a #GstGLUploadMeta
a #GstBuffer
The #GstVideoInfo set by
gst_gl_upload_meta_set_format()
a #GstGLUpload
Initializes @upload with the information required for upload.
a #GstGLUpload
input #GstVideoInfo
The #GstGLUploadMetaClass struct only contains private data
No further processing required
An unspecified error occured
The configuration is unsupported.
Initializes @viewconvert with the information required for conversion.
a #GstGLViewConvert
input #GstCaps
output #GstCaps
GstGLWindow represents a window that elements can render into. A window can
either be a user visible window (onscreen) or hidden (offscreen).
a new #GstGLWindow using @display's connection
a #GstGLDisplay
Redraw the window contents. Implementations should invoke the draw callback.
a #GstGLWindow
Redraw the window contents. Implementations should invoke the draw callback.
a #GstGLWindow
the windowing system display handle for this @window
a #GstGLWindow
a #GstGLWindow
resulting surface width
resulting surface height
the window handle we are currently rendering into
a #GstGLWindow
Tell a @window that it should handle events from the window system. These
events are forwarded upstream as navigation events. In some window systems
events are not propagated in the window hierarchy if a client is listening
for them. This method allows you to disable events handling completely
from the @window.
a #GstGLWindow
a #gboolean indicating if events should be handled or not.
Quit the runloop's execution.
a #GstGLWindow
Start the execution of the runloop.
a #GstGLWindow
Invoke @callback with data on the window thread. @callback is guarenteed to
have executed when this function returns.
a #GstGLWindow
function to invoke
data to invoke @callback with
Invoke @callback with @data on the window thread. The callback may not
have been executed when this function returns.
a #GstGLWindow
function to invoke
data to invoke @callback with
called when @data is not needed anymore
Set the preferred width and height of the window. Implementations are free
to ignore this information.
a #GstGLWindow
new preferred width
new preferred height
Tell a @window that it should render into a specific region of the window
according to the #GstVideoOverlay interface.
whether the specified region could be set
a #GstGLWindow
x position
y position
width
height
Sets the window that this @window should render into. Some implementations
require this to be called with a valid handle before drawing can commence.
a #GstGLWindow
Present the window to the screen.
a #GstGLWindow
Redraw the window contents. Implementations should invoke the draw callback.
a #GstGLWindow
Redraw the window contents. Implementations should invoke the draw callback.
a #GstGLWindow
the #GstGLContext associated with this @window
a #GstGLWindow
the windowing system display handle for this @window
a #GstGLWindow
a #GstGLWindow
resulting surface width
resulting surface height
the window handle we are currently rendering into
a #GstGLWindow
Tell a @window that it should handle events from the window system. These
events are forwarded upstream as navigation events. In some window systems
events are not propagated in the window hierarchy if a client is listening
for them. This method allows you to disable events handling completely
from the @window.
a #GstGLWindow
a #gboolean indicating if events should be handled or not.
Whether the runloop is running
a #GstGLWindow
Quit the runloop's execution.
a #GstGLWindow
Start the execution of the runloop.
a #GstGLWindow
Invoke @callback with data on the window thread. @callback is guarenteed to
have executed when this function returns.
a #GstGLWindow
function to invoke
data to invoke @callback with
Invoke @callback with @data on the window thread. The callback may not
have been executed when this function returns.
a #GstGLWindow
function to invoke
data to invoke @callback with
called when @data is not needed anymore
Sets the callback called when the window is about to close.
a #GstGLWindow
function to invoke
data to invoke @callback with
called when @data is not needed any more
Sets the draw callback called everytime gst_gl_window_draw() is called
a #GstGLWindow
function to invoke
data to invoke @callback with
called when @data is not needed any more
Set the preferred width and height of the window. Implementations are free
to ignore this information.
a #GstGLWindow
new preferred width
new preferred height
Tell a @window that it should render into a specific region of the window
according to the #GstVideoOverlay interface.
whether the specified region could be set
a #GstGLWindow
x position
y position
width
height
Sets the resize callback called everytime a resize of the window occurs.
a #GstGLWindow
function to invoke
data to invoke @callback with
called when @data is not needed any more
Sets the window that this @window should render into. Some implementations
require this to be called with a valid handle before drawing can commence.
a #GstGLWindow
handle to the window
Present the window to the screen.
a #GstGLWindow
Will be emitted when a key event is received by the GstGLwindow.
the name of the event
the id of the key pressed
Will be emitted when a mouse event is received by the GstGLwindow.
the name of the event
the id of the button
the x coordinate of the mouse event
the y coordinate of the mouse event
Parent class
the windowing system display handle for this @window
a #GstGLWindow
a #GstGLWindow
the window handle we are currently rendering into
a #GstGLWindow
a #GstGLWindow
a #GstGLWindow
a #GstGLWindow
a #GstGLWindow
a #GstGLWindow
function to invoke
data to invoke @callback with
a #GstGLWindow
function to invoke
data to invoke @callback with
called when @data is not needed anymore
a #GstGLWindow
resulting surface width
resulting surface height
a #GstGLWindow
a #gboolean indicating if events should be handled or not.
a #GstGLWindow
new preferred width
new preferred height
a #GstGLWindow
whether the specified region could be set
a #GstGLWindow
x position
y position
width
height
The name of the GL buffer allocator
The currently supported formats that can be converted
The name of the GL memory allocator
Flag indicating that we should map the GL object instead of to system memory.
Combining #GST_MAP_GL with #GST_MAP_WRITE has the same semantics as though
you are writing to OpenGL. Conversely, combining #GST_MAP_GL with
#GST_MAP_READ has the same semantics as though you are reading from OpenGL.
Whether @display was in @context
a #GstContext
resulting #GstGLDisplay
Sets @display on @context
a #GstContext
resulting #GstGLDisplay
The #GstGLAPI represented by @api_s
a space seperated string of OpenGL apis
A space seperated string of the OpenGL api's enabled in @api
a #GstGLAPI to stringify
Initializes the GL Buffer allocator. It is safe to call this function
multiple times. This must be called before any other GstGLBaseBuffer operation.
Initializes the GL Memory allocator. It is safe to call this function
multiple times. This must be called before any other GstGLMemory operation.
The #GstGLPlatform represented by @platform_s
a space seperated string of OpenGL platformss
A space seperated string of the OpenGL platforms enabled in @api
a #GstGLPlatform to stringify
whether the memory at @mem is a #GstGLBaseBuffer
a #GstMemory
whether the memory at @mem is a #GstGLMemory
a #GstMemory