between multiple OpenGL contexts.
gstgl.c.types
C types for gstgl1 library
Types 104
OpenGL context errors.
Compilation stage that caused an error
GLSL profiles
GLSL version list
Output anaglyph type to generate when downmixing to mono
The OpenGL texture target that an OpenGL texture can be bound to. The [gstgl.global.glValueSetTextureTargetFromMask], [gstgl.global.glValueGetTextureTargetMask], and [gstgl.global.glValueSetTextureTarget] functions can be used for handling texture targets with #GValue's when e.g. dealing with #GstCaps.
size_t structSizethe size of the struct (including and subclass data)GstGLAllocationParamsCopyFunc copya #GstGLAllocationParamsCopyFuncGstGLAllocationParamsFreeFunc freea #GstGLAllocationParamsFreeFuncuint allocFlagsallocation flagssize_t allocSizethe allocation sizeGstAllocationParams * allocParamsthe #GstAllocationParamsGstGLContext * contexta #GstGLContextGDestroyNotify notifya #GDestroyNotifyvoid * userDataargument to call @notify withvoid * wrappedDatathe wrapped data pointervoid * glHandlethe wrapped OpenGL handlevoid *[4] Padding#GstGLAsyncDebug an opaque structure and should only be accessed through the provided API.
uint stateFlagsGstDebugCategory * catGstDebugLevel levelconst(char) * fileconst(char) * function_int lineGObject * objectchar * debugMsgGstGLAsyncDebugLogGetMessage callbackvoid * userDataGDestroyNotify notifyvoid *[4] Padding#GstGLBaseFilter handles the nitty gritty details of retrieving an OpenGL context. It also provided some wrappers around #GstBaseTransform's start(), stop() and set_caps() virtual methods that ensure an OpenGL context is available and current in the calling thread.
GstBaseTransform parentGstGLDisplay * displaythe currently configured #GstGLDisplayGstGLContext * contextthe currently configured #GstGLContextGstCaps * inCapsthe currently configured input #GstCapsGstCaps * outCapsthe currently configured output #GstCapsvoid *[4] PaddingGstGLBaseFilterPrivate * privThe base class for GStreamer GL Filter.
GstBaseTransformClass parentClassGstGLAPI supportedGlApithe logical-OR of #GstGLAPI's supported by this elementgboolean function(GstGLBaseFilter * filter) glStartcalled in the GL thread to setup the element GL state.void function(GstGLBaseFilter * filter) glStopcalled in the GL thread to setup the element GL state.gboolean function(GstGLBaseFilter * filter, GstCaps * incaps, GstCaps * outcaps) glSetCapscalled in the GL thread when caps are set on @filter. Note: this will also be called when changing OpenGL contexts where #GstBaseTransform::set_caps may not.void *[4] PaddingGstGLBaseMemory is a #GstMemory subclass providing the basis of support for the mapping of GL buffers.
Data is uploaded or downloaded from the GPU as is necessary.
GstMemory memthe parent objectGstGLContext * contextthe #GstGLContext to use for GL operationsGMutex lockGstMapFlags mapFlagsint mapCountint glMapCountvoid * dataGstGLQuery * querysize_t allocSizevoid * allocDataGDestroyNotify notifyvoid * userDatavoid *[4] PaddingOpaque #GstGLBaseMemoryAllocator struct
GstAllocatorClass parentClassthe parent classGstGLBaseMemoryAllocatorAllocFunction alloca #GstGLBaseMemoryAllocatorAllocFunctionGstGLBaseMemoryAllocatorCreateFunction createa #GstGLBaseMemoryAllocatorCreateFunctionGstGLBaseMemoryAllocatorMapFunction mapa #GstGLBaseMemoryAllocatorMapFunctionGstGLBaseMemoryAllocatorUnmapFunction unmapa #GstGLBaseMemoryAllocatorUnmapFunctionGstGLBaseMemoryAllocatorCopyFunction copya #GstGLBaseMemoryAllocatorCopyFunctionGstGLBaseMemoryAllocatorDestroyFunction destroya #GstGLBaseMemoryAllocatorDestroyFunctionvoid *[4] Padding#GstGLBaseMixer handles the nitty gritty details of retrieving an OpenGL context. It provides some virtual methods to know when the OpenGL context is available and is not available within this element.
GstVideoAggregator parentparent #GstVideoAggregatorGstGLDisplay * displaythe currently configured #GstGLDisplayGstGLContext * contextthe currently configured #GstGLContextvoid *[4] PaddingGstGLBaseMixerPrivate * privGstVideoAggregatorClass parentClassthe parent #GstVideoAggregatorClassGstGLAPI supportedGlApithe logical-OR of #GstGLAPI's supported by this elementgboolean function(GstGLBaseMixer * mix) glStartvoid function(GstGLBaseMixer * mix) glStopvoid *[4] Padding#GstGLBaseSrc handles the nitty gritty details of retrieving an OpenGL context. It also provided some wrappers around #GstBaseSrc's start() and stop() virtual methods that ensure an OpenGL context is available and current in the calling thread.
GstPushSrc parentGstGLDisplay * displaythe currently configured #GstGLDisplayGstGLContext * contextthe currently configured #GstGLContextGstVideoInfo outInfothe currently configured output #GstVideoInfoGstCaps * outCapsthe currently configured output #GstCapsGstClockTime runningTimethe total running timevoid *[4] PaddingGstGLBaseSrcPrivate * privThe base class for GStreamer GL Video sources.
GstPushSrcClass parentClassGstGLAPI supportedGlApithe logical-OR of #GstGLAPI's supported by this elementgboolean function(GstGLBaseSrc * src) glStartcalled in the GL thread to setup the element GL state.void function(GstGLBaseSrc * src) glStopcalled in the GL thread to setup the element GL state.gboolean function(GstGLBaseSrc * src, GstGLMemory * mem) fillGlMemorycalled in the GL thread to fill the current video texture.void *[4] PaddingGstGLBuffer is a #GstMemory subclass providing support for the mapping of GL buffers.
Data is uploaded or downloaded from the GPU as is necessary.
GstGLBaseMemory memthe parent objectuint idthe buffer id for this memoryuint targetthe OpenGL target of this texture for binding purposesuint usageHintsthe OpenGL usage hints this buffer was created withGstGLAllocationParams parentparent objectuint glTargetthe OpenGL target to bind the buffer touint glUsagethe OpenGL usage hint to create the buffer withvoid *[4] PaddingOpaque #GstGLBufferAllocator struct
The #GstGLBufferAllocatorClass only contains private data
a #GstGLBufferPool is an object that allocates buffers with #GstGLBaseMemory
A #GstGLBufferPool is created with [gstgl.glbuffer_pool.GLBufferPool.new_]
#GstGLBufferPool implements the VideoMeta buffer pool option [gstvideo.types.BUFFER_POOL_OPTION_VIDEO_META], the VideoAligment buffer pool option [gstvideo.types.BUFFER_POOL_OPTION_VIDEO_ALIGNMENT] as well as the OpenGL specific [gstgl.types.BUFFER_POOL_OPTION_GL_SYNC_META] buffer pool option.
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 [gstgl.glcolor_convert.GLColorConvert.new_], the configuration negotiated with [gstgl.glcolor_convert.GLColorConvert.transformCaps] and the conversion performed with [gstgl.glcolor_convert.GLColorConvert.perform].
The glcolorconvertelement provides a GStreamer element that uses #GstGLColorConvert to convert between video formats and color spaces.
GstObject parentGstGLContext * contextGstVideoInfo inInfoGstVideoInfo outInfogboolean inittedgboolean passthroughGstBuffer * inbufGstBuffer * outbufGstGLFramebuffer * fboGstGLShader * shaderGstGLColorConvertPrivate * privvoid *[4] ReservedThe #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.
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.
GstObject parentGstGLDisplay * displayGstGLWindow * windowGstGLFuncs * glVtablea list of OpenGL function pointersGstGLContextPrivate * privvoid *[4] ReservedGstObjectClass parentClasssize_t function() getCurrentContextsize_t function(GstGLContext * context) getGlContextget the backing platform specific OpenGL contextGstGLAPI function(GstGLContext * context) getGlApiget the available OpenGL api's that this context can work withGstGLPlatform function(GstGLContext * context) getGlPlatformvoid * function(GstGLAPI glApi, const(char) * name) getProcAddressget an function pointer to an OpenGL functiongboolean function(GstGLContext * context, gboolean activate) activatecall eglMakeCurrent or similargboolean function(GstGLContext * context, GError * * _err) chooseFormatchoose a format for the framebuffergboolean function(GstGLContext * context, GstGLAPI glApi, GstGLContext * otherContext, GError * * _err) createContextcreate the OpenGL contextvoid function(GstGLContext * context) destroyContextdestroy the OpenGL contextvoid function(GstGLContext * context) swapBuffersswap the default framebuffer's front/back buffersgboolean function(GstGLContext * context, const(char) * feature) checkFeaturevoid function(GstGLContext * context, int * major, int * minor) getGlPlatformVersionGstStructure * function(GstGLContext * context) getConfiggboolean function(GstGLContext * context, GstStructure * glConfig) requestConfigvoid *[2] Reserved#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 toinitialize 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\().
GstObject objectGstGLDisplayType typeGList * windowsGMainContext * mainContextGMainLoop * mainLoopGSource * eventSourceGstGLDisplayPrivate * privGstObjectClass objectClasssize_t function(GstGLDisplay * display) getHandleGstGLWindow * function(GstGLDisplay * display) createWindowvoid *[4] Padding#GstGLFilter helps to implement simple OpenGL filter elements taking a single input and producing a single output with a #GstGLFramebuffer
GstGLBaseFilter parentGstVideoInfo inInfothe video info for input buffersGstVideoInfo outInfothe video info for output buffersGstGLTextureTarget inTextureTargetThe texture target of the input buffers (usually 2D)GstGLTextureTarget outTextureTargetThe texture target of the output buffers (usually 2D)GstCaps * outCapsthe output #GstCapsGstGLFramebuffer * fbo#GstGLFramebuffer object used for transformations (only for subclass usage)gboolean glResultGstBuffer * inbufGstBuffer * outbufGstGLShader * defaultShadergboolean validAttributesuint vaouint vboIndicesuint vertexBufferint drawAttrPositionLocint drawAttrTextureLocvoid *[4] PaddingGstGLBaseFilterClass parentClassgboolean function(GstGLFilter * filter, GstCaps * incaps, GstCaps * outcaps) setCapsmirror from #GstBaseTransformgboolean function(GstGLFilter * filter, GstBuffer * inbuf, GstBuffer * outbuf) filterperform operations on the input and output buffers. In general, you should avoid using this method if at all possible. One valid use-case for using this is keeping previous buffers for future calc...gboolean function(GstGLFilter * filter, GstGLMemory * input, GstGLMemory * output) filterTexturegiven @intex, transform it into @outtex. Not used if @filter existsgboolean function(GstGLFilter * filter) initFboperform initialization when the Framebuffer object is createdGstCaps * function(GstGLFilter * filter, GstPadDirection direction, GstCaps * caps, GstCaps * filterCaps) transformInternalCapsPerform sub-class specific modifications of the caps to be processed between upload on input and before download for output.void *[4] PaddingA #GstGLFramebuffer represents and holds an OpenGL framebuffer object with it's associated attachments.
A #GstGLFramebuffer can be created with [gstgl.glframebuffer.GLFramebuffer.new_] or [gstgl.glframebuffer.GLFramebuffer.newWithDefaultDepth] and bound with [gstgl.glframebuffer.GLFramebuffer.bind]. Other resources can be bound with [gstgl.glframebuffer.GLFramebuffer.attach]
Note
GstObject objectGstGLContext * contextuint fboIdGArray * attachmentsvoid *[4] PaddingGstGLFramebufferPrivate * privOpaque #GstGLFramebufferClass struct
Structure containing function pointers to OpenGL functions.
Each field is named exactly the same as the OpenGL function without the gl prefix.
GstGLMemory is a #GstGLBaseMemory subclass providing support for the mapping of OpenGL textures.
#GstGLMemory is created or wrapped through [gstgl.glbase_memory.GLBaseMemory.alloc] with #GstGLVideoAllocationParams.
Data is uploaded or downloaded from the GPU as is necessary.
The #GstCaps that is used for #GstGLMemory based buffers should contain the [gstgl.types.CAPS_FEATURE_MEMORY_GL_MEMORY] as a #GstCapsFeatures and should contain a 'texture-target' field with one of the #GstGLTextureTarget values as a string, i.e. some combination of 'texture-target=(string){2D, rectangle, external-oes}'.
GstGLBaseMemory memthe parent #GstGLBaseMemory objectuint texIdthe GL texture id for this memoryGstGLTextureTarget texTargetthe GL texture target for this memoryGstGLFormat texFormatthe texture typeGstVideoInfo infothe texture's #GstVideoInfoGstVideoAlignment valigndata alignment for system memory mappinguint planedata plane in @infofloat[2] texScalingGL shader scaling parameters for @valign and/or width/heightgboolean textureWrappeduint unpackLengthuint texWidthvoid *[4] PaddingOpaque #GstGLMemoryAllocator struct
GstGLBaseMemoryAllocatorClass parentClassGstGLBaseMemoryAllocatorMapFunction mapprovide a custom map implementationGstGLBaseMemoryAllocatorCopyFunction copyprovide a custom copy implementationGstGLBaseMemoryAllocatorUnmapFunction unmapprovide a custom unmap implementationvoid *[4] Padding#GstGLMemoryPBO is created or wrapped through [gstgl.glbase_memory.GLBaseMemory.alloc] with #GstGLVideoAllocationParams.
Data is uploaded or downloaded from the GPU as is necessary.
Opaque #GstGLMemoryPBOAllocator struct
Only contains private data
#GstGLMixer helps implement an element that operates on RGBA textures.
GstGLBaseMixer parentGstCaps * outCapsthe configured output #GstCapsGstGLMixerPrivate * privvoid *[4] PaddingGstGLBaseMixerClass parentClassgboolean function(GstGLMixer * mix, GstBuffer * outbuf) processBuffersgboolean function(GstGLMixer * mix, GstGLMemory * outTex) processTexturesvoid *[4] PaddingGstGLBaseMixerPad parentparent #GstGLBaseMixerPaduint currentTexturethe current input texture for this padvoid *[4] PaddingOpaque #GstGLOverlayCompositor object
GstObject parentGstGLContext * contextuint lastWindowWidthuint lastWindowHeightGList * overlaysGstGLShader * shaderint positionAttribint texcoordAttribvoid *[4] PaddingA #GstGLQuery represents and holds an OpenGL query object. Various types of queries can be run or counters retrieved.
GstGLContext * contextuint queryTypeuint queryIdgboolean supportedgboolean startCalledGstGLAsyncDebug debug_void *[4] PaddingGstGLRenderbuffer is a #GstGLBaseMemory subclass providing support for OpenGL renderbuffers.
#GstGLRenderbuffer is created or wrapped through [gstgl.glbase_memory.GLBaseMemory.alloc] with #GstGLRenderbufferAllocationParams.
GstGLBaseMemory memuint renderbufferIdthe GL texture id for this memoryGstGLFormat renderbufferFormatthe texture typeuint widththe widthuint heightthe heightgboolean renderbufferWrappedvoid *[4] PaddingAllocation parameters
GstGLAllocationParams parentGstGLFormat renderbufferFormatthe #GstGLFormatuint widththe widthuint heightthe heightvoid *[4] PaddingOpaque #GstGLRenderbufferAllocator struct
The #GstGLRenderbufferAllocatorClass only contains private data
#GstGLSLStage holds and represents a single OpenGL shader stage.
Opaque #GstGLSLStageClass struct
GstObjectClass parentClass#GstGLSyncMeta provides the ability to synchronize the OpenGL command stream with the CPU or with other OpenGL contexts.
GstMeta parentthe parent #GstMetaGstGLContext * contextthe #GstGLContext used to allocate the metavoid * dataa custom data pointer for the implementationvoid function(GstGLSyncMeta * sync, GstGLContext * context) setSyncset a sync point in the OpenGL command streamvoid function(GstGLSyncMeta * sync, GstGLContext * context) setSyncGlthe same as @set_sync but called from @context's threadvoid function(GstGLSyncMeta * sync, GstGLContext * context) waitexecute a wait on the previously set sync point into the OpenGL command streamvoid function(GstGLSyncMeta * sync, GstGLContext * context) waitGlthe same as @wait but called from @context's threadvoid function(GstGLSyncMeta * sync, GstGLContext * context) waitCpuwait for the previously set sync point to pass from the CPUvoid function(GstGLSyncMeta * sync, GstGLContext * context) waitCpuGlthe same as @wait_cpu but called from @context's threadvoid function(GstGLSyncMeta * src, GstBuffer * sbuffer, GstGLSyncMeta * dest, GstBuffer * dbuffer) copycopy @data into a new #GstGLSyncMetavoid function(GstGLSyncMeta * sync, GstGLContext * context) freefree @datavoid function(GstGLSyncMeta * sync, GstGLContext * context) freeGlfree @data in @context's thread#GstGLUpload is an object that uploads data from system memory into GL textures.
A #GstGLUpload can be created with [gstgl.glupload.GLUpload.new_]
The #GstGLUploadClass struct only contains private data
GstGLAllocationParams parentthe parent #GstGLAllocationParams structureGstVideoInfo * vInfothe #GstVideoInfo to allocateuint planethe video plane index to allocateGstVideoAlignment * valignthe #GstVideoAlignment to align the system representation to (may be null for the default)GstGLTextureTarget targetthe #GstGLTextureTarget to allocateGstGLFormat texFormatthe #GstGLFormat to allocatevoid *[4] PaddingConvert stereoscopic/multiview video using fragment shaders.
GstObject objectGstGLContext * contextGstGLShader * shaderGstVideoMultiviewMode inputModeOverrideGstVideoMultiviewFlags inputFlagsOverrideGstVideoMultiviewMode outputModeOverrideGstVideoMultiviewFlags outputFlagsOverrideGstGLStereoDownmix downmixModeGstVideoInfo inInfoGstVideoInfo outInfoGstGLTextureTarget fromTextureTargetGstGLTextureTarget toTextureTargetgboolean capsPassthroughgboolean inittedgboolean reconfigureGstGLFramebuffer * fboGstGLViewConvertPrivate * privvoid *[4] PaddingOpaque #GstGLViewConvertClass struct
GstGLWindow represents a window that elements can render into. A window can either be a user visible window (onscreen) or hidden (offscreen).
GstObject parentGMutex lockGstGLDisplay * displayGWeakRef contextRefgboolean isDrawingGstGLWindowCB drawvoid * drawDataGDestroyNotify drawNotifyGstGLWindowCB closevoid * closeDataGDestroyNotify closeNotifyGstGLWindowResizeCB resizevoid * resizeDataGDestroyNotify resizeNotifygboolean queueResizeGMainContext * mainContextGstGLWindowPrivate * privvoid *[4] ReservedGstObjectClass parentClassParent classsize_t function(GstGLWindow * window) getDisplayGets the current windowing system display connectionvoid function(GstGLWindow * window, size_t handle) setWindowHandleSet a window handle to render intosize_t function(GstGLWindow * window) getWindowHandleGets the current window handle that this #GstGLWindow is rendering into. This may return a different value to what is passed into @setwindowhandlevoid function(GstGLWindow * window) drawredraw the window with the specified dimensionsvoid function(GstGLWindow * window) runrun the mainloopvoid function(GstGLWindow * window) quitsend a quit to the mainloopvoid function(GstGLWindow * window, GstGLWindowCB callback, void * data) sendMessageinvoke a function on the window thread. Required to be reentrant.void function(GstGLWindow * window, GstGLWindowCB callback, void * data, GDestroyNotify destroy) sendMessageAsyncinvoke a function on the window thread. @run may or may not have been called. Required to be reentrant.gboolean function(GstGLWindow * window, GError * * _err) openopen the connection to the displayvoid function(GstGLWindow * window) closeclose the connection to the displayvoid function(GstGLWindow * window, gboolean handleEvents) handleEventswhether to handle 'extra' events from the windowing system. Basic events like surface moves and resizes are still valid things to listen for.void function(GstGLWindow * window, int width, int height) setPreferredSizerequest that the window change surface size. The implementation is free to ignore this information.void function(GstGLWindow * window) showrequest that the window be shown to the usergboolean function(GstGLWindow * window, int x, int y, int width, int height) setRenderRectanglerequest a rectangle to render into. See #GstVideoOverlayvoid function(GstGLWindow * window) queueResizerequest a resize to occur when possiblegboolean function(GstGLWindow * window) controlsViewportWhether the window takes care of glViewport setup. and the user does not need to deal with viewportsgboolean function(GstGLWindow * window) hasOutputSurfaceWhether the window has output surface or not. (Since: 1.18)void *[2] Reserved