Documentation ¶
Index ¶
- Constants
- Variables
- func BufferPoolConfigSetGLAllocationParams(config *gst.Structure, params *GLAllocationParams)
- func ContextSetGLDisplay(context *gst.Context, display *GLDisplay)
- func GLAPIToString(api GLAPI) string
- func GLBaseMemoryErrorQuark() glib.Quark
- func GLBaseMemoryInitOnce()
- func GLBufferInitOnce()
- func GLCheckExtension(name, ext string) bool
- func GLColorConvertFixateCaps(context GLContexter, direction gst.PadDirection, caps, other *gst.Caps) *gst.Caps
- func GLColorConvertTransformCaps(context GLContexter, direction gst.PadDirection, caps, filter *gst.Caps) *gst.Caps
- func GLConfigCaveatToString(caveat GLConfigCaveat) string
- func GLConfigSurfaceTypeToString(surfaceType GLConfigSurfaceType) string
- func GLContextDefaultGetProcAddress(glApi GLAPI, name string) unsafe.Pointer
- func GLContextErrorQuark() glib.Quark
- func GLContextGetCurrentGLContext(contextType GLPlatform) uintptr
- func GLContextGetProcAddressWithPlatform(contextType GLPlatform, glApi GLAPI, name string) unsafe.Pointer
- func GLElementPropagateDisplayContext(element gst.Elementer, display *GLDisplay)
- func GLFilterAddRGBAPadTemplates(klass *GLFilterClass)
- func GLFormatIsSupported(context GLContexter, format GLFormat) bool
- func GLFormatTypeNBytes(format, typ uint) uint
- func GLGetAffineTransformationMetaAsNdc(meta *gstvideo.VideoAffineTransformationMeta) [16]float32
- func GLGetPlaneDataSize(info *gstvideo.VideoInfo, align *gstvideo.VideoAlignment, plane uint) uint
- func GLGetPlaneStart(info *gstvideo.VideoInfo, valign *gstvideo.VideoAlignment, plane uint) uint
- func GLHandleContextQuery(element gst.Elementer, query *gst.Query, display *GLDisplay, ...) bool
- func GLHandleSetContext(element gst.Elementer, context *gst.Context) (*GLDisplay, GLContexter, bool)
- func GLMemoryInitOnce()
- func GLMemoryPBOInitOnce()
- func GLMultiplyMatrix4(a, b [16]float32) [16]float32
- func GLOverlayCompositorAddCaps(caps *gst.Caps) *gst.Caps
- func GLPlatformToString(platform GLPlatform) string
- func GLRenderbufferInitOnce()
- func GLSLErrorQuark() glib.Quark
- func GLSLProfileToString(profile GLSLProfile) string
- func GLSLVersionProfileFromString(str string) (GLSLVersion, GLSLProfile, bool)
- func GLSLVersionProfileToString(version GLSLVersion, profile GLSLProfile) string
- func GLSLVersionToString(version GLSLVersion) string
- func GLSetAffineTransformationMetaFromNdc(meta *gstvideo.VideoAffineTransformationMeta, matrix [16]float32)
- func GLShaderStringFragmentExternalOesGetDefault(context GLContexter, version GLSLVersion, profile GLSLProfile) string
- func GLShaderStringFragmentGetDefault(context GLContexter, version GLSLVersion, profile GLSLProfile) string
- func GLShaderStringGetHighestPrecision(context GLContexter, version GLSLVersion, profile GLSLProfile) string
- func GLSizedGLFormatFromGLFormatType(context GLContexter, format, typ uint) uint
- func GLStereoDownmixModeGetType() coreglib.Type
- func GLSyncMetaApiGetType() coreglib.Type
- func GLSyncMetaGetInfo() *gst.MetaInfo
- func GLTextureTargetToBufferPoolOption(target GLTextureTarget) string
- func GLTextureTargetToGL(target GLTextureTarget) uint
- func GLTextureTargetToString(target GLTextureTarget) string
- func GLUploadGetInputTemplateCaps() *gst.Caps
- func GLValueSetTextureTarget(value *coreglib.Value, target GLTextureTarget) bool
- func GLValueSetTextureTargetFromMask(value *coreglib.Value, targetMask GLTextureTarget) bool
- func GLWindowErrorQuark() glib.Quark
- func GlslStringGetVersionProfile(s string) (GLSLVersion, GLSLProfile, bool)
- func IsGLBaseMemory(mem *gst.Memory) bool
- func IsGLBuffer(mem *gst.Memory) bool
- func IsGLMemory(mem *gst.Memory) bool
- func IsGLMemoryPbo(mem *gst.Memory) bool
- func IsGLRenderbuffer(mem *gst.Memory) bool
- type GLAPI
- type GLAllocationParams
- type GLAsyncDebug
- type GLAsyncDebugLogGetMessage
- type GLBaseFilter
- type GLBaseFilterClass
- type GLBaseFilterOverrides
- type GLBaseMemory
- func (glMem *GLBaseMemory) AllocData() bool
- func (g *GLBaseMemory) Context() GLContexter
- func (g *GLBaseMemory) Data() unsafe.Pointer
- func (g *GLBaseMemory) GLMapCount() int
- func (g *GLBaseMemory) MapCount() int
- func (g *GLBaseMemory) MapFlags() gst.MapFlags
- func (g *GLBaseMemory) Mem() *gst.Memory
- func (src *GLBaseMemory) Memcpy(dest *GLBaseMemory, offset int, size int) bool
- func (g *GLBaseMemory) Query() *GLQuery
- func (g *GLBaseMemory) SetGLMapCount(glMapCount int)
- func (g *GLBaseMemory) SetMapCount(mapCount int)
- type GLBaseMemoryAllocator
- type GLBaseMemoryAllocatorClass
- type GLBaseMemoryAllocatorOverrides
- type GLBaseMemoryAllocatorrer
- type GLBaseMemoryError
- type GLBaseMemoryTransfer
- type GLBaseSrc
- type GLBaseSrcClass
- type GLBaseSrcOverrides
- type GLBaseSrcer
- type GLBuffer
- type GLBufferAllocationParams
- type GLBufferAllocator
- type GLBufferAllocatorClass
- type GLBufferAllocatorOverrides
- type GLBufferPool
- type GLBufferPoolClass
- type GLBufferPoolOverrides
- type GLColorConvert
- type GLColorConvertClass
- type GLColorConvertOverrides
- type GLConfigCaveat
- type GLConfigSurfaceType
- type GLContext
- func (context *GLContext) Activate(activate bool) bool
- func (context *GLContext) CanShare(otherContext GLContexter) bool
- func (context *GLContext) CheckFeature(feature string) bool
- func (context *GLContext) CheckFramebufferStatus(fboTarget uint) bool
- func (context *GLContext) CheckGLVersion(api GLAPI, maj, min int) bool
- func (context *GLContext) ClearFramebuffer()
- func (context *GLContext) ClearShader()
- func (context *GLContext) Config() *gst.Structure
- func (context *GLContext) Create(otherContext GLContexter) error
- func (context *GLContext) Destroy()
- func (context *GLContext) Display() *GLDisplay
- func (context *GLContext) FillInfo() error
- func (context *GLContext) GLApi() GLAPI
- func (context *GLContext) GLContext() uintptr
- func (context *GLContext) GLPlatform() GLPlatform
- func (context *GLContext) GLPlatformVersion() (major, minor int)
- func (context *GLContext) GLVersion() (maj, min int)
- func (context *GLContext) IsShared() bool
- func (context *GLContext) ProcAddress(name string) unsafe.Pointer
- func (context *GLContext) RequestConfig(glConfig *gst.Structure) bool
- func (context *GLContext) SetSharedWith(share GLContexter)
- func (context *GLContext) SetWindow(window GLWindower) bool
- func (context *GLContext) SupportsGlslProfileVersion(version GLSLVersion, profile GLSLProfile) bool
- func (context *GLContext) SupportsPrecision(version GLSLVersion, profile GLSLProfile) bool
- func (context *GLContext) SupportsPrecisionHighp(version GLSLVersion, profile GLSLProfile) bool
- func (context *GLContext) SwapBuffers()
- func (context *GLContext) Window() GLWindower
- type GLContextClass
- type GLContextError
- type GLContextOverrides
- type GLContexter
- type GLDisplay
- func (display *GLDisplay) AddContext(context GLContexter) bool
- func (display *GLDisplay) ConnectCreateContext(f func(context GLContexter) (glContext GLContexter)) coreglib.SignalHandle
- func (display *GLDisplay) CreateContext(otherContext GLContexter) (GLContexter, error)
- func (display *GLDisplay) CreateWindow() GLWindower
- func (display *GLDisplay) FilterGLApi(glApi GLAPI)
- func (display *GLDisplay) GLApi() GLAPI
- func (display *GLDisplay) GLApiUnlocked() GLAPI
- func (display *GLDisplay) Handle() uintptr
- func (display *GLDisplay) HandleType() GLDisplayType
- func (display *GLDisplay) RemoveContext(context GLContexter)
- func (display *GLDisplay) RemoveWindow(window GLWindower) bool
- type GLDisplayClass
- type GLDisplayOverrides
- type GLDisplayType
- type GLFilter
- type GLFilterClass
- type GLFilterOverrides
- type GLFilterRenderFunc
- type GLFormat
- type GLFramebuffer
- type GLFramebufferClass
- type GLFramebufferOverrides
- type GLMemory
- func (glMem *GLMemory) CopyInto(texId uint, target GLTextureTarget, texFormat GLFormat, width int, height int) bool
- func (src *GLMemory) CopyTeximage(texId uint, outTarget GLTextureTarget, outTexFormat GLFormat, outWidth int, ...) bool
- func (g *GLMemory) Info() *gstvideo.VideoInfo
- func (g *GLMemory) Mem() *GLBaseMemory
- func (g *GLMemory) Plane() uint
- func (glMem *GLMemory) ReadPixels(writePointer unsafe.Pointer) bool
- func (g *GLMemory) SetPlane(plane uint)
- func (g *GLMemory) SetTexID(texId uint)
- func (g *GLMemory) SetTexWidth(texWidth uint)
- func (g *GLMemory) SetTextureWrapped(textureWrapped bool)
- func (g *GLMemory) SetUnpackLength(unpackLength uint)
- func (g *GLMemory) TexFormat() GLFormat
- func (g *GLMemory) TexID() uint
- func (g *GLMemory) TexScaling() [2]float32
- func (g *GLMemory) TexTarget() GLTextureTarget
- func (g *GLMemory) TexWidth() uint
- func (glMem *GLMemory) Texsubimage(readPointer unsafe.Pointer)
- func (glMem *GLMemory) TextureFormat() GLFormat
- func (glMem *GLMemory) TextureHeight() int
- func (glMem *GLMemory) TextureID() uint
- func (glMem *GLMemory) TextureTarget() GLTextureTarget
- func (glMem *GLMemory) TextureWidth() int
- func (g *GLMemory) TextureWrapped() bool
- func (g *GLMemory) UnpackLength() uint
- func (g *GLMemory) VAlign() *gstvideo.VideoAlignment
- type GLMemoryAllocator
- type GLMemoryAllocatorClass
- type GLMemoryAllocatorOverrides
- type GLMemoryPBO
- type GLMemoryPBOAllocator
- type GLMemoryPBOAllocatorClass
- type GLMemoryPBOAllocatorOverrides
- type GLOverlayCompositor
- type GLOverlayCompositorClass
- type GLOverlayCompositorOverrides
- type GLPlatform
- type GLQuery
- type GLQueryType
- type GLRenderbuffer
- func (glMem *GLRenderbuffer) Format() GLFormat
- func (glMem *GLRenderbuffer) Height() int
- func (glMem *GLRenderbuffer) ID() uint
- func (g *GLRenderbuffer) RenderbufferFormat() GLFormat
- func (g *GLRenderbuffer) RenderbufferID() uint
- func (g *GLRenderbuffer) RenderbufferWrapped() bool
- func (g *GLRenderbuffer) SetRenderbufferID(renderbufferId uint)
- func (g *GLRenderbuffer) SetRenderbufferWrapped(renderbufferWrapped bool)
- func (glMem *GLRenderbuffer) Width() int
- type GLRenderbufferAllocationParams
- func (g *GLRenderbufferAllocationParams) Height() uint
- func (g *GLRenderbufferAllocationParams) RenderbufferFormat() GLFormat
- func (g *GLRenderbufferAllocationParams) SetHeight(height uint)
- func (g *GLRenderbufferAllocationParams) SetWidth(width uint)
- func (g *GLRenderbufferAllocationParams) Width() uint
- type GLRenderbufferAllocator
- type GLRenderbufferAllocatorClass
- type GLRenderbufferAllocatorOverrides
- type GLSLError
- type GLSLProfile
- type GLSLStage
- func NewGLSLStage(context GLContexter, typ uint) *GLSLStage
- func NewGLSLStageDefaultFragment(context GLContexter) *GLSLStage
- func NewGLSLStageDefaultVertex(context GLContexter) *GLSLStage
- func NewGLSLStageWithString(context GLContexter, typ uint, version GLSLVersion, profile GLSLProfile, ...) *GLSLStage
- func NewGLSLStageWithStrings(context GLContexter, typ uint, version GLSLVersion, profile GLSLProfile, ...) *GLSLStage
- func (stage *GLSLStage) Compile() error
- func (stage *GLSLStage) Handle() uint
- func (stage *GLSLStage) Profile() GLSLProfile
- func (stage *GLSLStage) SetStrings(version GLSLVersion, profile GLSLProfile, str []string) bool
- func (stage *GLSLStage) ShaderType() uint
- func (stage *GLSLStage) Version() GLSLVersion
- type GLSLStageClass
- type GLSLStageOverrides
- type GLSLVersion
- type GLShader
- func (shader *GLShader) Attach(stage *GLSLStage) bool
- func (shader *GLShader) AttachUnlocked(stage *GLSLStage) bool
- func (shader *GLShader) AttributeLocation(name string) int
- func (shader *GLShader) BindAttributeLocation(index uint, name string)
- func (shader *GLShader) BindFragDataLocation(index uint, name string)
- func (shader *GLShader) CompileAttachStage(stage *GLSLStage) error
- func (shader *GLShader) Detach(stage *GLSLStage)
- func (shader *GLShader) DetachUnlocked(stage *GLSLStage)
- func (shader *GLShader) IsLinked() bool
- func (shader *GLShader) Link() error
- func (shader *GLShader) ProgramHandle() int
- func (shader *GLShader) Release()
- func (shader *GLShader) ReleaseUnlocked()
- func (shader *GLShader) SetUniform1F(name string, value float32)
- func (shader *GLShader) SetUniform1Fv(name string, value []float32)
- func (shader *GLShader) SetUniform1I(name string, value int)
- func (shader *GLShader) SetUniform1Iv(name string, value []int)
- func (shader *GLShader) SetUniform2F(name string, v0, v1 float32)
- func (shader *GLShader) SetUniform2Fv(name string, value []float32)
- func (shader *GLShader) SetUniform2I(name string, v0, v1 int)
- func (shader *GLShader) SetUniform2Iv(name string, value []int)
- func (shader *GLShader) SetUniform3F(name string, v0, v1, v2 float32)
- func (shader *GLShader) SetUniform3Fv(name string, value []float32)
- func (shader *GLShader) SetUniform3I(name string, v0, v1, v2 int)
- func (shader *GLShader) SetUniform3Iv(name string, value []int)
- func (shader *GLShader) SetUniform4F(name string, v0, v1, v2, v3 float32)
- func (shader *GLShader) SetUniform4Fv(name string, value []float32)
- func (shader *GLShader) SetUniform4I(name string, v0, v1, v2, v3 int)
- func (shader *GLShader) SetUniform4Iv(name string, value []int)
- func (shader *GLShader) SetUniformMatrix2Fv(name string, count int, transpose bool, value *float32)
- func (shader *GLShader) SetUniformMatrix2X3Fv(name string, count int, transpose bool, value *float32)
- func (shader *GLShader) SetUniformMatrix2X4Fv(name string, count int, transpose bool, value *float32)
- func (shader *GLShader) SetUniformMatrix3Fv(name string, count int, transpose bool, value *float32)
- func (shader *GLShader) SetUniformMatrix3X2Fv(name string, count int, transpose bool, value *float32)
- func (shader *GLShader) SetUniformMatrix3X4Fv(name string, count int, transpose bool, value *float32)
- func (shader *GLShader) SetUniformMatrix4Fv(name string, count int, transpose bool, value *float32)
- func (shader *GLShader) SetUniformMatrix4X2Fv(name string, count int, transpose bool, value *float32)
- func (shader *GLShader) SetUniformMatrix4X3Fv(name string, count int, transpose bool, value *float32)
- func (shader *GLShader) Use()
- type GLShaderClass
- type GLShaderOverrides
- type GLStereoDownmix
- type GLSyncMeta
- type GLTextureTarget
- type GLUpload
- func (upload *GLUpload) Caps() (inCaps, outCaps *gst.Caps)
- func (upload *GLUpload) PerformWithBuffer(buffer *gst.Buffer) (*gst.Buffer, GLUploadReturn)
- func (upload *GLUpload) ProposeAllocation(decideQuery, query *gst.Query)
- func (upload *GLUpload) SetCaps(inCaps, outCaps *gst.Caps) bool
- func (upload *GLUpload) SetContext(context GLContexter)
- func (upload *GLUpload) TransformCaps(context GLContexter, direction gst.PadDirection, caps, filter *gst.Caps) *gst.Caps
- type GLUploadClass
- type GLUploadOverrides
- type GLUploadReturn
- type GLVideoAllocationParams
- func (srcVid *GLVideoAllocationParams) CopyData(destVid *GLVideoAllocationParams)
- func (params *GLVideoAllocationParams) FreeData()
- func (g *GLVideoAllocationParams) Parent() *GLAllocationParams
- func (g *GLVideoAllocationParams) Plane() uint
- func (g *GLVideoAllocationParams) SetPlane(plane uint)
- func (g *GLVideoAllocationParams) Target() GLTextureTarget
- func (g *GLVideoAllocationParams) TexFormat() GLFormat
- func (g *GLVideoAllocationParams) VAlign() *gstvideo.VideoAlignment
- func (g *GLVideoAllocationParams) VInfo() *gstvideo.VideoInfo
- type GLViewConvert
- func (viewconvert *GLViewConvert) FixateCaps(direction gst.PadDirection, caps, othercaps *gst.Caps) *gst.Caps
- func (viewconvert *GLViewConvert) Output() (*gst.Buffer, gst.FlowReturn)
- func (viewconvert *GLViewConvert) Perform(inbuf *gst.Buffer) *gst.Buffer
- func (viewconvert *GLViewConvert) Reset()
- func (viewconvert *GLViewConvert) SetCaps(inCaps, outCaps *gst.Caps) bool
- func (viewconvert *GLViewConvert) SetContext(context GLContexter)
- func (viewconvert *GLViewConvert) SubmitInputBuffer(isDiscont bool, input *gst.Buffer) gst.FlowReturn
- func (viewconvert *GLViewConvert) TransformCaps(direction gst.PadDirection, caps, filter *gst.Caps) *gst.Caps
- type GLViewConvertClass
- type GLViewConvertOverrides
- type GLWindow
- func (window *GLWindow) ConnectKeyEvent(f func(id, key string)) coreglib.SignalHandle
- func (window *GLWindow) ConnectMouseEvent(f func(id string, button int, x, y float64)) coreglib.SignalHandle
- func (window *GLWindow) ConnectScrollEvent(f func(x, y, deltaX, deltaY float64)) coreglib.SignalHandle
- func (window *GLWindow) ConnectWindowHandleChanged(f func()) coreglib.SignalHandle
- func (window *GLWindow) Context() GLContexter
- func (window *GLWindow) ControlsViewport() bool
- func (window *GLWindow) Display() uintptr
- func (window *GLWindow) Draw()
- func (window *GLWindow) HandleEvents(handleEvents bool)
- func (window *GLWindow) HasOutputSurface() bool
- func (window *GLWindow) QueueResize()
- func (window *GLWindow) Quit()
- func (window *GLWindow) Resize(width, height uint)
- func (window *GLWindow) Run()
- func (window *GLWindow) SendKeyEvent(eventType, keyStr string)
- func (window *GLWindow) SendMouseEvent(eventType string, button int, posx, posy float64)
- func (window *GLWindow) SendScrollEvent(posx, posy, deltaX, deltaY float64)
- func (window *GLWindow) SetPreferredSize(width, height int)
- func (window *GLWindow) SetRenderRectangle(x, y, width, height int) bool
- func (window *GLWindow) SetWindowHandle(handle uintptr)
- func (window *GLWindow) Show()
- func (window *GLWindow) SurfaceDimensions() (width, height uint)
- func (window *GLWindow) WindowHandle() uintptr
- type GLWindowClass
- type GLWindowError
- type GLWindowOverrides
- type GLWindower
Constants ¶
const BUFFER_POOL_OPTION_GL_SYNC_META = "GstBufferPoolOptionGLSyncMeta"
BUFFER_POOL_OPTION_GL_SYNC_META: option that can be activated on bufferpools to request OpenGL synchronization metadata on buffers from the pool.
const BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D = "GstBufferPoolOptionGLTextureTarget2D"
BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D: string used for GST_GL_TEXTURE_TARGET_2D as a BufferPool pool option.
const BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_EXTERNAL_OES = "GstBufferPoolOptionGLTextureTargetExternalOES"
BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_EXTERNAL_OES: string used for GST_GL_TEXTURE_TARGET_EXTERNAL_OES as a BufferPool pool option.
const BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_RECTANGLE = "GstBufferPoolOptionGLTextureTargetRectangle"
BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_RECTANGLE: string used for GST_GL_TEXTURE_TARGET_RECTANGLE as a BufferPool pool option.
const CAPS_FEATURE_MEMORY_GL_BUFFER = "memory:GLBuffer"
CAPS_FEATURE_MEMORY_GL_BUFFER: name of the caps feature indicating the use of GL buffers.
const CAPS_FEATURE_MEMORY_GL_MEMORY = "memory:GLMemory"
CAPS_FEATURE_MEMORY_GL_MEMORY: name of the caps feature for indicating the use of GLMemory.
const GL_ALLOCATION_PARAMS_ALLOC_FLAG_ALLOC = 1
GL_ALLOCATION_PARAMS_ALLOC_FLAG_ALLOC: GL Allocation flag indicating that the implementation should allocate the necessary resources.
const GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER = 16
GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER: GL allocation flag indicating the allocation of a GL buffer.
const GL_ALLOCATION_PARAMS_ALLOC_FLAG_USER = 65536
GL_ALLOCATION_PARAMS_ALLOC_FLAG_USER values >= than T_GL_ALLOCATION_PARAMS_ALLOC_FLAG_USER can be used for user-defined purposes.
const GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO = 8
GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO: GL allocation flag indicating the allocation of 2D video frames.
const GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE = 4
GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE: GL Allocation flag for using the provided GPU handle as storage.
const GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM = 2
GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM: GL Allocation flag for using the provided system memory data as storage.
const GL_API_GLES1_NAME = "gles1"
GL_API_GLES1_NAME: name for GST_GL_API_GLES1 used in various places.
const GL_API_GLES2_NAME = "gles2"
GL_API_GLES2_NAME: name for GST_GL_API_GLES2 used in various places.
const GL_API_OPENGL3_NAME = "opengl3"
GL_API_OPENGL3_NAME: name for GST_GL_API_OPENGL3 used in various places.
const GL_API_OPENGL_NAME = "opengl"
GL_API_OPENGL_NAME: name for GST_GL_API_OPENGL used in various places.
const GL_BASE_MEMORY_ALLOCATOR_NAME = "GLBaseMemory"
GL_BASE_MEMORY_ALLOCATOR_NAME: name of the GL buffer allocator.
const GL_BUFFER_ALLOCATOR_NAME = "GLBuffer"
GL_BUFFER_ALLOCATOR_NAME: name of the GL buffer allocator.
const GL_COLOR_CONVERT_EXT_FORMATS = ", BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE, Y212_LE, Y412_LE"
const GL_COLOR_CONVERT_FORMATS = "" /* 234-byte string literal not displayed */
GL_COLOR_CONVERT_FORMATS: currently supported formats that can be converted.
const GL_COLOR_CONVERT_VIDEO_CAPS = "video/x-raw("
GL_COLOR_CONVERT_VIDEO_CAPS: currently supported Caps that can be converted.
const GL_CONFIG_STRUCTURE_NAME = "gst-gl-context-config"
GL_CONFIG_STRUCTURE_NAME: canonical name of a Structure that contains a configuration for a GLContext.
const GL_CONTEXT_TYPE_CGL = "gst.gl.context.CGL"
const GL_CONTEXT_TYPE_EAGL = "gst.gl.context.EAGL"
const GL_CONTEXT_TYPE_EGL = "gst.gl.context.EGL"
const GL_CONTEXT_TYPE_GLX = "gst.gl.context.GLX"
const GL_CONTEXT_TYPE_WGL = "gst.gl.context.WGL"
const GL_DISPLAY_CONTEXT_TYPE = "gst.gl.GLDisplay"
GL_DISPLAY_CONTEXT_TYPE: name used in Context queries for requesting a GLDisplay.
const GL_MEMORY_ALLOCATOR_NAME = "GLMemory"
GL_MEMORY_ALLOCATOR_NAME: name of the GL memory allocator.
const GL_MEMORY_PBO_ALLOCATOR_NAME = "GLMemoryPBO"
GL_MEMORY_PBO_ALLOCATOR_NAME: name of the GL Memory PBO allocator.
const GL_MEMORY_VIDEO_EXT_FORMATS = ", BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE, Y212_LE, Y412_LE"
const GL_MEMORY_VIDEO_FORMATS_STR = "" /* 234-byte string literal not displayed */
GL_MEMORY_VIDEO_FORMATS_STR: list of video formats that are supported by GLMemory.
const GL_RENDERBUFFER_ALLOCATOR_NAME = "GLRenderbuffer"
GL_RENDERBUFFER_ALLOCATOR_NAME: name of the GL renderbuffer allocator.
const GL_TEXTURE_TARGET_2D_STR = "2D"
GL_TEXTURE_TARGET_2D_STR: string used for GST_GL_TEXTURE_TARGET_2D in things like caps values.
const GL_TEXTURE_TARGET_EXTERNAL_OES_STR = "external-oes"
GL_TEXTURE_TARGET_EXTERNAL_OES_STR: string used for GST_GL_TEXTURE_TARGET_EXTERNAL_OES in things like caps values.
const GL_TEXTURE_TARGET_RECTANGLE_STR = "rectangle"
GL_TEXTURE_TARGET_RECTANGLE_STR: string used for GST_GL_TEXTURE_TARGET_RECTANGLE in things like caps values.
const MAP_GL = 131072
MAP_GL: flag indicating that we should map the GL object instead of to system memory.
Combining T_MAP_GL with T_MAP_WRITE has the same semantics as though you are writing to OpenGL. Conversely, combining T_MAP_GL with T_MAP_READ has the same semantics as though you are reading from OpenGL.
Variables ¶
var ( GTypeGLBaseMemoryError = coreglib.Type(C.gst_gl_base_memory_error_get_type()) GTypeGLConfigCaveat = coreglib.Type(C.gst_gl_config_caveat_get_type()) GTypeGLFormat = coreglib.Type(C.gst_gl_format_get_type()) GTypeGLQueryType = coreglib.Type(C.gst_gl_query_type_get_type()) GTypeGLUploadReturn = coreglib.Type(C.gst_gl_upload_return_get_type()) GTypeGLWindowError = coreglib.Type(C.gst_gl_window_error_get_type()) GTypeGLAPI = coreglib.Type(C.gst_gl_api_get_type()) GTypeGLBaseMemoryTransfer = coreglib.Type(C.gst_gl_base_memory_transfer_get_type()) GTypeGLConfigSurfaceType = coreglib.Type(C.gst_gl_config_surface_type_get_type()) GTypeGLDisplayType = coreglib.Type(C.gst_gl_display_type_get_type()) GTypeGLPlatform = coreglib.Type(C.gst_gl_platform_get_type()) )
GType values.
var ( GTypeGLAllocationParams = coreglib.Type(C.gst_gl_allocation_params_get_type()) GTypeGLBaseMemory = coreglib.Type(C.gst_gl_base_memory_get_type()) )
GType values.
var ( GTypeGLBufferAllocator = coreglib.Type(C.gst_gl_buffer_allocator_get_type()) GTypeGLBuffer = coreglib.Type(C.gst_gl_buffer_get_type()) GTypeGLBufferAllocationParams = coreglib.Type(C.gst_gl_buffer_allocation_params_get_type()) )
GType values.
var ( GTypeGLContextError = coreglib.Type(C.gst_gl_context_error_get_type()) GTypeGLContext = coreglib.Type(C.gst_gl_context_get_type()) )
GType values.
var ( GTypeGLMemoryAllocator = coreglib.Type(C.gst_gl_memory_allocator_get_type()) GTypeGLMemory = coreglib.Type(C.gst_gl_memory_get_type()) GTypeGLVideoAllocationParams = coreglib.Type(C.gst_gl_video_allocation_params_get_type()) )
GType values.
var ( GTypeGLMemoryPBOAllocator = coreglib.Type(C.gst_gl_memory_pbo_allocator_get_type()) GTypeGLMemoryPBO = coreglib.Type(C.gst_gl_memory_pbo_get_type()) )
GType values.
var ( GTypeGLRenderbufferAllocator = coreglib.Type(C.gst_gl_renderbuffer_allocator_get_type()) GTypeGLRenderbufferAllocationParams = coreglib.Type(C.gst_gl_renderbuffer_allocation_params_get_type()) )
GType values.
var ( GTypeGLSLError = coreglib.Type(C.gst_glsl_error_get_type()) GTypeGLSLVersion = coreglib.Type(C.gst_glsl_version_get_type()) GTypeGLSLProfile = coreglib.Type(C.gst_glsl_profile_get_type()) )
GType values.
var ( GTypeGLStereoDownmix = coreglib.Type(C.gst_gl_stereo_downmix_get_type()) GTypeGLViewConvert = coreglib.Type(C.gst_gl_view_convert_get_type()) )
GType values.
var (
GTypeGLBaseFilter = coreglib.Type(C.gst_gl_base_filter_get_type())
)
GType values.
var (
GTypeGLBaseMemoryAllocator = coreglib.Type(C.gst_gl_base_memory_allocator_get_type())
)
GType values.
var (
GTypeGLBaseSrc = coreglib.Type(C.gst_gl_base_src_get_type())
)
GType values.
var (
GTypeGLBufferPool = coreglib.Type(C.gst_gl_buffer_pool_get_type())
)
GType values.
var (
GTypeGLColorConvert = coreglib.Type(C.gst_gl_color_convert_get_type())
)
GType values.
var (
GTypeGLDisplay = coreglib.Type(C.gst_gl_display_get_type())
)
GType values.
var (
GTypeGLFilter = coreglib.Type(C.gst_gl_filter_get_type())
)
GType values.
var (
GTypeGLFramebuffer = coreglib.Type(C.gst_gl_framebuffer_get_type())
)
GType values.
var (
GTypeGLOverlayCompositor = coreglib.Type(C.gst_gl_overlay_compositor_get_type())
)
GType values.
var (
GTypeGLRenderbuffer = coreglib.Type(C.gst_gl_renderbuffer_get_type())
)
GType values.
var (
GTypeGLSLStage = coreglib.Type(C.gst_glsl_stage_get_type())
)
GType values.
var (
GTypeGLShader = coreglib.Type(C.gst_gl_shader_get_type())
)
GType values.
var (
GTypeGLTextureTarget = coreglib.Type(C.gst_gl_texture_target_get_type())
)
GType values.
var (
GTypeGLUpload = coreglib.Type(C.gst_gl_upload_get_type())
)
GType values.
var (
GTypeGLWindow = coreglib.Type(C.gst_gl_window_get_type())
)
GType values.
Functions ¶
func BufferPoolConfigSetGLAllocationParams ¶
func BufferPoolConfigSetGLAllocationParams(config *gst.Structure, params *GLAllocationParams)
BufferPoolConfigSetGLAllocationParams sets params on config.
The function takes the following parameters:
- config: buffer pool config.
- params: GLAllocationParams.
func ContextSetGLDisplay ¶
ContextSetGLDisplay sets display on context.
The function takes the following parameters:
- context: Context.
- display: resulting GLDisplay.
func GLAPIToString ¶
The function takes the following parameters:
- api to stringify.
The function returns the following values:
- utf8: space separated string of the OpenGL api's enabled in api.
func GLBaseMemoryErrorQuark ¶
func GLBaseMemoryErrorQuark() glib.Quark
The function returns the following values:
- quark used for GLBaseMemory in #GError's.
func GLBaseMemoryInitOnce ¶
func GLBaseMemoryInitOnce()
GLBaseMemoryInitOnce initializes the GL Base Memory allocator. It is safe to call this function multiple times. This must be called before any other GstGLBaseMemory operation.
func GLBufferInitOnce ¶
func GLBufferInitOnce()
GLBufferInitOnce initializes the GL Buffer allocator. It is safe to call this function multiple times. This must be called before any other GLBuffer operation.
func GLCheckExtension ¶
The function takes the following parameters:
- name: extension to search for.
- ext: list of possible extensions.
The function returns the following values:
- ok: whether name is in the space separated list of ext.
func GLColorConvertFixateCaps ¶
func GLColorConvertFixateCaps(context GLContexter, direction gst.PadDirection, caps, other *gst.Caps) *gst.Caps
GLColorConvertFixateCaps provides an implementation of BaseTransformClass.fixate_caps().
The function takes the following parameters:
- context to use for transforming caps.
- direction: PadDirection.
- caps of direction.
- other to fixate.
The function returns the following values:
- ret: fixated Caps.
func GLColorConvertTransformCaps ¶
func GLColorConvertTransformCaps(context GLContexter, direction gst.PadDirection, caps, filter *gst.Caps) *gst.Caps
GLColorConvertTransformCaps provides an implementation of BaseTransformClass.transform_caps().
The function takes the following parameters:
- context to use for transforming caps.
- direction: PadDirection.
- caps to transform.
- filter: set of filter Caps.
The function returns the following values:
- ret: converted Caps.
func GLConfigCaveatToString ¶
func GLConfigCaveatToString(caveat GLConfigCaveat) string
The function takes the following parameters:
- caveat: GLConfigCaveat.
The function returns the following values:
- utf8 (optional): string version of caveat or NULL if caveat does not exist.
func GLConfigSurfaceTypeToString ¶
func GLConfigSurfaceTypeToString(surfaceType GLConfigSurfaceType) string
The function takes the following parameters:
- surfaceType: GLConfigSurfaceType.
The function returns the following values:
- utf8 (optional): string version of caveat or NULL if surface_type does not exist.
func GLContextDefaultGetProcAddress ¶
GLContextDefaultGetProcAddress: 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().
The function takes the following parameters:
- glApi: GLAPI.
- name: then function to get the address of.
The function returns the following values:
- gpointer (optional) address pointing to name or NULL.
func GLContextErrorQuark ¶
func GLContextErrorQuark() glib.Quark
The function returns the following values:
- quark used for GLContext in #GError's.
func GLContextGetCurrentGLContext ¶
func GLContextGetCurrentGLContext(contextType GLPlatform) uintptr
The function takes the following parameters:
- contextType specifying the type of context to retrieve.
The function returns the following values:
- guintptr: openGL context handle current in the calling thread or NULL.
func GLContextGetProcAddressWithPlatform ¶
func GLContextGetProcAddressWithPlatform(contextType GLPlatform, glApi GLAPI, name string) unsafe.Pointer
GLContextGetProcAddressWithPlatform attempts to use the context_type specific GetProcAddress implementations to retrieve name.
See also gst_gl_context_get_proc_address().
The function takes the following parameters:
- contextType: GLPlatform.
- glApi: GLAPI.
- name of the function to retrieve.
The function returns the following values:
- gpointer (optional): function pointer for name, or NULL.
func GLElementPropagateDisplayContext ¶
The function takes the following parameters:
- element
- display
func GLFilterAddRGBAPadTemplates ¶
func GLFilterAddRGBAPadTemplates(klass *GLFilterClass)
The function takes the following parameters:
func GLFormatIsSupported ¶
func GLFormatIsSupported(context GLContexter, format GLFormat) bool
The function takes the following parameters:
- context: GLContext.
- format to check is supported by context.
The function returns the following values:
- ok: whether format is supported by context based on the OpenGL API, version, or available OpenGL extension/s.
func GLFormatTypeNBytes ¶
The function takes the following parameters:
- format: openGL format, GL_RGBA, GL_LUMINANCE, etc.
- typ: openGL type, GL_UNSIGNED_BYTE, GL_FLOAT, etc.
The function returns the following values:
- guint: number of bytes the specified format, type combination takes per pixel.
func GLGetAffineTransformationMetaAsNdc ¶
func GLGetAffineTransformationMetaAsNdc(meta *gstvideo.VideoAffineTransformationMeta) [16]float32
GLGetAffineTransformationMetaAsNdc retrieves the stored 4x4 affine transformation matrix stored in meta in NDC coordinates. if meta is NULL, an identity matrix is returned.
NDC is a left-handed coordinate system ¶
- x - [-1, 1] - +ve X moves right
- y - [-1, 1] - +ve Y moves up
- z - [-1, 1] - +ve Z moves into.
The function takes the following parameters:
- meta (optional): VideoAffineTransformationMeta.
The function returns the following values:
- matrix: result of the 4x4 matrix.
func GLGetPlaneDataSize ¶
GLGetPlaneDataSize: retrieve the size in bytes of a video plane of data with a certain alignment.
The function takes the following parameters:
- info: VideoInfo.
- align or NULL.
- plane number in info to retrieve the data size of.
The function returns the following values:
func GLGetPlaneStart ¶
The function takes the following parameters:
- info: VideoInfo.
- valign or NULL.
- plane number in info to retrieve the data size of.
The function returns the following values:
- gsize: difference between the supposed start of the plane from the info and where the data from the previous plane ends.
func GLHandleContextQuery ¶
func GLHandleContextQuery(element gst.Elementer, query *gst.Query, display *GLDisplay, context, otherContext GLContexter) bool
The function takes the following parameters:
- element: Element.
- query of type GST_QUERY_CONTEXT.
- display (optional): GLDisplay.
- context (optional): GLContext.
- otherContext (optional): application provided GLContext.
The function returns the following values:
- ok: whether the query was successfully responded to from the passed display, context, and other_context.
func GLHandleSetContext ¶
func GLHandleSetContext(element gst.Elementer, context *gst.Context) (*GLDisplay, GLContexter, bool)
GLHandleSetContext: helper function for implementing ElementClass.set_context() in OpenGL capable elements.
Retrieve's the GLDisplay or GLContext in context and places the result in display or other_context respectively.
The function takes the following parameters:
- element: Element.
- context: Context.
The function returns the following values:
- display: location of a GLDisplay.
- otherContext: location of a GLContext.
- ok: whether the display or other_context could be set successfully.
func GLMemoryInitOnce ¶
func GLMemoryInitOnce()
GLMemoryInitOnce initializes the GL Base Texture allocator. It is safe to call this function multiple times. This must be called before any other GstGLMemory operation.
func GLMemoryPBOInitOnce ¶
func GLMemoryPBOInitOnce()
func GLMultiplyMatrix4 ¶
GLMultiplyMatrix4 multiplies two 4x4 matrices, a and b, and stores the result, a 2-dimensional array of #gfloat, in result.
The function takes the following parameters:
- a: 2-dimensional 4x4 array of #gfloat.
- b: another 2-dimensional 4x4 array of #gfloat.
The function returns the following values:
- result of the multiplication.
func GLOverlayCompositorAddCaps ¶
The function takes the following parameters:
The function returns the following values:
func GLPlatformToString ¶
func GLPlatformToString(platform GLPlatform) string
The function takes the following parameters:
- platform to stringify.
The function returns the following values:
- utf8: space separated string of the OpenGL platforms enabled in platform.
func GLRenderbufferInitOnce ¶
func GLRenderbufferInitOnce()
GLRenderbufferInitOnce initializes the GL Base Texture allocator. It is safe to call this function multiple times. This must be called before any other GstGLRenderbuffer operation.
func GLSLErrorQuark ¶
func GLSLErrorQuark() glib.Quark
The function returns the following values:
- quark used for GstGLSL in #GError's.
func GLSLProfileToString ¶
func GLSLProfileToString(profile GLSLProfile) string
The function takes the following parameters:
- profile: GLSLProfile.
The function returns the following values:
- utf8 (optional): name for profile or NULL on error.
func GLSLVersionProfileFromString ¶
func GLSLVersionProfileFromString(str string) (GLSLVersion, GLSLProfile, bool)
GLSLVersionProfileFromString: note: this function expects either a #version GLSL preprocesser directive or a valid GLSL version and/or profile.
The function takes the following parameters:
- str: valid GLSL #version string.
The function returns the following values:
- versionRet: resulting GLSLVersion.
- profileRet: resulting GLSLVersion.
- ok: TRUE if a valid #version string was found, FALSE otherwise.
func GLSLVersionProfileToString ¶
func GLSLVersionProfileToString(version GLSLVersion, profile GLSLProfile) string
The function takes the following parameters:
- version: GLSLVersion.
- profile: GLSLVersion.
The function returns the following values:
- utf8: combined GLSL #version string for version and profile.
func GLSLVersionToString ¶
func GLSLVersionToString(version GLSLVersion) string
The function takes the following parameters:
- version: GLSLVersion.
The function returns the following values:
- utf8 (optional): name of version or NULL on error.
func GLSetAffineTransformationMetaFromNdc ¶
func GLSetAffineTransformationMetaFromNdc(meta *gstvideo.VideoAffineTransformationMeta, matrix [16]float32)
GLSetAffineTransformationMetaFromNdc: set the 4x4 affine transformation matrix stored in meta from the NDC coordinates in matrix.
The function takes the following parameters:
- meta: VideoAffineTransformationMeta.
- matrix: 4x4 matrix.
func GLShaderStringFragmentExternalOesGetDefault ¶
func GLShaderStringFragmentExternalOesGetDefault(context GLContexter, version GLSLVersion, profile GLSLProfile) string
The function takes the following parameters:
- context: GLContext.
- version: GLSLVersion.
- profile: GLSLProfile.
The function returns the following values:
- utf8: passthrough shader string for copying an input external-oes texture to the output.
func GLShaderStringFragmentGetDefault ¶
func GLShaderStringFragmentGetDefault(context GLContexter, version GLSLVersion, profile GLSLProfile) string
The function takes the following parameters:
- context: GLContext.
- version: GLSLVersion.
- profile: GLSLProfile.
The function returns the following values:
- utf8: passthrough shader string for copying an input texture to the output.
func GLShaderStringGetHighestPrecision ¶
func GLShaderStringGetHighestPrecision(context GLContexter, version GLSLVersion, profile GLSLProfile) string
GLShaderStringGetHighestPrecision generates a shader string that defines the precision of float types in GLSL shaders. This is particularly needed for fragment shaders in a GLSL ES context where there is no default precision specified.
Practically, this will return the string 'precision mediump float' or 'precision highp float' depending on if high precision floats are determined to be supported.
The function takes the following parameters:
- context: GLContext.
- version: GLSLVersion.
- profile: GLSLProfile.
The function returns the following values:
- utf8: shader string defining the precision of float types based on context, version and profile.
func GLSizedGLFormatFromGLFormatType ¶
func GLSizedGLFormatFromGLFormatType(context GLContexter, format, typ uint) uint
The function takes the following parameters:
- context: GLContext.
- format: openGL format, GL_RGBA, GL_LUMINANCE, etc.
- typ: openGL type, GL_UNSIGNED_BYTE, GL_FLOAT, etc.
The function returns the following values:
- guint: sized internal format specified by format and type that can be used in context.
func GLStereoDownmixModeGetType ¶
The function returns the following values:
func GLSyncMetaApiGetType ¶
The function returns the following values:
func GLSyncMetaGetInfo ¶
The function returns the following values:
func GLTextureTargetToBufferPoolOption ¶
func GLTextureTargetToBufferPoolOption(target GLTextureTarget) string
The function takes the following parameters:
- target: GLTextureTarget.
The function returns the following values:
- utf8: string representing the GstBufferPoolOption specified by target.
func GLTextureTargetToGL ¶
func GLTextureTargetToGL(target GLTextureTarget) uint
The function takes the following parameters:
- target: GLTextureTarget.
The function returns the following values:
- guint: openGL value for binding the target with glBindTexture() and similar functions or 0.
func GLTextureTargetToString ¶
func GLTextureTargetToString(target GLTextureTarget) string
The function takes the following parameters:
- target: GLTextureTarget.
The function returns the following values:
- utf8: stringified version of target or NULL.
func GLUploadGetInputTemplateCaps ¶
The function returns the following values:
func GLValueSetTextureTarget ¶
func GLValueSetTextureTarget(value *coreglib.Value, target GLTextureTarget) bool
The function takes the following parameters:
- value: initialized #GValue of type G_TYPE_STRING.
- target: GLTextureTarget's.
The function returns the following values:
- ok: whether the target could be set on value.
func GLValueSetTextureTargetFromMask ¶
func GLValueSetTextureTargetFromMask(value *coreglib.Value, targetMask GLTextureTarget) bool
GLValueSetTextureTargetFromMask: mask is a bitwise OR of (1 << target) where target is a valid GLTextureTarget.
The function takes the following parameters:
- value: uninitialized #GValue.
- targetMask: bitwise mask of GLTextureTarget's.
The function returns the following values:
- ok: whether the target_mask could be set on value.
func GLWindowErrorQuark ¶
func GLWindowErrorQuark() glib.Quark
The function returns the following values:
- quark used for GLWindow in #GError's.
func GlslStringGetVersionProfile ¶
func GlslStringGetVersionProfile(s string) (GLSLVersion, GLSLProfile, bool)
GlslStringGetVersionProfile: note: this function first searches the first 1 kilobytes for a #version preprocessor directive and then executes gst_glsl_version_profile_from_string().
The function takes the following parameters:
- s: string to search for a valid #version string.
The function returns the following values:
- version: resulting GLSLVersion.
- profile: resulting GLSLProfile.
- ok: TRUE if a valid #version string was found, FALSE otherwise.
func IsGLBaseMemory ¶
The function takes the following parameters:
- mem: Memory.
The function returns the following values:
- ok: whether the memory at mem is a GLBaseMemory.
func IsGLBuffer ¶
The function takes the following parameters:
- mem: Memory.
The function returns the following values:
- ok: whether the memory at mem is a GLBuffer.
func IsGLMemory ¶
The function takes the following parameters:
- mem: Memory.
The function returns the following values:
- ok: whether the memory at mem is a GLMemory.
func IsGLMemoryPbo ¶
The function takes the following parameters:
- mem: Memory.
The function returns the following values:
- ok: whether the memory at mem is a GLMemoryPBO.
func IsGLRenderbuffer ¶
The function takes the following parameters:
- mem: Memory.
The function returns the following values:
- ok: whether the memory at mem is a GLRenderbuffer.
Types ¶
type GLAPI ¶
const ( // GLApiNone: no API. GLApiNone GLAPI = 0b0 // GLApiOpengl: desktop OpenGL up to and including 3.1. The compatibility // profile when the OpenGL version is >= 3.2. GLApiOpengl GLAPI = 0b1 // GLApiOpengl3: desktop OpenGL >= 3.2 core profile. GLApiOpengl3 GLAPI = 0b10 // GLApiGles1: openGL ES 1.x. GLApiGles1 GLAPI = 0b1000000000000000 // GLApiGles2: openGL ES 2.x and 3.x. GLApiGles2 GLAPI = 0b10000000000000000 // GLApiAny: any OpenGL API. GLApiAny GLAPI = 0b11111111111111111111111111111111 )
func GLAPIFromString ¶
The function takes the following parameters:
- apiS: space separated string of OpenGL apis.
The function returns the following values:
- glapI represented by api_s.
func GLContextGetCurrentGLApi ¶
func GLContextGetCurrentGLApi(platform GLPlatform) (major, minor uint, glapI GLAPI)
GLContextGetCurrentGLApi: if an error occurs, major and minor are not modified and GST_GL_API_NONE is returned.
The function takes the following parameters:
- platform to retrieve the API for.
The function returns the following values:
- major (optional) version.
- minor (optional) version.
- glapI: version supported by the OpenGL context current in the calling thread or GST_GL_API_NONE.
type GLAllocationParams ¶
type GLAllocationParams struct {
// contains filtered or unexported fields
}
GLAllocationParams: instance of this type is always passed by reference.
func BufferPoolConfigGetGLAllocationParams ¶
func BufferPoolConfigGetGLAllocationParams(config *gst.Structure) *GLAllocationParams
The function takes the following parameters:
- config: buffer pool config.
The function returns the following values:
- glAllocationParams: currently set GLAllocationParams or NULL.
func (*GLAllocationParams) Copy ¶
func (src *GLAllocationParams) Copy() *GLAllocationParams
The function returns the following values:
- glAllocationParams: copy of the GLAllocationParams specified by src or NULL on failure.
func (*GLAllocationParams) CopyData ¶
func (src *GLAllocationParams) CopyData(dest *GLAllocationParams)
CopyData copies the dynamically allocated data from src to dest. Direct subclasses should call this function in their own overridden copy function.
The function takes the following parameters:
- dest: destination GLAllocationParams.
func (*GLAllocationParams) FreeData ¶
func (params *GLAllocationParams) FreeData()
FreeData frees the dynamically allocated data in params. Direct subclasses should call this function in their own overridden free function.
type GLAsyncDebug ¶
type GLAsyncDebug struct {
// contains filtered or unexported fields
}
GLAsyncDebug an opaque structure and should only be accessed through the provided API.
An instance of this type is always passed by reference.
func (*GLAsyncDebug) Freeze ¶
func (ad *GLAsyncDebug) Freeze()
Freeze: freeze the debug output. While frozen, any call to gst_gl_async_debug_output_log_msg() will not output any messages but subsequent calls to gst_gl_async_debug_store_log_msg() will overwrite previous messages.
func (*GLAsyncDebug) Init ¶
func (ad *GLAsyncDebug) Init()
Init: initialize ad. Intended for use with GLAsyncDebug's that are embedded in other structs.
func (*GLAsyncDebug) OutputLogMsg ¶
func (ad *GLAsyncDebug) OutputLogMsg()
OutputLogMsg outputs a previously stored debug message.
func (*GLAsyncDebug) Thaw ¶
func (ad *GLAsyncDebug) Thaw()
Thaw: unfreeze the debug output. See gst_gl_async_debug_freeze() for what freezing means.
func (*GLAsyncDebug) Unset ¶
func (ad *GLAsyncDebug) Unset()
Unset any dynamically allocated data. Intended for use with GLAsyncDebug's that are embedded in other structs.
type GLAsyncDebugLogGetMessage ¶
type GLAsyncDebugLogGetMessage func() (utf8 string)
type GLBaseFilter ¶
type GLBaseFilter struct { gstbase.BaseTransform // contains filtered or unexported fields }
GLBaseFilter handles the nitty gritty details of retrieving an OpenGL context. It also provided some wrappers around BaseTransform's start(), stop() and set_caps() virtual methods that ensure an OpenGL context is available and current in the calling thread.
func (*GLBaseFilter) FindGLContext ¶
func (filter *GLBaseFilter) FindGLContext() bool
The function returns the following values:
- ok: whether an OpenGL context could be retrieved or created successfully.
func (*GLBaseFilter) GLContext ¶
func (filter *GLBaseFilter) GLContext() GLContexter
The function returns the following values:
- glContext (optional) found by filter.
type GLBaseFilterClass ¶
type GLBaseFilterClass struct {
// contains filtered or unexported fields
}
GLBaseFilterClass: base class for GStreamer GL Filter.
An instance of this type is always passed by reference.
func (*GLBaseFilterClass) ParentClass ¶
func (g *GLBaseFilterClass) ParentClass() *gstbase.BaseTransformClass
func (*GLBaseFilterClass) SupportedGLApi ¶
func (g *GLBaseFilterClass) SupportedGLApi() GLAPI
SupportedGLApi: logical-OR of GLAPI's supported by this element.
type GLBaseFilterOverrides ¶
type GLBaseFilterOverrides struct { // The function takes the following parameters: // // - incaps // - outcaps // // The function returns the following values: // GLSetCaps func(incaps, outcaps *gst.Caps) bool // The function returns the following values: // GLStart func() bool GLStop func() }
GLBaseFilterOverrides contains methods that are overridable.
type GLBaseMemory ¶
type GLBaseMemory struct {
// contains filtered or unexported fields
}
GLBaseMemory is a Memory subclass providing the basis of support for the mapping of GL buffers.
Data is uploaded or downloaded from the GPU as is necessary.
An instance of this type is always passed by reference.
func GLBaseMemoryAlloc ¶
func GLBaseMemoryAlloc(allocator GLBaseMemoryAllocatorrer, params *GLAllocationParams) *GLBaseMemory
The function takes the following parameters:
- allocator: GLBaseMemoryAllocator.
- params to allocate the memory with.
The function returns the following values:
- glBaseMemory: new GLBaseMemory from allocator with the requested params.
func (*GLBaseMemory) AllocData ¶
func (glMem *GLBaseMemory) AllocData() bool
AllocData: note: only intended for subclass usage to allocate the system memory buffer on demand. If there is already a non-NULL data pointer in gl_mem->data, then this function imply returns TRUE.
The function returns the following values:
- ok: whether the system memory could be allocated.
func (*GLBaseMemory) Context ¶
func (g *GLBaseMemory) Context() GLContexter
Context to use for GL operations.
func (*GLBaseMemory) Data ¶
func (g *GLBaseMemory) Data() unsafe.Pointer
func (*GLBaseMemory) GLMapCount ¶
func (g *GLBaseMemory) GLMapCount() int
func (*GLBaseMemory) MapCount ¶
func (g *GLBaseMemory) MapCount() int
func (*GLBaseMemory) MapFlags ¶
func (g *GLBaseMemory) MapFlags() gst.MapFlags
func (*GLBaseMemory) Memcpy ¶
func (src *GLBaseMemory) Memcpy(dest *GLBaseMemory, offset int, size int) bool
The function takes the following parameters:
- dest: destination GLBaseMemory.
- offset to start at.
- size: number of bytes to copy.
The function returns the following values:
- ok: whether the copy succeeded.
func (*GLBaseMemory) Query ¶
func (g *GLBaseMemory) Query() *GLQuery
func (*GLBaseMemory) SetGLMapCount ¶
func (g *GLBaseMemory) SetGLMapCount(glMapCount int)
func (*GLBaseMemory) SetMapCount ¶
func (g *GLBaseMemory) SetMapCount(mapCount int)
type GLBaseMemoryAllocator ¶
GLBaseMemoryAllocator: opaque GLBaseMemoryAllocator struct.
func BaseGLBaseMemoryAllocator ¶
func BaseGLBaseMemoryAllocator(obj GLBaseMemoryAllocatorrer) *GLBaseMemoryAllocator
BaseGLBaseMemoryAllocator returns the underlying base object.
type GLBaseMemoryAllocatorClass ¶
type GLBaseMemoryAllocatorClass struct {
// contains filtered or unexported fields
}
GLBaseMemoryAllocatorClass: instance of this type is always passed by reference.
type GLBaseMemoryAllocatorOverrides ¶
type GLBaseMemoryAllocatorOverrides struct { // The function takes the following parameters: // // - params to allocate the memory with. // // The function returns the following values: // // - glBaseMemory: newly allocated GLBaseMemory from allocator and params. // Alloc func(params *GLAllocationParams) *GLBaseMemory }
GLBaseMemoryAllocatorOverrides contains methods that are overridable.
type GLBaseMemoryAllocatorrer ¶
type GLBaseMemoryAllocatorrer interface { coreglib.Objector // contains filtered or unexported methods }
GLBaseMemoryAllocatorrer describes types inherited from class GLBaseMemoryAllocator.
To get the original type, the caller must assert this to an interface or another type.
type GLBaseMemoryError ¶
const ( // GLBaseMemoryErrorFailed: generic failure. GLBaseMemoryErrorFailed GLBaseMemoryError = iota // GLBaseMemoryErrorOldLibs: implementation is too old and doesn't implement // enough features. GLBaseMemoryErrorOldLibs GLBaseMemoryErrorResourceUnavailable )
func (GLBaseMemoryError) String ¶
func (g GLBaseMemoryError) String() string
String returns the name in string for GLBaseMemoryError.
type GLBaseMemoryTransfer ¶
const ( // GLBaseMemoryTransferNeedDownload: texture needs downloading to the data // pointer. GLBaseMemoryTransferNeedDownload GLBaseMemoryTransfer = 0b100000000000000000000 // GLBaseMemoryTransferNeedUpload: data pointer needs uploading to the // texture. GLBaseMemoryTransferNeedUpload GLBaseMemoryTransfer = 0b1000000000000000000000 )
func (GLBaseMemoryTransfer) Has ¶
func (g GLBaseMemoryTransfer) Has(other GLBaseMemoryTransfer) bool
Has returns true if g contains other.
func (GLBaseMemoryTransfer) String ¶
func (g GLBaseMemoryTransfer) String() string
String returns the names in string for GLBaseMemoryTransfer.
type GLBaseSrc ¶
GLBaseSrc handles the nitty gritty details of retrieving an OpenGL context. It also provided some wrappers around BaseSrc's start() and stop() virtual methods that ensure an OpenGL context is available and current in the calling thread.
func BaseGLBaseSrc ¶
func BaseGLBaseSrc(obj GLBaseSrcer) *GLBaseSrc
BaseGLBaseSrc returns the underlying base object.
type GLBaseSrcClass ¶
type GLBaseSrcClass struct {
// contains filtered or unexported fields
}
GLBaseSrcClass: base class for GStreamer GL Video sources.
An instance of this type is always passed by reference.
func (*GLBaseSrcClass) ParentClass ¶
func (g *GLBaseSrcClass) ParentClass() *gstbase.PushSrcClass
func (*GLBaseSrcClass) SupportedGLApi ¶
func (g *GLBaseSrcClass) SupportedGLApi() GLAPI
SupportedGLApi: logical-OR of GLAPI's supported by this element.
type GLBaseSrcOverrides ¶
type GLBaseSrcOverrides struct { // The function takes the following parameters: // // The function returns the following values: // FillGLMemory func(mem *GLMemory) bool // The function returns the following values: // GLStart func() bool GLStop func() }
GLBaseSrcOverrides contains methods that are overridable.
type GLBaseSrcer ¶
GLBaseSrcer describes types inherited from class GLBaseSrc.
To get the original type, the caller must assert this to an interface or another type.
type GLBuffer ¶
type GLBuffer struct {
// contains filtered or unexported fields
}
GLBuffer is a Memory subclass providing support for the mapping of GL buffers.
Data is uploaded or downloaded from the GPU as is necessary.
An instance of this type is always passed by reference.
func (*GLBuffer) SetUsageHints ¶
UsageHints: openGL usage hints this buffer was created with.
func (*GLBuffer) UsageHints ¶
UsageHints: openGL usage hints this buffer was created with.
type GLBufferAllocationParams ¶
type GLBufferAllocationParams struct {
// contains filtered or unexported fields
}
GLBufferAllocationParams: instance of this type is always passed by reference.
func NewGLBufferAllocationParams ¶
func NewGLBufferAllocationParams(context GLContexter, allocSize uint, allocParams *gst.AllocationParams, glTarget uint, glUsage uint) *GLBufferAllocationParams
NewGLBufferAllocationParams constructs a struct GLBufferAllocationParams.
func (*GLBufferAllocationParams) GLTarget ¶
func (g *GLBufferAllocationParams) GLTarget() uint
GLTarget: openGL target to bind the buffer to.
func (*GLBufferAllocationParams) GLUsage ¶
func (g *GLBufferAllocationParams) GLUsage() uint
GLUsage: openGL usage hint to create the buffer with.
func (*GLBufferAllocationParams) Parent ¶
func (g *GLBufferAllocationParams) Parent() *GLAllocationParams
Parent: parent object.
func (*GLBufferAllocationParams) SetGLTarget ¶
func (g *GLBufferAllocationParams) SetGLTarget(glTarget uint)
GLTarget: openGL target to bind the buffer to.
func (*GLBufferAllocationParams) SetGLUsage ¶
func (g *GLBufferAllocationParams) SetGLUsage(glUsage uint)
GLUsage: openGL usage hint to create the buffer with.
type GLBufferAllocator ¶
type GLBufferAllocator struct { GLBaseMemoryAllocator // contains filtered or unexported fields }
GLBufferAllocator: opaque GLBufferAllocator struct.
type GLBufferAllocatorClass ¶
type GLBufferAllocatorClass struct {
// contains filtered or unexported fields
}
GLBufferAllocatorClass only contains private data
An instance of this type is always passed by reference.
func (*GLBufferAllocatorClass) ParentClass ¶
func (g *GLBufferAllocatorClass) ParentClass() *GLBaseMemoryAllocatorClass
type GLBufferAllocatorOverrides ¶
type GLBufferAllocatorOverrides struct { }
GLBufferAllocatorOverrides contains methods that are overridable.
type GLBufferPool ¶
type GLBufferPool struct { gst.BufferPool // contains filtered or unexported fields }
GLBufferPool is an object that allocates buffers with GLBaseMemory
A GLBufferPool is created with gst_gl_buffer_pool_new()
GLBufferPool implements the VideoMeta buffer pool option GST_BUFFER_POOL_OPTION_VIDEO_META, the VideoAligment buffer pool option GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT as well as the OpenGL specific GST_BUFFER_POOL_OPTION_GL_SYNC_META buffer pool option.
func NewGLBufferPool ¶
func NewGLBufferPool(context GLContexter) *GLBufferPool
The function takes the following parameters:
- context to use.
The function returns the following values:
- glBufferPool that allocates buffers with GLMemory.
func (*GLBufferPool) GLAllocationParams ¶
func (pool *GLBufferPool) GLAllocationParams() *GLAllocationParams
GLAllocationParams: returned GLAllocationParams will by NULL before the first successful call to gst_buffer_pool_set_config(). Subsequent successful calls to gst_buffer_pool_set_config() will cause this function to return a new GLAllocationParams which may or may not contain the same information.
The function returns the following values:
- glAllocationParams: copy of the GLAllocationParams being used by the pool.
type GLBufferPoolClass ¶
type GLBufferPoolClass struct {
// contains filtered or unexported fields
}
GLBufferPoolClass structure contains only private data
An instance of this type is always passed by reference.
func (*GLBufferPoolClass) ParentClass ¶
func (g *GLBufferPoolClass) ParentClass() *gst.BufferPoolClass
type GLBufferPoolOverrides ¶
type GLBufferPoolOverrides struct { }
GLBufferPoolOverrides contains methods that are overridable.
type GLColorConvert ¶
GLColorConvert is an object that converts between color spaces and/or formats using OpenGL Shaders.
A GLColorConvert can be created with gst_gl_color_convert_new(), the configuration negotiated with gst_gl_color_convert_transform_caps() and the conversion performed with gst_gl_color_convert_perform().
The glcolorconvertelement provides a GStreamer element that uses GLColorConvert to convert between video formats and color spaces.
func NewGLColorConvert ¶
func NewGLColorConvert(context GLContexter) *GLColorConvert
The function takes the following parameters:
- context: GLContext.
The function returns the following values:
- glColorConvert: new GLColorConvert object.
func (*GLColorConvert) DecideAllocation ¶
func (convert *GLColorConvert) DecideAllocation(query *gst.Query) bool
DecideAllocation provides an implementation of BaseTransformClass.decide_allocation().
The function takes the following parameters:
- query: completed ALLOCATION Query.
The function returns the following values:
- ok: whether the allocation parameters were successfully chosen.
func (*GLColorConvert) Perform ¶
func (convert *GLColorConvert) Perform(inbuf *gst.Buffer) *gst.Buffer
Perform converts the data contained by inbuf using the formats specified by the Caps passed to gst_gl_color_convert_set_caps().
The function takes the following parameters:
- inbuf filled Buffer to convert.
The function returns the following values:
- buffer: converted Buffer or NULL.
func (*GLColorConvert) SetCaps ¶
func (convert *GLColorConvert) SetCaps(inCaps, outCaps *gst.Caps) bool
SetCaps initializes convert with the information required for conversion.
The function takes the following parameters:
- inCaps: input Caps.
- outCaps: output Caps.
The function returns the following values:
type GLColorConvertClass ¶
type GLColorConvertClass struct {
// contains filtered or unexported fields
}
GLColorConvertClass struct only contains private data
An instance of this type is always passed by reference.
type GLColorConvertOverrides ¶
type GLColorConvertOverrides struct { }
GLColorConvertOverrides contains methods that are overridable.
type GLConfigCaveat ¶
const ( // GLConfigCaveatNone: none. GLConfigCaveatNone GLConfigCaveat = iota // GLConfigCaveatSlow: slow. GLConfigCaveatSlow // GLConfigCaveatNonConformant: non-conformant. GLConfigCaveatNonConformant )
func (GLConfigCaveat) String ¶
func (g GLConfigCaveat) String() string
String returns the name in string for GLConfigCaveat.
type GLConfigSurfaceType ¶
const ( // GLConfigSurfaceTypeNone: none. GLConfigSurfaceTypeNone GLConfigSurfaceType = 0b0 // GLConfigSurfaceTypeWindow: window. GLConfigSurfaceTypeWindow GLConfigSurfaceType = 0b1 // GLConfigSurfaceTypePbuffer: pbuffer. GLConfigSurfaceTypePbuffer GLConfigSurfaceType = 0b10 // GLConfigSurfaceTypePixmap: pixmap. GLConfigSurfaceTypePixmap GLConfigSurfaceType = 0b100 )
func (GLConfigSurfaceType) Has ¶
func (g GLConfigSurfaceType) Has(other GLConfigSurfaceType) bool
Has returns true if g contains other.
func (GLConfigSurfaceType) String ¶
func (g GLConfigSurfaceType) String() string
String returns the names in string for GLConfigSurfaceType.
type GLContext ¶
GLContext 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 GLAPI 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.
func BaseGLContext ¶
func BaseGLContext(obj GLContexter) *GLContext
BaseGLContext returns the underlying base object.
func NewGLContext ¶
NewGLContext: create a new GLContext with the specified display.
The function takes the following parameters:
- display: GLDisplay.
The function returns the following values:
- glContext: new GLContext.
func NewGLContextWrapped ¶
func NewGLContextWrapped(display *GLDisplay, handle uintptr, contextType GLPlatform, availableApis GLAPI) *GLContext
NewGLContextWrapped wraps an existing OpenGL context into a GLContext.
Note: The caller is responsible for ensuring that the OpenGL context represented by handle stays alive while the returned GLContext 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.
The function takes the following parameters:
- display: GLDisplay.
- handle: openGL context to wrap.
- contextType specifying the type of context in handle.
- availableApis containing the available OpenGL apis in handle.
The function returns the following values:
- glContext wrapping handle.
func (*GLContext) Activate ¶
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.
The function takes the following parameters:
- activate: TRUE to activate, FALSE to deactivate.
The function returns the following values:
- ok: whether the activation succeeded.
func (*GLContext) CanShare ¶
func (context *GLContext) CanShare(otherContext GLContexter) bool
CanShare: note: This will always fail for two wrapped GLContext's.
The function takes the following parameters:
- otherContext: another GLContext.
The function returns the following values:
- ok: whether context and other_context are able to share OpenGL resources.
func (*GLContext) CheckFeature ¶
CheckFeature: 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.
The function takes the following parameters:
- feature: platform specific feature.
The function returns the following values:
- ok: whether feature is supported by context.
func (*GLContext) CheckFramebufferStatus ¶
CheckFramebufferStatus: must be called with context current.
The function takes the following parameters:
- fboTarget: GL value of the framebuffer target, GL_FRAMEBUFFER, GL_READ_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER.
The function returns the following values:
- ok: whether whether the current framebuffer is complete.
func (*GLContext) CheckGLVersion ¶
The function takes the following parameters:
- api type required.
- maj: major version required.
- min: minor version required.
The function returns the following values:
- ok: whether OpenGL context implements the required api and specified version.
func (*GLContext) ClearFramebuffer ¶
func (context *GLContext) ClearFramebuffer()
ClearFramebuffer: unbind the current framebuffer.
func (*GLContext) ClearShader ¶
func (context *GLContext) ClearShader()
ClearShader clear's the currently set shader from the GL state machine.
Note: must be called in the GL thread.
func (*GLContext) Config ¶
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.
The function returns the following values:
- structure (optional): configuration chosen for this OpenGL context.
func (*GLContext) Create ¶
func (context *GLContext) Create(otherContext GLContexter) error
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 Structure 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.
The function takes the following parameters:
- otherContext (optional) to share OpenGL objects with.
func (*GLContext) Destroy ¶
func (context *GLContext) Destroy()
Destroy destroys an OpenGL context.
Should only be called after gst_gl_context_create() has been successfully called for this context.
func (*GLContext) Display ¶
The function returns the following values:
- glDisplay associated with this context.
func (*GLContext) FillInfo ¶
FillInfo 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 GLContext's.
func (*GLContext) GLApi ¶
GLApi: get the currently enabled OpenGL api.
The currently available API may be limited by the GLDisplay in use and/or the GLWindow chosen.
The function returns the following values:
- glapI: available OpenGL api.
func (*GLContext) GLContext ¶
GLContext gets the backing OpenGL context used by context.
The function returns the following values:
- guintptr: platform specific backing OpenGL context.
func (*GLContext) GLPlatform ¶
func (context *GLContext) GLPlatform() GLPlatform
GLPlatform gets the OpenGL platform that used by context.
The function returns the following values:
- glPlatform: platform specific backing OpenGL context.
func (*GLContext) GLPlatformVersion ¶
GLPlatformVersion: get the version of the OpenGL platform (GLX, EGL, etc) used. Only valid after a call to gst_gl_context_create().
The function returns the following values:
- major: return for the major version.
- minor: return for the minor version.
func (*GLContext) GLVersion ¶
GLVersion returns the OpenGL version implemented by context. See gst_gl_context_get_gl_api() for retrieving the OpenGL api implemented by context.
The function returns the following values:
- maj: resulting major version.
- min: resulting minor version.
func (*GLContext) IsShared ¶
The function returns the following values:
- ok: whether the GLContext has been shared with another GLContext.
func (*GLContext) ProcAddress ¶
ProcAddress: 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).
The function takes the following parameters:
- name: opengl function name.
The function returns the following values:
- gpointer (optional): function pointer or NULL.
func (*GLContext) RequestConfig ¶
RequestConfig: 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.
The function takes the following parameters:
- glConfig (optional): configuration structure for configuring the OpenGL context.
The function returns the following values:
- ok: whether gl_config could be successfully set on context.
func (*GLContext) SetSharedWith ¶
func (context *GLContext) SetSharedWith(share GLContexter)
SetSharedWith will internally set context as shared with share.
The function takes the following parameters:
- share: another GLContext.
func (*GLContext) SetWindow ¶
func (context *GLContext) SetWindow(window GLWindower) bool
SetWindow 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.
The function takes the following parameters:
- window: GLWindow.
The function returns the following values:
- ok: whether the window was successfully updated.
func (*GLContext) SupportsGlslProfileVersion ¶
func (context *GLContext) SupportsGlslProfileVersion(version GLSLVersion, profile GLSLProfile) bool
The function takes the following parameters:
- version: GLSLVersion.
- profile: GLSLProfile.
The function returns the following values:
- ok: whether context supports the combination of version with profile.
func (*GLContext) SupportsPrecision ¶
func (context *GLContext) SupportsPrecision(version GLSLVersion, profile GLSLProfile) bool
The function takes the following parameters:
- version: GLSLVersion.
- profile: GLSLProfile.
The function returns the following values:
- ok: whether context supports the 'precision' specifier in GLSL shaders.
func (*GLContext) SupportsPrecisionHighp ¶
func (context *GLContext) SupportsPrecisionHighp(version GLSLVersion, profile GLSLProfile) bool
The function takes the following parameters:
- version: GLSLVersion.
- profile: GLSLProfile.
The function returns the following values:
- ok: whether context supports the 'precision highp' specifier in GLSL shaders.
func (*GLContext) SwapBuffers ¶
func (context *GLContext) SwapBuffers()
SwapBuffers: swap the front and back buffers on the window attached to context. This will display the frame on the next refresh cycle.
func (*GLContext) Window ¶
func (context *GLContext) Window() GLWindower
The function returns the following values:
- glWindow (optional): currently set window.
type GLContextClass ¶
type GLContextClass struct {
// contains filtered or unexported fields
}
GLContextClass: instance of this type is always passed by reference.
func (*GLContextClass) ParentClass ¶
func (g *GLContextClass) ParentClass() *gst.ObjectClass
type GLContextError ¶
GLContextError: openGL context errors.
const ( // GLContextErrorFailed: failed for an unspecified reason. GLContextErrorFailed GLContextError = iota // GLContextErrorWrongConfig: configuration requested is not correct. GLContextErrorWrongConfig // GLContextErrorWrongApi: openGL API requested is not correct. GLContextErrorWrongApi // GLContextErrorOldLibs: openGL libraries are too old. GLContextErrorOldLibs // GLContextErrorCreateContext: glXCreateContext (or similar) failed. GLContextErrorCreateContext GLContextErrorResourceUnavailable )
func (GLContextError) String ¶
func (g GLContextError) String() string
String returns the name in string for GLContextError.
type GLContextOverrides ¶
type GLContextOverrides struct { // 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. // // The function takes the following parameters: // // - activate: TRUE to activate, FALSE to deactivate. // // The function returns the following values: // // - ok: whether the activation succeeded. // Activate func(activate bool) bool // CheckFeature: 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. // // The function takes the following parameters: // // - feature: platform specific feature. // // The function returns the following values: // // - ok: whether feature is supported by context. // CheckFeature func(feature string) bool ChooseFormat func() error // The function takes the following parameters: // // - glApi // - otherContext // CreateContext func(glApi GLAPI, otherContext GLContexter) error DestroyContext func() // 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. // // The function returns the following values: // // - structure (optional): configuration chosen for this OpenGL context. // Config func() *gst.Structure // GLApi: get the currently enabled OpenGL api. // // The currently available API may be limited by the GLDisplay in use and/or // the GLWindow chosen. // // The function returns the following values: // // - glapI: available OpenGL api. // GLApi func() GLAPI // GLContext gets the backing OpenGL context used by context. // // The function returns the following values: // // - guintptr: platform specific backing OpenGL context. // GLContext func() uintptr // GLPlatform gets the OpenGL platform that used by context. // // The function returns the following values: // // - glPlatform: platform specific backing OpenGL context. // GLPlatform func() GLPlatform // GLPlatformVersion: get the version of the OpenGL platform (GLX, EGL, etc) // used. Only valid after a call to gst_gl_context_create(). // // The function returns the following values: // // - major: return for the major version. // - minor: return for the minor version. // GLPlatformVersion func() (major, minor int) // RequestConfig: 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. // // The function takes the following parameters: // // - glConfig (optional): configuration structure for configuring the // OpenGL context. // // The function returns the following values: // // - ok: whether gl_config could be successfully set on context. // RequestConfig func(glConfig *gst.Structure) bool // SwapBuffers: swap the front and back buffers on the window attached to // context. This will display the frame on the next refresh cycle. SwapBuffers func() }
GLContextOverrides contains methods that are overridable.
type GLContexter ¶
GLContexter describes types inherited from class GLContext.
To get the original type, the caller must assert this to an interface or another type.
func GLContextGetCurrent ¶
func GLContextGetCurrent() GLContexter
GLContextGetCurrent: see also gst_gl_context_activate().
The function returns the following values:
- glContext active in the current thread or NULL.
type GLDisplay ¶
GLDisplay represents a connection to the underlying windowing system. Elements are required to make use of Context to share and propagate a GLDisplay.
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', 'opengl3' and 'gles2'.
> Certain window systems require a special function to be called to > initialize threading support. As this GStreamer GL library does not preclude > concurrent access to the windowing system, it is strongly advised that > applications ensure that threading support has been initialized before any > other toolkit/library functionality is accessed. Failure to do so could > result in sudden application abortion during execution. The most notably > example of such a function is X11's XInitThreads\().
func ContextGetGLDisplay ¶
The function takes the following parameters:
- context: Context.
The function returns the following values:
- display: resulting GLDisplay.
- ok: whether display was in context.
func NewGLDisplay ¶
func NewGLDisplay() *GLDisplay
The function returns the following values:
- glDisplay: new GLDisplay.
func NewGLDisplayWithType ¶
func NewGLDisplayWithType(typ GLDisplayType) *GLDisplay
NewGLDisplayWithType will always return a GLDisplay of a single type. This differs from gst_gl_display_new() and the seemingly equivalent call gst_gl_display_new_with_type (GST_GL_DISPLAY_TYPE_ANY) in that the latter may return NULL.
The function takes the following parameters:
- typ: GLDisplayType.
The function returns the following values:
- glDisplay (optional): new GLDisplay or NULL if type is not supported.
func (*GLDisplay) AddContext ¶
func (display *GLDisplay) AddContext(context GLContexter) bool
The function takes the following parameters:
- context: GLContext.
The function returns the following values:
ok: 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.
func (*GLDisplay) ConnectCreateContext ¶
func (display *GLDisplay) ConnectCreateContext(f func(context GLContexter) (glContext GLContexter)) coreglib.SignalHandle
ConnectCreateContext overrides the GstGLContext creation mechanism. It can be called in any thread and it is emitted with display's object lock held.
func (*GLDisplay) CreateContext ¶
func (display *GLDisplay) CreateContext(otherContext GLContexter) (GLContexter, error)
CreateContext: it requires the display's object lock to be held.
The function takes the following parameters:
- otherContext: other GLContext to share resources with.
The function returns the following values:
- pContext: resulting GLContext.
func (*GLDisplay) CreateWindow ¶
func (display *GLDisplay) CreateWindow() GLWindower
The function returns the following values:
- glWindow: new GLWindow for display or NULL.
func (*GLDisplay) FilterGLApi ¶
FilterGLApi: limit the use of OpenGL to the requested gl_api. This is intended to allow application and elements to request a specific set of OpenGL API's based on what they support. See gst_gl_context_get_gl_api() for the retrieving the API supported by a GLContext.
The function takes the following parameters:
- glApi to filter with.
func (*GLDisplay) GLApi ¶
GLApi: see gst_gl_display_filter_gl_api() for what the returned value represents.
The function returns the following values:
- glapI configured for display.
func (*GLDisplay) GLApiUnlocked ¶
The function returns the following values:
func (*GLDisplay) Handle ¶
The function returns the following values:
- guintptr: native handle for the display.
func (*GLDisplay) HandleType ¶
func (display *GLDisplay) HandleType() GLDisplayType
The function returns the following values:
- glDisplayType of display.
func (*GLDisplay) RemoveContext ¶
func (display *GLDisplay) RemoveContext(context GLContexter)
RemoveContext: must be called with the object lock held.
The function takes the following parameters:
- context to remove.
func (*GLDisplay) RemoveWindow ¶
func (display *GLDisplay) RemoveWindow(window GLWindower) bool
The function takes the following parameters:
- window to remove.
The function returns the following values:
- ok: if window could be removed from display.
type GLDisplayClass ¶
type GLDisplayClass struct {
// contains filtered or unexported fields
}
GLDisplayClass: instance of this type is always passed by reference.
func (*GLDisplayClass) ObjectClass ¶
func (g *GLDisplayClass) ObjectClass() *gst.ObjectClass
type GLDisplayOverrides ¶
type GLDisplayOverrides struct { // The function returns the following values: // // - glWindow: new GLWindow for display or NULL. // CreateWindow func() GLWindower // The function returns the following values: // // - guintptr: native handle for the display. // Handle func() uintptr }
GLDisplayOverrides contains methods that are overridable.
type GLDisplayType ¶
const ( // GLDisplayTypeNone: no display type. GLDisplayTypeNone GLDisplayType = 0b0 // GLDisplayTypeX11: x11 display. GLDisplayTypeX11 GLDisplayType = 0b1 // GLDisplayTypeWayland: wayland display. GLDisplayTypeWayland GLDisplayType = 0b10 // GLDisplayTypeCocoa: cocoa display. GLDisplayTypeCocoa GLDisplayType = 0b100 // GLDisplayTypeWin32: win32 display. GLDisplayTypeWin32 GLDisplayType = 0b1000 // GLDisplayTypeDispmanx: dispmanx display. GLDisplayTypeDispmanx GLDisplayType = 0b10000 // GLDisplayTypeEgl: EGL display. GLDisplayTypeEgl GLDisplayType = 0b100000 // GLDisplayTypeVivFb: vivante Framebuffer display. GLDisplayTypeVivFb GLDisplayType = 0b1000000 // GLDisplayTypeGbm: mesa3D GBM display. GLDisplayTypeGbm GLDisplayType = 0b10000000 // GLDisplayTypeEglDevice: EGLDevice display. GLDisplayTypeEglDevice GLDisplayType = 0b100000000 // GLDisplayTypeEagl: EAGL display. GLDisplayTypeEagl GLDisplayType = 0b1000000000 // GLDisplayTypeWinrt: winRT display. GLDisplayTypeWinrt GLDisplayType = 0b10000000000 // GLDisplayTypeAndroid: android display. GLDisplayTypeAndroid GLDisplayType = 0b100000000000 // GLDisplayTypeAny: any display type. GLDisplayTypeAny GLDisplayType = 0b11111111111111111111111111111111 )
func (GLDisplayType) Has ¶
func (g GLDisplayType) Has(other GLDisplayType) bool
Has returns true if g contains other.
func (GLDisplayType) String ¶
func (g GLDisplayType) String() string
String returns the names in string for GLDisplayType.
type GLFilter ¶
type GLFilter struct { GLBaseFilter // contains filtered or unexported fields }
GLFilter helps to implement simple OpenGL filter elements taking a single input and producing a single output with a GLFramebuffer.
func (*GLFilter) DrawFullscreenQuad ¶
func (filter *GLFilter) DrawFullscreenQuad()
DrawFullscreenQuad: render a fullscreen quad using the current GL state. The only GL state this modifies is the necessary vertex/index buffers and, if necessary, a Vertex Array Object for drawing a fullscreen quad. Framebuffer state, any shaders, viewport state, etc must be setup by the caller.
func (*GLFilter) FilterTexture ¶
FilterTexture calls filter_texture vfunc with correctly mapped GLMemorys.
The function takes the following parameters:
- input buffer.
- output buffer.
The function returns the following values:
- ok: whether the transformation succeeded.
func (*GLFilter) RenderToTarget ¶
func (filter *GLFilter) RenderToTarget(input, output *GLMemory, fn GLFilterRenderFunc) bool
RenderToTarget transforms input into output using func on through FBO.
The function takes the following parameters:
- input texture.
- output texture.
- fn: function to transform input into output. called with data.
The function returns the following values:
- ok: return value of func.
func (*GLFilter) RenderToTargetWithShader ¶
RenderToTargetWithShader transforms input into output using shader with a FBO.
See also: gst_gl_filter_render_to_target().
The function takes the following parameters:
- input texture.
- output texture.
- shader to use.
type GLFilterClass ¶
type GLFilterClass struct {
// contains filtered or unexported fields
}
GLFilterClass: instance of this type is always passed by reference.
func (*GLFilterClass) ParentClass ¶
func (g *GLFilterClass) ParentClass() *GLBaseFilterClass
type GLFilterOverrides ¶
type GLFilterOverrides struct { // The function takes the following parameters: // // - inbuf // - outbuf // // The function returns the following values: // Filter func(inbuf, outbuf *gst.Buffer) bool // FilterTexture calls filter_texture vfunc with correctly mapped GLMemorys. // // The function takes the following parameters: // // - input buffer. // - output buffer. // // The function returns the following values: // // - ok: whether the transformation succeeded. // FilterTexture func(input, output *GLMemory) bool // The function returns the following values: // InitFbo func() bool // The function takes the following parameters: // // - incaps // - outcaps // // The function returns the following values: // SetCaps func(incaps, outcaps *gst.Caps) bool // The function takes the following parameters: // // - direction // - caps // - filterCaps // // The function returns the following values: // TransformInternalCaps func(direction gst.PadDirection, caps, filterCaps *gst.Caps) *gst.Caps }
GLFilterOverrides contains methods that are overridable.
type GLFilterRenderFunc ¶
type GLFormat ¶
const ( // GLLuminance: single component replicated across R, G, and B textures // components. GLLuminance GLFormat = 6409 // GLAlpha: single component stored in the A texture component. GLAlpha GLFormat = 6406 // GLLuminanceAlpha: combination of T_GL_LUMINANCE and T_GL_ALPHA. GLLuminanceAlpha GLFormat = 6410 // GLRed: single component stored in the R texture component. GLRed GLFormat = 6403 // GLR8: single 8-bit component stored in the R texture component. GLR8 GLFormat = 33321 // GLRg: two components stored in the R and G texture components. GLRg GLFormat = 33319 // GLRg8: two 8-bit components stored in the R and G texture components. GLRg8 GLFormat = 33323 // GLRgb: three components stored in the R, G, and B texture components. GLRgb GLFormat = 6407 // GLRgb8: three 8-bit components stored in the R, G, and B texture // components. GLRgb8 GLFormat = 32849 // GLRgb565: three components of bit depth 5, 6 and 5 stored in the R, G, // and B texture components respectively. GLRgb565 GLFormat = 36194 // GLRgb16: three 16-bit components stored in the R, G, and B texture // components. GLRgb16 GLFormat = 32852 // GLRgba: four components stored in the R, G, B, and A texture components // respectively. GLRgba GLFormat = 6408 // GLRgba8: four 8-bit components stored in the R, G, B, and A texture // components respectively. GLRgba8 GLFormat = 32856 // GLRgba16: four 16-bit components stored in the R, G, B, and A texture // components respectively. GLRgba16 GLFormat = 32859 // GLDepthComponent16: single 16-bit component for depth information. GLDepthComponent16 GLFormat = 33189 // GLDepth24Stencil8: 24-bit component for depth information and a 8-bit // component for stencil informat. GLDepth24Stencil8 GLFormat = 35056 GLRgb10A2 GLFormat = 32857 // GLR16: single 16-bit component stored in the R texture component. GLR16 GLFormat = 33322 // GLRg16: two 16-bit components stored in the R and G texture components. GLRg16 GLFormat = 33324 )
func GLFormatFromVideoInfo ¶
func GLFormatFromVideoInfo(context GLContexter, vinfo *gstvideo.VideoInfo, plane uint) GLFormat
The function takes the following parameters:
- context: GLContext.
- vinfo: VideoInfo.
- plane number in vinfo.
The function returns the following values:
- glFormat necessary for holding the data in plane of vinfo.
func GLFormatTypeFromSizedGLFormat ¶
GLFormatTypeFromSizedGLFormat: get the unsized format and type from format for usage in glReadPixels, glTex{Sub}Image*, glTexImage* and similar functions.
The function takes the following parameters:
- format: sized internal GLFormat.
The function returns the following values:
- unsizedFormat: location for the resulting unsized GLFormat.
- glType: location for the resulting GL type.
type GLFramebuffer ¶
GLFramebuffer represents and holds an OpenGL framebuffer object with it's associated attachments.
A GLFramebuffer can be created with gst_gl_framebuffer_new() or gst_gl_framebuffer_new_with_default_depth() and bound with gst_gl_framebuffer_bind(). Other resources can be bound with gst_gl_framebuffer_attach()
Note: OpenGL framebuffers are not shareable resources so cannot be used between multiple OpenGL contexts.
func NewGLFramebuffer ¶
func NewGLFramebuffer(context GLContexter) *GLFramebuffer
NewGLFramebuffer: this function will internally create an OpenGL framebuffer object and must be called on context's OpenGL thread.
The function takes the following parameters:
- context: GLContext.
The function returns the following values:
- glFramebuffer: new GLFramebuffer.
func NewGLFramebufferWithDefaultDepth ¶
func NewGLFramebufferWithDefaultDepth(context GLContexter, width, height uint) *GLFramebuffer
NewGLFramebufferWithDefaultDepth: this function will internally create an OpenGL framebuffer object and must be called on context's OpenGL thread.
The function takes the following parameters:
- context: GLContext.
- width for the depth buffer.
- height: for the depth buffer.
The function returns the following values:
- glFramebuffer: new GLFramebuffer with a depth buffer of width and height.
func (*GLFramebuffer) Attach ¶
func (fb *GLFramebuffer) Attach(attachmentPoint uint, mem *GLBaseMemory)
Attach: attach mem to attachment_point
Must be called with the same OpenGL context current that fb was created with.
The function takes the following parameters:
- attachmentPoint: openGL attachment point to bind mem to.
- mem: memory object to bind to attachment_point.
func (*GLFramebuffer) Bind ¶
func (fb *GLFramebuffer) Bind()
Bind fb into the current thread
Must be called with the same OpenGL context current that fb was created with.
func (*GLFramebuffer) EffectiveDimensions ¶
func (fb *GLFramebuffer) EffectiveDimensions() (width, height uint)
EffectiveDimensions: retrieve the effective dimensions from the current attachments attached to fb.
The function returns the following values:
- width (optional): output width.
- height (optional): output height.
func (*GLFramebuffer) ID ¶
func (fb *GLFramebuffer) ID() uint
The function returns the following values:
- guint: openGL id for fb.
type GLFramebufferClass ¶
type GLFramebufferClass struct {
// contains filtered or unexported fields
}
GLFramebufferClass: opaque GLFramebufferClass struct
An instance of this type is always passed by reference.
type GLFramebufferOverrides ¶
type GLFramebufferOverrides struct { }
GLFramebufferOverrides contains methods that are overridable.
type GLMemory ¶
type GLMemory struct {
// contains filtered or unexported fields
}
GLMemory is a GLBaseMemory subclass providing support for the mapping of OpenGL textures.
GLMemory is created or wrapped through gst_gl_base_memory_alloc() with GLVideoAllocationParams.
Data is uploaded or downloaded from the GPU as is necessary.
The Caps that is used for GLMemory based buffers should contain the GST_CAPS_FEATURE_MEMORY_GL_MEMORY as a CapsFeatures and should contain a 'texture-target' field with one of the GLTextureTarget values as a string, i.e. some combination of 'texture-target=(string){2D, rectangle, external-oes}'.
An instance of this type is always passed by reference.
func (*GLMemory) CopyInto ¶
func (glMem *GLMemory) CopyInto(texId uint, target GLTextureTarget, texFormat GLFormat, width int, height int) bool
CopyInto copies gl_mem into the texture specified by tex_id. The format of tex_id is specified by tex_format, width and height.
The function takes the following parameters:
- texId: openGL texture id.
- target: GLTextureTarget.
- texFormat: GLFormat.
- width of tex_id.
- height of tex_id.
The function returns the following values:
- ok: whether the copy succeeded.
func (*GLMemory) CopyTeximage ¶
func (src *GLMemory) CopyTeximage(texId uint, outTarget GLTextureTarget, outTexFormat GLFormat, outWidth int, outHeight int) bool
CopyTeximage copies the texture in GLMemory into the texture specified by tex_id, out_target, out_tex_format, out_width and out_height.
The function takes the following parameters:
- texId: destination texture id.
- outTarget: destination GLTextureTarget.
- outTexFormat: destination GLFormat.
- outWidth: destination width.
- outHeight: destination height.
The function returns the following values:
- ok: whether the copy succeeded.
func (*GLMemory) ReadPixels ¶
ReadPixels reads the texture in GLMemory into write_pointer if no buffer is bound to GL_PIXEL_PACK_BUFFER. Otherwise write_pointer is the byte offset into the currently bound GL_PIXEL_PACK_BUFFER buffer to store the result of glReadPixels. See the OpenGL specification for glReadPixels for more details.
The function takes the following parameters:
- writePointer (optional): data pointer to pass to glReadPixels.
The function returns the following values:
- ok: whether theread operation succeeded.
func (*GLMemory) SetTexWidth ¶
func (*GLMemory) SetTextureWrapped ¶
func (*GLMemory) SetUnpackLength ¶
func (*GLMemory) TexScaling ¶
TexScaling: GL shader scaling parameters for valign and/or width/height.
func (*GLMemory) TexTarget ¶
func (g *GLMemory) TexTarget() GLTextureTarget
TexTarget: GL texture target for this memory.
func (*GLMemory) Texsubimage ¶
Texsubimage reads the texture in read_pointer into gl_mem.
See gst_gl_memory_read_pixels() for what read_pointer signifies.
The function takes the following parameters:
- readPointer (optional): data pointer to pass to glTexSubImage.
func (*GLMemory) TextureHeight ¶
The function returns the following values:
- gint: texture height of gl_mem.
func (*GLMemory) TextureID ¶
The function returns the following values:
- guint: openGL texture handle of gl_mem.
func (*GLMemory) TextureTarget ¶
func (glMem *GLMemory) TextureTarget() GLTextureTarget
The function returns the following values:
- glTextureTarget of gl_mem.
func (*GLMemory) TextureWidth ¶
The function returns the following values:
- gint: texture width of gl_mem.
func (*GLMemory) TextureWrapped ¶
func (*GLMemory) UnpackLength ¶
func (*GLMemory) VAlign ¶
func (g *GLMemory) VAlign() *gstvideo.VideoAlignment
VAlign: data alignment for system memory mapping.
type GLMemoryAllocator ¶
type GLMemoryAllocator struct { GLBaseMemoryAllocator // contains filtered or unexported fields }
GLMemoryAllocator: opaque GLMemoryAllocator struct.
func GLMemoryAllocatorGetDefault ¶
func GLMemoryAllocatorGetDefault(context GLContexter) *GLMemoryAllocator
The function takes the following parameters:
- context: GLContext.
The function returns the following values:
- glMemoryAllocator: default GLMemoryAllocator supported by context.
type GLMemoryAllocatorClass ¶
type GLMemoryAllocatorClass struct {
// contains filtered or unexported fields
}
GLMemoryAllocatorClass: instance of this type is always passed by reference.
type GLMemoryAllocatorOverrides ¶
type GLMemoryAllocatorOverrides struct { }
GLMemoryAllocatorOverrides contains methods that are overridable.
type GLMemoryPBO ¶
type GLMemoryPBO struct {
// contains filtered or unexported fields
}
GLMemoryPBO is created or wrapped through gst_gl_base_memory_alloc() with GLVideoAllocationParams.
Data is uploaded or downloaded from the GPU as is necessary.
An instance of this type is always passed by reference.
func (*GLMemoryPBO) CopyIntoTexture ¶
func (glMem *GLMemoryPBO) CopyIntoTexture(texId uint, target GLTextureTarget, texFormat GLFormat, width int, height int, stride int, respecify bool) bool
CopyIntoTexture copies gl_mem into the texture specified by tex_id. The format of tex_id is specified by tex_format, 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.
The function takes the following parameters:
- texId: destination texture id.
- target: destination GLTextureTarget.
- texFormat: destination GLFormat.
- width of tex_id.
- height of tex_id.
- stride of the backing texture data.
- respecify: whether to copy the data or copy per texel.
The function returns the following values:
- ok: whether the copy succeeded.
func (*GLMemoryPBO) DownloadTransfer ¶
func (glMem *GLMemoryPBO) DownloadTransfer()
DownloadTransfer: transfer the texture data from the texture into the PBO if necessary.
func (*GLMemoryPBO) UploadTransfer ¶
func (glMem *GLMemoryPBO) UploadTransfer()
UploadTransfer: transfer the texture data from the PBO into the texture if necessary.
type GLMemoryPBOAllocator ¶
type GLMemoryPBOAllocator struct { GLMemoryAllocator // contains filtered or unexported fields }
GLMemoryPBOAllocator: opaque GLMemoryPBOAllocator struct.
type GLMemoryPBOAllocatorClass ¶
type GLMemoryPBOAllocatorClass struct {
// contains filtered or unexported fields
}
GLMemoryPBOAllocatorClass: only contains private data
An instance of this type is always passed by reference.
func (*GLMemoryPBOAllocatorClass) ParentClass ¶
func (g *GLMemoryPBOAllocatorClass) ParentClass() *GLMemoryAllocatorClass
type GLMemoryPBOAllocatorOverrides ¶
type GLMemoryPBOAllocatorOverrides struct { }
GLMemoryPBOAllocatorOverrides contains methods that are overridable.
type GLOverlayCompositor ¶
GLOverlayCompositor: opaque GLOverlayCompositor object.
func NewGLOverlayCompositor ¶
func NewGLOverlayCompositor(context GLContexter) *GLOverlayCompositor
The function takes the following parameters:
The function returns the following values:
func (*GLOverlayCompositor) DrawOverlays ¶
func (compositor *GLOverlayCompositor) DrawOverlays()
func (*GLOverlayCompositor) FreeOverlays ¶
func (compositor *GLOverlayCompositor) FreeOverlays()
func (*GLOverlayCompositor) UploadOverlays ¶
func (compositor *GLOverlayCompositor) UploadOverlays(buf *gst.Buffer)
The function takes the following parameters:
type GLOverlayCompositorClass ¶
type GLOverlayCompositorClass struct {
// contains filtered or unexported fields
}
GLOverlayCompositorClass: instance of this type is always passed by reference.
func (*GLOverlayCompositorClass) ObjectClass ¶
func (g *GLOverlayCompositorClass) ObjectClass() *gst.ObjectClass
type GLOverlayCompositorOverrides ¶
type GLOverlayCompositorOverrides struct { }
GLOverlayCompositorOverrides contains methods that are overridable.
type GLPlatform ¶
const ( // GLPlatformNone: no platform. GLPlatformNone GLPlatform = 0b0 // GLPlatformEgl: EGL platform used primarily with the X11, wayland and // android window systems as well as on embedded Linux. GLPlatformEgl GLPlatform = 0b1 // GLPlatformGLX: GLX platform used primarily with the X11 window system. GLPlatformGLX GLPlatform = 0b10 // GLPlatformWgl: WGL platform used primarily on Windows. GLPlatformWgl GLPlatform = 0b100 // GLPlatformCgl: CGL platform used primarily on OS X. GLPlatformCgl GLPlatform = 0b1000 // GLPlatformEagl: EAGL platform used primarily on iOS. GLPlatformEagl GLPlatform = 0b10000 // GLPlatformAny: any OpenGL platform. GLPlatformAny GLPlatform = 0b11111111111111111111111111111111 )
func GLPlatformFromString ¶
func GLPlatformFromString(platformS string) GLPlatform
The function takes the following parameters:
- platformS: space separated string of OpenGL platformss.
The function returns the following values:
- glPlatform represented by platform_s.
func (GLPlatform) Has ¶
func (g GLPlatform) Has(other GLPlatform) bool
Has returns true if g contains other.
func (GLPlatform) String ¶
func (g GLPlatform) String() string
String returns the names in string for GLPlatform.
type GLQuery ¶
type GLQuery struct {
// contains filtered or unexported fields
}
GLQuery represents and holds an OpenGL query object. Various types of queries can be run or counters retrieved.
An instance of this type is always passed by reference.
func (*GLQuery) Init ¶
func (query *GLQuery) Init(context GLContexter, queryType GLQueryType)
The function takes the following parameters:
- context: GLContext.
- queryType: GLQueryType.
type GLQueryType ¶
const ( // GLQueryNone: no query. GLQueryNone GLQueryType = iota // GLQueryTimeElapsed: query the time elapsed. GLQueryTimeElapsed // GLQueryTimestamp: query the current time. GLQueryTimestamp )
func (GLQueryType) String ¶
func (g GLQueryType) String() string
String returns the name in string for GLQueryType.
type GLRenderbuffer ¶
type GLRenderbuffer struct {
// contains filtered or unexported fields
}
GLRenderbuffer is a GLBaseMemory subclass providing support for OpenGL renderbuffers.
GLRenderbuffer is created or wrapped through gst_gl_base_memory_alloc() with GLRenderbufferAllocationParams.
An instance of this type is always passed by reference.
func (*GLRenderbuffer) Format ¶
func (glMem *GLRenderbuffer) Format() GLFormat
The function returns the following values:
- glFormat of gl_mem.
func (*GLRenderbuffer) Height ¶
func (glMem *GLRenderbuffer) Height() int
The function returns the following values:
- gint: configured height of gl_mem.
func (*GLRenderbuffer) ID ¶
func (glMem *GLRenderbuffer) ID() uint
The function returns the following values:
- guint: openGL renderbuffer handle of gl_mem.
func (*GLRenderbuffer) RenderbufferFormat ¶
func (g *GLRenderbuffer) RenderbufferFormat() GLFormat
RenderbufferFormat: texture type.
func (*GLRenderbuffer) RenderbufferID ¶
func (g *GLRenderbuffer) RenderbufferID() uint
RenderbufferID: GL texture id for this memory.
func (*GLRenderbuffer) RenderbufferWrapped ¶
func (g *GLRenderbuffer) RenderbufferWrapped() bool
func (*GLRenderbuffer) SetRenderbufferID ¶
func (g *GLRenderbuffer) SetRenderbufferID(renderbufferId uint)
RenderbufferID: GL texture id for this memory.
func (*GLRenderbuffer) SetRenderbufferWrapped ¶
func (g *GLRenderbuffer) SetRenderbufferWrapped(renderbufferWrapped bool)
func (*GLRenderbuffer) Width ¶
func (glMem *GLRenderbuffer) Width() int
The function returns the following values:
- gint: configured width of gl_mem.
type GLRenderbufferAllocationParams ¶
type GLRenderbufferAllocationParams struct {
// contains filtered or unexported fields
}
GLRenderbufferAllocationParams: allocation parameters
An instance of this type is always passed by reference.
func NewGLRenderbufferAllocationParams ¶
func NewGLRenderbufferAllocationParams(context GLContexter, allocParams *gst.AllocationParams, renderbufferFormat GLFormat, width uint, height uint) *GLRenderbufferAllocationParams
NewGLRenderbufferAllocationParams constructs a struct GLRenderbufferAllocationParams.
func (*GLRenderbufferAllocationParams) Height ¶
func (g *GLRenderbufferAllocationParams) Height() uint
Height: height.
func (*GLRenderbufferAllocationParams) RenderbufferFormat ¶
func (g *GLRenderbufferAllocationParams) RenderbufferFormat() GLFormat
RenderbufferFormat: GLFormat.
func (*GLRenderbufferAllocationParams) SetHeight ¶
func (g *GLRenderbufferAllocationParams) SetHeight(height uint)
Height: height.
func (*GLRenderbufferAllocationParams) SetWidth ¶
func (g *GLRenderbufferAllocationParams) SetWidth(width uint)
Width: width.
func (*GLRenderbufferAllocationParams) Width ¶
func (g *GLRenderbufferAllocationParams) Width() uint
Width: width.
type GLRenderbufferAllocator ¶
type GLRenderbufferAllocator struct { GLBaseMemoryAllocator // contains filtered or unexported fields }
GLRenderbufferAllocator: opaque GLRenderbufferAllocator struct.
type GLRenderbufferAllocatorClass ¶
type GLRenderbufferAllocatorClass struct {
// contains filtered or unexported fields
}
GLRenderbufferAllocatorClass only contains private data
An instance of this type is always passed by reference.
func (*GLRenderbufferAllocatorClass) ParentClass ¶
func (g *GLRenderbufferAllocatorClass) ParentClass() *GLBaseMemoryAllocatorClass
type GLRenderbufferAllocatorOverrides ¶
type GLRenderbufferAllocatorOverrides struct { }
GLRenderbufferAllocatorOverrides contains methods that are overridable.
type GLSLProfile ¶
GLSLProfile: GLSL profiles.
const ( // GlslProfileNone: no profile supported/available. GlslProfileNone GLSLProfile = 0b0 // GlslProfileES: openGL|ES profile. GlslProfileES GLSLProfile = 0b1 // GlslProfileCore: openGL core profile. GlslProfileCore GLSLProfile = 0b10 // GlslProfileCompatibility: openGL compatibility profile. GlslProfileCompatibility GLSLProfile = 0b100 // GlslProfileAny: any OpenGL/OpenGL|ES profile. GlslProfileAny GLSLProfile = 0b11111111111111111111111111111111 )
func GLSLProfileFromString ¶
func GLSLProfileFromString(str string) GLSLProfile
The function takes the following parameters:
- str: GLSL version string.
The function returns the following values:
- glslProfile of string or GST_GLSL_PROFILE_NONE on error.
func (GLSLProfile) Has ¶
func (g GLSLProfile) Has(other GLSLProfile) bool
Has returns true if g contains other.
func (GLSLProfile) String ¶
func (g GLSLProfile) String() string
String returns the names in string for GLSLProfile.
type GLSLStage ¶
GLSLStage holds and represents a single OpenGL shader stage.
func NewGLSLStage ¶
func NewGLSLStage(context GLContexter, typ uint) *GLSLStage
The function takes the following parameters:
- context: GLContext.
- typ: GL enum shader stage type.
The function returns the following values:
- glslStage: new GLSLStage of the specified type.
func NewGLSLStageDefaultFragment ¶
func NewGLSLStageDefaultFragment(context GLContexter) *GLSLStage
The function takes the following parameters:
- context: GLContext.
The function returns the following values:
- glslStage: new GLSLStage with the default fragment shader.
func NewGLSLStageDefaultVertex ¶
func NewGLSLStageDefaultVertex(context GLContexter) *GLSLStage
The function takes the following parameters:
- context: GLContext.
The function returns the following values:
- glslStage: new GLSLStage with the default vertex shader.
func NewGLSLStageWithString ¶
func NewGLSLStageWithString(context GLContexter, typ uint, version GLSLVersion, profile GLSLProfile, str string) *GLSLStage
The function takes the following parameters:
- context: GLContext.
- typ: GL enum shader stage type.
- version: GLSLVersion.
- profile: GLSLProfile.
- str: shader string.
The function returns the following values:
- glslStage: new GLSLStage of the specified type.
func NewGLSLStageWithStrings ¶
func NewGLSLStageWithStrings(context GLContexter, typ uint, version GLSLVersion, profile GLSLProfile, str []string) *GLSLStage
The function takes the following parameters:
- context: GLContext.
- typ: GL enum shader stage type.
- version: GLSLVersion.
- profile: GLSLProfile.
- str: an array of strings concatted together to produce a shader.
The function returns the following values:
- glslStage: new GLSLStage of the specified type.
func (*GLSLStage) Handle ¶
The function returns the following values:
- guint: GL handle for this shader stage.
func (*GLSLStage) Profile ¶
func (stage *GLSLStage) Profile() GLSLProfile
The function returns the following values:
- glslProfile: GLSL profile for the current shader stage.
func (*GLSLStage) SetStrings ¶
func (stage *GLSLStage) SetStrings(version GLSLVersion, profile GLSLProfile, str []string) bool
SetStrings replaces the current shader string with str.
The function takes the following parameters:
- version: GLSLVersion.
- profile: GLSLProfile.
- str: GLSL shader string.
The function returns the following values:
func (*GLSLStage) ShaderType ¶
The function returns the following values:
- guint: GL shader type for this shader stage.
func (*GLSLStage) Version ¶
func (stage *GLSLStage) Version() GLSLVersion
The function returns the following values:
- glslVersion: GLSL version for the current shader stage.
type GLSLStageClass ¶
type GLSLStageClass struct {
// contains filtered or unexported fields
}
GLSLStageClass: opaque GLSLStageClass struct
An instance of this type is always passed by reference.
type GLSLStageOverrides ¶
type GLSLStageOverrides struct { }
GLSLStageOverrides contains methods that are overridable.
type GLSLVersion ¶
GLSLVersion: GLSL version list.
const ( // GlslVersionNone: no version. GlslVersionNone GLSLVersion = 0 // GlslVersion100: version 100 (only valid for ES). GlslVersion100 GLSLVersion = 100 // GlslVersion110: version 110 (only valid for compatibility desktop GL). GlslVersion110 GLSLVersion = 110 // GlslVersion120: version 120 (only valid for compatibility desktop GL). GlslVersion120 GLSLVersion = 120 // GlslVersion130: version 130 (only valid for compatibility desktop GL). GlslVersion130 GLSLVersion = 130 // GlslVersion140: version 140 (only valid for compatibility desktop GL). GlslVersion140 GLSLVersion = 140 // GlslVersion150: version 150 (valid for compatibility/core desktop GL). GlslVersion150 GLSLVersion = 150 // GlslVersion300: version 300 (only valid for ES). GlslVersion300 GLSLVersion = 300 // GlslVersion310: version 310 (only valid for ES). GlslVersion310 GLSLVersion = 310 // GlslVersion320: version 320 (only valid for ES). GlslVersion320 GLSLVersion = 320 // GlslVersion330: version 330 (valid for compatibility/core desktop GL). GlslVersion330 GLSLVersion = 330 // GlslVersion400: version 400 (valid for compatibility/core desktop GL). GlslVersion400 GLSLVersion = 400 // GlslVersion410: version 410 (valid for compatibility/core desktop GL). GlslVersion410 GLSLVersion = 410 // GlslVersion420: version 420 (valid for compatibility/core desktop GL). GlslVersion420 GLSLVersion = 420 // GlslVersion430: version 430 (valid for compatibility/core desktop GL). GlslVersion430 GLSLVersion = 430 // GlslVersion440: version 440 (valid for compatibility/core desktop GL). GlslVersion440 GLSLVersion = 440 // GlslVersion450: version 450 (valid for compatibility/core desktop GL). GlslVersion450 GLSLVersion = 450 )
func GLSLVersionFromString ¶
func GLSLVersionFromString(str string) GLSLVersion
The function takes the following parameters:
- str: GLSL version string.
The function returns the following values:
- glslVersion of string or GST_GLSL_VERSION_NONE on error.
func GLVersionToGlslVersion ¶
func GLVersionToGlslVersion(glApi GLAPI, maj, min int) GLSLVersion
The function takes the following parameters:
- glApi: GLAPI.
- maj: major GL version.
- min: minor GL version.
The function returns the following values:
- glslVersion: minimum supported GLSLVersion available for gl_api, maj and min.
func (GLSLVersion) String ¶
func (g GLSLVersion) String() string
String returns the name in string for GLSLVersion.
type GLShader ¶
func NewGLShader ¶
func NewGLShader(context GLContexter) *GLShader
NewGLShader: note: must be called in the GL thread.
The function takes the following parameters:
- context: GLContext.
The function returns the following values:
- glShader: new empty shader.
func NewGLShaderDefault ¶
func NewGLShaderDefault(context GLContexter) (*GLShader, error)
NewGLShaderDefault: note: must be called in the GL thread.
The function takes the following parameters:
- context: GLContext.
The function returns the following values:
- glShader: default shader or NULL on failure.
func (*GLShader) Attach ¶
Attach attaches stage to shader. stage must have been successfully compiled with gst_glsl_stage_compile().
Note: must be called in the GL thread.
The function takes the following parameters:
- stage to attach.
The function returns the following values:
- ok: whether stage could be attached to shader.
func (*GLShader) AttachUnlocked ¶
AttachUnlocked attaches stage to shader. stage must have been successfully compiled with gst_glsl_stage_compile().
Note: must be called in the GL thread.
The function takes the following parameters:
- stage to attach.
The function returns the following values:
- ok: whether stage could be attached to shader.
func (*GLShader) AttributeLocation ¶
The function takes the following parameters:
- name of the attribute.
The function returns the following values:
- gint: attribute index for name in shader or -1 on failure.
func (*GLShader) BindAttributeLocation ¶
BindAttributeLocation: bind attribute name to the specified location index using glBindAttributeLocation().
The function takes the following parameters:
- index: attribute index to set.
- name of the attribute.
func (*GLShader) BindFragDataLocation ¶
BindFragDataLocation: bind attribute name to the specified location index using glBindFragDataLocation().
The function takes the following parameters:
- index: attribute index to set.
- name of the attribute.
func (*GLShader) CompileAttachStage ¶
CompileAttachStage compiles stage and attaches it to shader.
Note: must be called in the GL thread.
The function takes the following parameters:
- stage to attach.
func (*GLShader) Detach ¶
Detach detaches stage from shader. stage must have been successfully attached to shader with gst_gl_shader_attach() or gst_gl_shader_attach_unlocked().
Note: must be called in the GL thread.
The function takes the following parameters:
- stage to attach.
func (*GLShader) DetachUnlocked ¶
DetachUnlocked detaches stage from shader. stage must have been successfully attached to shader with gst_gl_shader_attach() or gst_gl_shader_attach_unlocked().
Note: must be called in the GL thread.
The function takes the following parameters:
- stage to attach.
func (*GLShader) IsLinked ¶
IsLinked: note: must be called in the GL thread.
The function returns the following values:
- ok: whether shader has been successfully linked.
func (*GLShader) Link ¶
Link links the current list of GLSLStage's in shader.
Note: must be called in the GL thread.
func (*GLShader) ProgramHandle ¶
The function returns the following values:
- gint: GL program handle for this shader.
func (*GLShader) Release ¶
func (shader *GLShader) Release()
Release releases the shader and stages.
Note: must be called in the GL thread.
func (*GLShader) ReleaseUnlocked ¶
func (shader *GLShader) ReleaseUnlocked()
ReleaseUnlocked releases the shader and stages.
Note: must be called in the GL thread.
func (*GLShader) SetUniform1F ¶
SetUniform1F: perform glUniform1f() for name on shader.
The function takes the following parameters:
- name of the uniform.
- value to set.
func (*GLShader) SetUniform1Fv ¶
SetUniform1Fv: perform glUniform1fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- value values to set.
func (*GLShader) SetUniform1I ¶
SetUniform1I: perform glUniform1i() for name on shader.
The function takes the following parameters:
- name of the uniform.
- value to set.
func (*GLShader) SetUniform1Iv ¶
SetUniform1Iv: perform glUniform1iv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- value values to set.
func (*GLShader) SetUniform2F ¶
SetUniform2F: perform glUniform2f() for name on shader.
The function takes the following parameters:
- name of the uniform.
- v0: first value to set.
- v1: second value to set.
func (*GLShader) SetUniform2Fv ¶
SetUniform2Fv: perform glUniform2fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- value values to set.
func (*GLShader) SetUniform2I ¶
SetUniform2I: perform glUniform2i() for name on shader.
The function takes the following parameters:
- name of the uniform.
- v0: first value to set.
- v1: second value to set.
func (*GLShader) SetUniform2Iv ¶
SetUniform2Iv: perform glUniform2iv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- value values to set.
func (*GLShader) SetUniform3F ¶
SetUniform3F: perform glUniform3f() for name on shader.
The function takes the following parameters:
- name of the uniform.
- v0: first value to set.
- v1: second value to set.
- v2: third value to set.
func (*GLShader) SetUniform3Fv ¶
SetUniform3Fv: perform glUniform3fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- value values to set.
func (*GLShader) SetUniform3I ¶
SetUniform3I: perform glUniform3i() for name on shader.
The function takes the following parameters:
- name of the uniform.
- v0: first value to set.
- v1: second value to set.
- v2: third value to set.
func (*GLShader) SetUniform3Iv ¶
SetUniform3Iv: perform glUniform3iv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- value values to set.
func (*GLShader) SetUniform4F ¶
SetUniform4F: perform glUniform4f() for name on shader.
The function takes the following parameters:
- name of the uniform.
- v0: first value to set.
- v1: second value to set.
- v2: third value to set.
- v3: fourth value to set.
func (*GLShader) SetUniform4Fv ¶
SetUniform4Fv: perform glUniform4fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- value values to set.
func (*GLShader) SetUniform4I ¶
SetUniform4I: perform glUniform4i() for name on shader.
The function takes the following parameters:
- name of the uniform.
- v0: first value to set.
- v1: second value to set.
- v2: third value to set.
- v3: fourth value to set.
func (*GLShader) SetUniform4Iv ¶
SetUniform4Iv: perform glUniform4iv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- value values to set.
func (*GLShader) SetUniformMatrix2Fv ¶
SetUniformMatrix2Fv: perform glUniformMatrix2fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- count: number of 2x2 matrices to set.
- transpose the matrix.
- value: matrix to set.
func (*GLShader) SetUniformMatrix2X3Fv ¶
func (shader *GLShader) SetUniformMatrix2X3Fv(name string, count int, transpose bool, value *float32)
SetUniformMatrix2X3Fv: perform glUniformMatrix2x3fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- count: number of 2x3 matrices to set.
- transpose the matrix.
- value values to set.
func (*GLShader) SetUniformMatrix2X4Fv ¶
func (shader *GLShader) SetUniformMatrix2X4Fv(name string, count int, transpose bool, value *float32)
SetUniformMatrix2X4Fv: perform glUniformMatrix2x4fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- count: number of 2x4 matrices to set.
- transpose the matrix.
- value values to set.
func (*GLShader) SetUniformMatrix3Fv ¶
SetUniformMatrix3Fv: perform glUniformMatrix3fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- count: number of 3x3 matrices to set.
- transpose the matrix.
- value values to set.
func (*GLShader) SetUniformMatrix3X2Fv ¶
func (shader *GLShader) SetUniformMatrix3X2Fv(name string, count int, transpose bool, value *float32)
SetUniformMatrix3X2Fv: perform glUniformMatrix3x2fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- count: number of 3x2 matrices to set.
- transpose the matrix.
- value values to set.
func (*GLShader) SetUniformMatrix3X4Fv ¶
func (shader *GLShader) SetUniformMatrix3X4Fv(name string, count int, transpose bool, value *float32)
SetUniformMatrix3X4Fv: perform glUniformMatrix3x4fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- count: number of 3x4 matrices to set.
- transpose the matrix.
- value values to set.
func (*GLShader) SetUniformMatrix4Fv ¶
SetUniformMatrix4Fv: perform glUniformMatrix4fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- count: number of 4x4 matrices to set.
- transpose the matrix.
- value values to set.
func (*GLShader) SetUniformMatrix4X2Fv ¶
func (shader *GLShader) SetUniformMatrix4X2Fv(name string, count int, transpose bool, value *float32)
SetUniformMatrix4X2Fv: perform glUniformMatrix4x2fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- count: number of 4x2 matrices to set.
- transpose the matrix.
- value values to set.
func (*GLShader) SetUniformMatrix4X3Fv ¶
func (shader *GLShader) SetUniformMatrix4X3Fv(name string, count int, transpose bool, value *float32)
SetUniformMatrix4X3Fv: perform glUniformMatrix4x3fv() for name on shader.
The function takes the following parameters:
- name of the uniform.
- count: number of 4x3 matrices to set.
- transpose the matrix.
- value values to set.
type GLShaderClass ¶
type GLShaderClass struct {
// contains filtered or unexported fields
}
GLShaderClass: instance of this type is always passed by reference.
type GLShaderOverrides ¶
type GLShaderOverrides struct { }
GLShaderOverrides contains methods that are overridable.
type GLStereoDownmix ¶
GLStereoDownmix: output anaglyph type to generate when downmixing to mono.
const ( // GLStereoDownmixAnaglyphGreenMagentaDubois dubois optimised Green-Magenta // anaglyph. GLStereoDownmixAnaglyphGreenMagentaDubois GLStereoDownmix = iota // GLStereoDownmixAnaglyphRedCyanDubois dubois optimised Red-Cyan anaglyph. GLStereoDownmixAnaglyphRedCyanDubois // GLStereoDownmixAnaglyphAmberBlueDubois dubois optimised Amber-Blue // anaglyph. GLStereoDownmixAnaglyphAmberBlueDubois )
func (GLStereoDownmix) String ¶
func (g GLStereoDownmix) String() string
String returns the name in string for GLStereoDownmix.
type GLSyncMeta ¶
type GLSyncMeta struct {
// contains filtered or unexported fields
}
GLSyncMeta provides the ability to synchronize the OpenGL command stream with the CPU or with other OpenGL contexts.
An instance of this type is always passed by reference.
func BufferAddGLSyncMeta ¶
func BufferAddGLSyncMeta(context GLContexter, buffer *gst.Buffer) *GLSyncMeta
The function takes the following parameters:
- context: GLContext.
- buffer: Buffer.
The function returns the following values:
- glSyncMeta added to Buffer.
func BufferAddGLSyncMetaFull ¶
func BufferAddGLSyncMetaFull(context GLContexter, buffer *gst.Buffer, data unsafe.Pointer) *GLSyncMeta
The function takes the following parameters:
- context: GLContext.
- buffer: Buffer.
- data (optional): sync data to hold.
The function returns the following values:
- glSyncMeta added to Buffer.
func (*GLSyncMeta) Context ¶
func (g *GLSyncMeta) Context() GLContexter
Context used to allocate the meta.
func (*GLSyncMeta) Data ¶
func (g *GLSyncMeta) Data() unsafe.Pointer
Data: custom data pointer for the implementation.
func (*GLSyncMeta) SetSyncPoint ¶
func (syncMeta *GLSyncMeta) SetSyncPoint(context GLContexter)
SetSyncPoint: set a sync point to possibly wait on at a later time.
The function takes the following parameters:
- context: GLContext.
func (*GLSyncMeta) Wait ¶
func (syncMeta *GLSyncMeta) Wait(context GLContexter)
Wait: insert a wait into context's command stream ensuring all previous OpenGL commands before sync_meta have completed.
The function takes the following parameters:
- context: GLContext.
func (*GLSyncMeta) WaitCpu ¶
func (syncMeta *GLSyncMeta) WaitCpu(context GLContexter)
WaitCpu: perform a wait so that the sync point has passed from the CPU's perspective What that means, is that all GL operations changing CPU-visible data before the sync point are now visible.
The function takes the following parameters:
- context: GLContext.
type GLTextureTarget ¶
GLTextureTarget: openGL texture target that an OpenGL texture can be bound to. The gst_gl_value_set_texture_target_from_mask(), gst_gl_value_get_texture_target_mask(), and gst_gl_value_set_texture_target() functions can be used for handling texture targets with #GValue's when e.g. dealing with Caps.
const ( // GLTextureTargetNone: no texture target. GLTextureTargetNone GLTextureTarget = iota // GLTextureTarget2D: 2D texture target (GL_TEXTURE_2D). GLTextureTarget2D // GLTextureTargetRectangle: rectangle texture target // (GL_TEXTURE_RECTANGLE). GLTextureTargetRectangle // GLTextureTargetExternalOes: external oes texture target // (GL_TEXTURE_EXTERNAL_OES). GLTextureTargetExternalOes )
func GLTextureTargetFromGL ¶
func GLTextureTargetFromGL(target uint) GLTextureTarget
The function takes the following parameters:
- target: openGL texture binding target.
The function returns the following values:
- glTextureTarget that's equiavalant to target or GST_GL_TEXTURE_TARGET_NONE.
func GLTextureTargetFromString ¶
func GLTextureTargetFromString(str string) GLTextureTarget
The function takes the following parameters:
- str: string equivalent to one of the GST_GL_TEXTURE_TARGET_*_STR values.
The function returns the following values:
- glTextureTarget represented by str or GST_GL_TEXTURE_TARGET_NONE.
func GLValueGetTextureTargetMask ¶
func GLValueGetTextureTargetMask(value *coreglib.Value) GLTextureTarget
GLValueGetTextureTargetMask: see gst_gl_value_set_texture_target_from_mask() for what entails a mask.
The function takes the following parameters:
- value: initialized #GValue of type G_TYPE_STRING.
The function returns the following values:
- glTextureTarget: mask of GLTextureTarget's in value or GST_GL_TEXTURE_TARGET_NONE on failure.
func (GLTextureTarget) String ¶
func (g GLTextureTarget) String() string
String returns the name in string for GLTextureTarget.
type GLUpload ¶
GLUpload is an object that uploads data from system memory into GL textures.
A GLUpload can be created with gst_gl_upload_new().
func NewGLUpload ¶
func NewGLUpload(context GLContexter) *GLUpload
The function takes the following parameters:
- context: GLContext.
The function returns the following values:
- glUpload: new GLUpload object.
func (*GLUpload) Caps ¶
The function returns the following values:
- inCaps (optional): input Caps.
- outCaps (optional): output Caps.
func (*GLUpload) PerformWithBuffer ¶
PerformWithBuffer uploads buffer using the transformation specified by gst_gl_upload_set_caps() creating a new Buffer in outbuf_ptr.
The function takes the following parameters:
- buffer: input Buffer.
The function returns the following values:
- outbufPtr: resulting Buffer.
- glUploadReturn: whether the upload was successful.
func (*GLUpload) ProposeAllocation ¶
ProposeAllocation adds the required allocation parameters to support uploading.
The function takes the following parameters:
- decideQuery (optional) from a decide allocation.
- query: proposed allocation query.
func (*GLUpload) SetCaps ¶
SetCaps initializes upload with the information required for upload.
The function takes the following parameters:
- inCaps: input Caps.
- outCaps: output Caps.
The function returns the following values:
- ok: whether in_caps and out_caps could be set on upload.
func (*GLUpload) SetContext ¶
func (upload *GLUpload) SetContext(context GLContexter)
The function takes the following parameters:
func (*GLUpload) TransformCaps ¶
func (upload *GLUpload) TransformCaps(context GLContexter, direction gst.PadDirection, caps, filter *gst.Caps) *gst.Caps
The function takes the following parameters:
- context
- direction
- caps
- filter
The function returns the following values:
type GLUploadClass ¶
type GLUploadClass struct {
// contains filtered or unexported fields
}
GLUploadClass struct only contains private data
An instance of this type is always passed by reference.
func (*GLUploadClass) ObjectClass ¶
func (g *GLUploadClass) ObjectClass() *gst.ObjectClass
type GLUploadOverrides ¶
type GLUploadOverrides struct { }
GLUploadOverrides contains methods that are overridable.
type GLUploadReturn ¶
const ( // GLUploadDone: no further processing required. GLUploadDone GLUploadReturn = 1 // GLUploadError: unspecified error occurred. GLUploadError GLUploadReturn = -1 // GLUploadUnsupported: configuration is unsupported. GLUploadUnsupported GLUploadReturn = -2 // GLUploadReconfigure: this element requires a reconfiguration. GLUploadReconfigure GLUploadReturn = -3 GLUploadUnsharedGLContext GLUploadReturn = -100 )
func (GLUploadReturn) String ¶
func (g GLUploadReturn) String() string
String returns the name in string for GLUploadReturn.
type GLVideoAllocationParams ¶
type GLVideoAllocationParams struct {
// contains filtered or unexported fields
}
GLVideoAllocationParams: instance of this type is always passed by reference.
func NewGLVideoAllocationParams ¶
func NewGLVideoAllocationParams(context GLContexter, allocParams *gst.AllocationParams, vInfo *gstvideo.VideoInfo, plane uint, valign *gstvideo.VideoAlignment, target GLTextureTarget, texFormat GLFormat) *GLVideoAllocationParams
NewGLVideoAllocationParams constructs a struct GLVideoAllocationParams.
func (*GLVideoAllocationParams) CopyData ¶
func (srcVid *GLVideoAllocationParams) CopyData(destVid *GLVideoAllocationParams)
CopyData: copy and set any dynamically allocated resources in dest_vid. Intended for subclass usage only to chain up at the end of a subclass copy function.
The function takes the following parameters:
- destVid: destination GLVideoAllocationParams to copy into.
func (*GLVideoAllocationParams) FreeData ¶
func (params *GLVideoAllocationParams) FreeData()
FreeData: unset and free any dynamically allocated resources. Intended for subclass usage only to chain up at the end of a subclass free function.
func (*GLVideoAllocationParams) Parent ¶
func (g *GLVideoAllocationParams) Parent() *GLAllocationParams
Parent: parent GLAllocationParams structure.
func (*GLVideoAllocationParams) Plane ¶
func (g *GLVideoAllocationParams) Plane() uint
Plane: video plane index to allocate.
func (*GLVideoAllocationParams) SetPlane ¶
func (g *GLVideoAllocationParams) SetPlane(plane uint)
Plane: video plane index to allocate.
func (*GLVideoAllocationParams) Target ¶
func (g *GLVideoAllocationParams) Target() GLTextureTarget
Target to allocate.
func (*GLVideoAllocationParams) TexFormat ¶
func (g *GLVideoAllocationParams) TexFormat() GLFormat
TexFormat to allocate.
func (*GLVideoAllocationParams) VAlign ¶
func (g *GLVideoAllocationParams) VAlign() *gstvideo.VideoAlignment
VAlign to align the system representation to (may be NULL for the default).
func (*GLVideoAllocationParams) VInfo ¶
func (g *GLVideoAllocationParams) VInfo() *gstvideo.VideoInfo
VInfo to allocate.
type GLViewConvert ¶
GLViewConvert: convert stereoscopic/multiview video using fragment shaders.
func NewGLViewConvert ¶
func NewGLViewConvert() *GLViewConvert
The function returns the following values:
- glViewConvert: new GLViewConvert.
func (*GLViewConvert) FixateCaps ¶
func (viewconvert *GLViewConvert) FixateCaps(direction gst.PadDirection, caps, othercaps *gst.Caps) *gst.Caps
FixateCaps provides an implementation of BaseTransformClass.fixate_caps().
The function takes the following parameters:
- direction: PadDirection.
- caps of direction.
- othercaps to fixate.
The function returns the following values:
- ret: fixated Caps.
func (*GLViewConvert) Output ¶
func (viewconvert *GLViewConvert) Output() (*gst.Buffer, gst.FlowReturn)
Output: retrieve the processed output buffer placing the output in outbuf_ptr.
The function returns the following values:
- outbufPtr: Buffer.
- flowReturn: FlowReturn.
func (*GLViewConvert) Perform ¶
func (viewconvert *GLViewConvert) Perform(inbuf *gst.Buffer) *gst.Buffer
Perform converts the data contained by inbuf using the formats specified by the Caps passed to gst_gl_view_convert_set_caps().
The function takes the following parameters:
- inbuf filled Buffer to convert.
The function returns the following values:
- buffer: converted Buffer or NULL.
func (*GLViewConvert) Reset ¶
func (viewconvert *GLViewConvert) Reset()
Reset viewconvert to the default state. Further operation will require setting the caps with gst_gl_view_convert_set_caps().
func (*GLViewConvert) SetCaps ¶
func (viewconvert *GLViewConvert) SetCaps(inCaps, outCaps *gst.Caps) bool
SetCaps initializes viewconvert with the information required for conversion.
The function takes the following parameters:
- inCaps: input Caps.
- outCaps: output Caps.
The function returns the following values:
func (*GLViewConvert) SetContext ¶
func (viewconvert *GLViewConvert) SetContext(context GLContexter)
SetContext: set context on viewconvert.
The function takes the following parameters:
- context to set.
func (*GLViewConvert) SubmitInputBuffer ¶
func (viewconvert *GLViewConvert) SubmitInputBuffer(isDiscont bool, input *gst.Buffer) gst.FlowReturn
SubmitInputBuffer: submit input to be processed by viewconvert.
The function takes the following parameters:
- isDiscont: true if we have a discontinuity.
- input: Buffer.
The function returns the following values:
- flowReturn: FlowReturn.
func (*GLViewConvert) TransformCaps ¶
func (viewconvert *GLViewConvert) TransformCaps(direction gst.PadDirection, caps, filter *gst.Caps) *gst.Caps
TransformCaps provides an implementation of BaseTransformClass.transform_caps().
The function takes the following parameters:
- direction: PadDirection.
- caps to transform.
- filter: set of filter Caps.
The function returns the following values:
- ret: converted Caps.
type GLViewConvertClass ¶
type GLViewConvertClass struct {
// contains filtered or unexported fields
}
GLViewConvertClass: opaque GLViewConvertClass struct
An instance of this type is always passed by reference.
type GLViewConvertOverrides ¶
type GLViewConvertOverrides struct { }
GLViewConvertOverrides contains methods that are overridable.
type GLWindow ¶
GLWindow represents a window that elements can render into. A window can either be a user visible window (onscreen) or hidden (offscreen).
func BaseGLWindow ¶
func BaseGLWindow(obj GLWindower) *GLWindow
BaseGLWindow returns the underlying base object.
func NewGLWindow ¶
The function takes the following parameters:
- display: GLDisplay.
The function returns the following values:
- glWindow: new GLWindow using display's connection.
func (*GLWindow) ConnectKeyEvent ¶
func (window *GLWindow) ConnectKeyEvent(f func(id, key string)) coreglib.SignalHandle
ConnectKeyEvent will be emitted when a key event is received by the GstGLwindow.
func (*GLWindow) ConnectMouseEvent ¶
func (window *GLWindow) ConnectMouseEvent(f func(id string, button int, x, y float64)) coreglib.SignalHandle
ConnectMouseEvent will be emitted when a mouse event is received by the GstGLwindow.
func (*GLWindow) ConnectScrollEvent ¶
func (window *GLWindow) ConnectScrollEvent(f func(x, y, deltaX, deltaY float64)) coreglib.SignalHandle
ConnectScrollEvent will be emitted when a mouse scroll event is received by the GstGLwindow.
func (*GLWindow) ConnectWindowHandleChanged ¶
func (window *GLWindow) ConnectWindowHandleChanged(f func()) coreglib.SignalHandle
ConnectWindowHandleChanged will be emitted when the window handle has been set into the native implementation, but before the context is re-activated. By using this signal, elements can refresh associated resource without relying on direct handle comparision.
func (*GLWindow) Context ¶
func (window *GLWindow) Context() GLContexter
The function returns the following values:
- glContext associated with this window.
func (*GLWindow) ControlsViewport ¶
ControlsViewport checks if window controls the GL viewport.
The function returns the following values:
- ok: TRUE if window controls the GL viewport, otherwise FALSE.
func (*GLWindow) Display ¶
The function returns the following values:
- guintptr: windowing system display handle for this window.
func (*GLWindow) Draw ¶
func (window *GLWindow) Draw()
Draw: redraw the window contents. Implementations should invoke the draw callback.
func (*GLWindow) HandleEvents ¶
HandleEvents: 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.
The function takes the following parameters:
- handleEvents indicating if events should be handled or not.
func (*GLWindow) HasOutputSurface ¶
HasOutputSurface: query whether window has output surface or not.
The function returns the following values:
- ok: TRUE if window has useable output surface.
func (*GLWindow) QueueResize ¶
func (window *GLWindow) QueueResize()
QueueResize: queue resizing of window.
func (*GLWindow) Resize ¶
Resize window to the given width and height.
The function takes the following parameters:
- width: new width.
- height: new height.
func (*GLWindow) SendMouseEvent ¶
The function takes the following parameters:
- eventType
- button
- posx
- posy
func (*GLWindow) SendScrollEvent ¶
SendScrollEvent: notify a window about a scroll event. A scroll signal holding the event coordinates will be emitted.
The function takes the following parameters:
- posx: x position of the mouse cursor.
- posy: y position of the mouse cursor.
- deltaX: x offset of the scroll event.
- deltaY: y offset of the scroll event.
func (*GLWindow) SetPreferredSize ¶
SetPreferredSize: set the preferred width and height of the window. Implementations are free to ignore this information.
The function takes the following parameters:
- width: new preferred width.
- height: new preferred height.
func (*GLWindow) SetRenderRectangle ¶
SetRenderRectangle: tell a window that it should render into a specific region of the window according to the VideoOverlay interface.
The function takes the following parameters:
- x position.
- y position.
- width: width.
- height: height.
The function returns the following values:
- ok: whether the specified region could be set.
func (*GLWindow) SetWindowHandle ¶
SetWindowHandle sets the window that this window should render into. Some implementations require this to be called with a valid handle before drawing can commence.
The function takes the following parameters:
- handle to the window.
func (*GLWindow) SurfaceDimensions ¶
The function returns the following values:
- width: resulting surface width.
- height: resulting surface height.
func (*GLWindow) WindowHandle ¶
The function returns the following values:
- guintptr: window handle we are currently rendering into.
type GLWindowClass ¶
type GLWindowClass struct {
// contains filtered or unexported fields
}
GLWindowClass: instance of this type is always passed by reference.
func (*GLWindowClass) ParentClass ¶
func (g *GLWindowClass) ParentClass() *gst.ObjectClass
ParentClass: parent class.
type GLWindowError ¶
const ( // GLWindowErrorFailed: failed for a unspecified reason. GLWindowErrorFailed GLWindowError = iota // GLWindowErrorOldLibs: implementation is too old. GLWindowErrorOldLibs GLWindowErrorResourceUnavailable )
func (GLWindowError) String ¶
func (g GLWindowError) String() string
String returns the name in string for GLWindowError.
type GLWindowOverrides ¶
type GLWindowOverrides struct { Close func() // ControlsViewport checks if window controls the GL viewport. // // The function returns the following values: // // - ok: TRUE if window controls the GL viewport, otherwise FALSE. // ControlsViewport func() bool // Draw: redraw the window contents. Implementations should invoke the draw // callback. Draw func() // The function returns the following values: // // - guintptr: windowing system display handle for this window. // Display func() uintptr // The function returns the following values: // // - guintptr: window handle we are currently rendering into. // WindowHandle func() uintptr // HandleEvents: 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. // // The function takes the following parameters: // // - handleEvents indicating if events should be handled or not. // HandleEvents func(handleEvents bool) // HasOutputSurface: query whether window has output surface or not. // // The function returns the following values: // // - ok: TRUE if window has useable output surface. // HasOutputSurface func() bool Open func() error // QueueResize: queue resizing of window. QueueResize func() // Quit the runloop's execution. Quit func() // Run: start the execution of the runloop. Run func() // SetPreferredSize: set the preferred width and height of the window. // Implementations are free to ignore this information. // // The function takes the following parameters: // // - width: new preferred width. // - height: new preferred height. // SetPreferredSize func(width, height int) // SetRenderRectangle: tell a window that it should render into a specific // region of the window according to the VideoOverlay interface. // // The function takes the following parameters: // // - x position. // - y position. // - width: width. // - height: height. // // The function returns the following values: // // - ok: whether the specified region could be set. // SetRenderRectangle func(x, y, width, height int) bool // SetWindowHandle sets the window that this window should render into. Some // implementations require this to be called with a valid handle before // drawing can commence. // // The function takes the following parameters: // // - handle to the window. // SetWindowHandle func(handle uintptr) // Show: present the window to the screen. Show func() }
GLWindowOverrides contains methods that are overridable.
type GLWindower ¶
GLWindower describes types inherited from class GLWindow.
To get the original type, the caller must assert this to an interface or another type.
Source Files ¶
- gstgl.go
- gstgl_enums_1_8.go
- gstgl_export.go
- gstglapi.go
- gstglbasefilter.go
- gstglbasememory.go
- gstglbasememory_1_8.go
- gstglbasesrc_1_18.go
- gstglbuffer.go
- gstglbuffer_1_8.go
- gstglbufferpool.go
- gstglcolorconvert.go
- gstglcolorconvert_1_6.go
- gstglcolorconvert_1_8.go
- gstglcontext.go
- gstglcontext_1_4.go
- gstglcontext_1_6.go
- gstglcontextconfig_1_20.go
- gstgldebug.go
- gstgldebug_export.go
- gstgldisplay.go
- gstgldisplay_1_4.go
- gstgldisplay_export.go
- gstglfeature.go
- gstglfilter.go
- gstglfilter_1_10.go
- gstglfilter_1_10_export.go
- gstglformat.go
- gstglformat_1_16.go
- gstglframebuffer.go
- gstglframebuffer_1_10.go
- gstglmemory.go
- gstglmemory_1_4.go
- gstglmemory_1_8.go
- gstglmemorypbo.go
- gstglmemorypbo_1_8.go
- gstgloverlaycompositor.go
- gstglquery_1_10.go
- gstglrenderbuffer.go
- gstglrenderbuffer_1_10.go
- gstglshader.go
- gstglshaderstrings_1_16.go
- gstglsl.go
- gstglsl_1_8.go
- gstglslstage.go
- gstglsyncmeta.go
- gstglsyncmeta_1_6.go
- gstglsyncmeta_1_8.go
- gstglupload.go
- gstglutils.go
- gstglutils_1_20.go
- gstglviewconvert.go
- gstglwindow.go
- gstglwindow_export.go