GstGLFormat
Some useful utilities for converting between various formats and OpenGL formats.
Functions
gst_gl_format_from_video_info
GstGLFormat gst_gl_format_from_video_info (GstGLContext * context, const GstVideoInfo * vinfo, guint plane)
the GstGLFormat necessary for holding the data in plane of vinfo
GstGL.prototype.gl_format_from_video_info
function GstGL.prototype.gl_format_from_video_info(context: GstGL.GLContext, vinfo: GstVideo.VideoInfo, plane: Number): {
// javascript wrapper for 'gst_gl_format_from_video_info'
}
Parameters:
the plane number in vinfo
the GstGL.GLFormat necessary for holding the data in plane of vinfo
GstGL.gl_format_from_video_info
def GstGL.gl_format_from_video_info (context, vinfo, plane):
#python wrapper for 'gst_gl_format_from_video_info'
Parameters:
the plane number in vinfo
the GstGL.GLFormat necessary for holding the data in plane of vinfo
gst_gl_format_is_supported
gboolean gst_gl_format_is_supported (GstGLContext * context, GstGLFormat format)
Whether format is supported by context based on the OpenGL API, version, or available OpenGL extension/s.
Since : 1.16
GstGL.prototype.gl_format_is_supported
function GstGL.prototype.gl_format_is_supported(context: GstGL.GLContext, format: GstGL.GLFormat): {
// javascript wrapper for 'gst_gl_format_is_supported'
}
Whether format is supported by context based on the OpenGL API, version, or available OpenGL extension/s.
Since : 1.16
GstGL.gl_format_is_supported
def GstGL.gl_format_is_supported (context, format):
#python wrapper for 'gst_gl_format_is_supported'
Whether format is supported by context based on the OpenGL API, version, or available OpenGL extension/s.
Since : 1.16
gst_gl_format_n_components
guint gst_gl_format_n_components (GstGLFormat gl_format)
Parameters:
gl_format
–
the GstGLFormat
the number of components in a GstGLFormat
Since : 1.24
GstGL.prototype.gl_format_n_components
function GstGL.prototype.gl_format_n_components(gl_format: GstGL.GLFormat): {
// javascript wrapper for 'gst_gl_format_n_components'
}
Parameters:
the GstGL.GLFormat
the number of components in a GstGL.GLFormat
Since : 1.24
GstGL.gl_format_n_components
def GstGL.gl_format_n_components (gl_format):
#python wrapper for 'gst_gl_format_n_components'
Parameters:
the GstGL.GLFormat
the number of components in a GstGL.GLFormat
Since : 1.24
gst_gl_format_type_from_sized_gl_format
gst_gl_format_type_from_sized_gl_format (GstGLFormat format, GstGLFormat * unsized_format, guint * gl_type)
Get the unsized format and type from format for usage in glReadPixels, glTex{Sub}Image*, glTexImage* and similar functions.
Parameters:
format
–
the sized internal GstGLFormat
unsized_format
(
[out])
–
location for the resulting unsized GstGLFormat
gl_type
(
[out])
–
location for the resulting GL type
Since : 1.16
GstGL.prototype.gl_format_type_from_sized_gl_format
function GstGL.prototype.gl_format_type_from_sized_gl_format(format: GstGL.GLFormat): {
// javascript wrapper for 'gst_gl_format_type_from_sized_gl_format'
}
Get the unsized format and type from format for usage in glReadPixels, glTex{Sub}Image*, glTexImage* and similar functions.
Parameters:
the sized internal GstGL.GLFormat
Since : 1.16
GstGL.gl_format_type_from_sized_gl_format
def GstGL.gl_format_type_from_sized_gl_format (format):
#python wrapper for 'gst_gl_format_type_from_sized_gl_format'
Get the unsized format and type from format for usage in glReadPixels, glTex{Sub}Image*, glTexImage* and similar functions.
Parameters:
the sized internal GstGL.GLFormat
Since : 1.16
gst_gl_format_type_n_bytes
guint gst_gl_format_type_n_bytes (guint format, guint type)
Parameters:
format
–
the OpenGL format, GL_RGBA
, GL_LUMINANCE
, etc
type
–
the OpenGL type, GL_UNSIGNED_BYTE
, GL_FLOAT
, etc
the number of bytes the specified format, type combination takes per pixel
GstGL.prototype.gl_format_type_n_bytes
function GstGL.prototype.gl_format_type_n_bytes(format: Number, type: Number): {
// javascript wrapper for 'gst_gl_format_type_n_bytes'
}
Parameters:
the OpenGL format, GL_RGBA
, GL_LUMINANCE
, etc
the OpenGL type, GL_UNSIGNED_BYTE
, GL_FLOAT
, etc
the number of bytes the specified format, type combination takes per pixel
GstGL.gl_format_type_n_bytes
def GstGL.gl_format_type_n_bytes (format, type):
#python wrapper for 'gst_gl_format_type_n_bytes'
Parameters:
the OpenGL format, GL_RGBA
, GL_LUMINANCE
, etc
the OpenGL type, GL_UNSIGNED_BYTE
, GL_FLOAT
, etc
the number of bytes the specified format, type combination takes per pixel
gst_gl_sized_gl_format_from_gl_format_type
guint gst_gl_sized_gl_format_from_gl_format_type (GstGLContext * context, guint format, guint type)
Parameters:
context
–
format
–
an OpenGL format, GL_RGBA
, GL_LUMINANCE
, etc
type
–
an OpenGL type, GL_UNSIGNED_BYTE
, GL_FLOAT
, etc
the sized internal format specified by format and type that can be used in context
GstGL.prototype.gl_sized_gl_format_from_gl_format_type
function GstGL.prototype.gl_sized_gl_format_from_gl_format_type(context: GstGL.GLContext, format: Number, type: Number): {
// javascript wrapper for 'gst_gl_sized_gl_format_from_gl_format_type'
}
Parameters:
an OpenGL format, GL_RGBA
, GL_LUMINANCE
, etc
an OpenGL type, GL_UNSIGNED_BYTE
, GL_FLOAT
, etc
the sized internal format specified by format and type that can be used in context
GstGL.gl_sized_gl_format_from_gl_format_type
def GstGL.gl_sized_gl_format_from_gl_format_type (context, format, type):
#python wrapper for 'gst_gl_sized_gl_format_from_gl_format_type'
Parameters:
an OpenGL format, GL_RGBA
, GL_LUMINANCE
, etc
an OpenGL type, GL_UNSIGNED_BYTE
, GL_FLOAT
, etc
the sized internal format specified by format and type that can be used in context
gst_gl_swizzle_invert
gst_gl_swizzle_invert (gint * swizzle, gint * inversion)
Given swizzle, produce inversion such that:
swizzle[@inversion[i]] == identity[i] where:
- identity = {0, 1, 2,...}
- unset fields are marked by -1
Parameters:
swizzle
(
[arrayfixed-size=4])
–
input swizzle
inversion
(
[out][arrayfixed-size=4])
–
resulting inversion
Since : 1.24
GstGL.prototype.gl_swizzle_invert
function GstGL.prototype.gl_swizzle_invert(swizzle: [ Number ]): {
// javascript wrapper for 'gst_gl_swizzle_invert'
}
Given swizzle, produce inversion such that:
swizzle[@inversion[i]] == identity[i] where:
- identity = {0, 1, 2,...}
- unset fields are marked by -1
Parameters:
input swizzle
Since : 1.24
GstGL.gl_swizzle_invert
def GstGL.gl_swizzle_invert (swizzle):
#python wrapper for 'gst_gl_swizzle_invert'
Given swizzle, produce inversion such that:
swizzle[@inversion[i]] == identity[i] where:
- identity = {0, 1, 2,...}
- unset fields are marked by -1
Parameters:
input swizzle
Since : 1.24
gst_gl_texture_target_from_gl
GstGLTextureTarget gst_gl_texture_target_from_gl (guint target)
Parameters:
target
–
an OpenGL texture binding target
the GstGLTextureTarget that's equiavalant to target or GST_GL_TEXTURE_TARGET_NONE
GstGL.prototype.gl_texture_target_from_gl
function GstGL.prototype.gl_texture_target_from_gl(target: Number): {
// javascript wrapper for 'gst_gl_texture_target_from_gl'
}
Parameters:
an OpenGL texture binding target
the GstGL.GLTextureTarget that's equiavalant to target or GstGL.GLTextureTarget.NONE
GstGL.gl_texture_target_from_gl
def GstGL.gl_texture_target_from_gl (target):
#python wrapper for 'gst_gl_texture_target_from_gl'
Parameters:
an OpenGL texture binding target
the GstGL.GLTextureTarget that's equiavalant to target or GstGL.GLTextureTarget.NONE
gst_gl_texture_target_from_string
GstGLTextureTarget gst_gl_texture_target_from_string (const gchar * str)
Parameters:
str
–
a string equivalent to one of the GST_GL_TEXTURE_TARGET_*_STR values
the GstGLTextureTarget represented by str or GST_GL_TEXTURE_TARGET_NONE
GstGL.prototype.gl_texture_target_from_string
function GstGL.prototype.gl_texture_target_from_string(str: String): {
// javascript wrapper for 'gst_gl_texture_target_from_string'
}
Parameters:
a string equivalent to one of the GST_GL_TEXTURE_TARGET_*_STR values
the GstGL.GLTextureTarget represented by str or GstGL.GLTextureTarget.NONE
GstGL.gl_texture_target_from_string
def GstGL.gl_texture_target_from_string (str):
#python wrapper for 'gst_gl_texture_target_from_string'
Parameters:
a string equivalent to one of the GST_GL_TEXTURE_TARGET_*_STR values
the GstGL.GLTextureTarget represented by str or GstGL.GLTextureTarget.NONE
gst_gl_texture_target_to_buffer_pool_option
const gchar * gst_gl_texture_target_to_buffer_pool_option (GstGLTextureTarget target)
Parameters:
target
–
a string representing the GstBufferPoolOption specified by target
GstGL.prototype.gl_texture_target_to_buffer_pool_option
function GstGL.prototype.gl_texture_target_to_buffer_pool_option(target: GstGL.GLTextureTarget): {
// javascript wrapper for 'gst_gl_texture_target_to_buffer_pool_option'
}
Parameters:
a string representing the GstBufferPoolOption specified by target
GstGL.gl_texture_target_to_buffer_pool_option
def GstGL.gl_texture_target_to_buffer_pool_option (target):
#python wrapper for 'gst_gl_texture_target_to_buffer_pool_option'
Parameters:
a string representing the GstBufferPoolOption specified by target
gst_gl_texture_target_to_gl
guint gst_gl_texture_target_to_gl (GstGLTextureTarget target)
Parameters:
target
–
the OpenGL value for binding the target with glBindTexture and similar functions or 0
GstGL.prototype.gl_texture_target_to_gl
function GstGL.prototype.gl_texture_target_to_gl(target: GstGL.GLTextureTarget): {
// javascript wrapper for 'gst_gl_texture_target_to_gl'
}
Parameters:
the OpenGL value for binding the target with glBindTexture and similar functions or 0
GstGL.gl_texture_target_to_gl
def GstGL.gl_texture_target_to_gl (target):
#python wrapper for 'gst_gl_texture_target_to_gl'
Parameters:
the OpenGL value for binding the target with glBindTexture and similar functions or 0
gst_gl_texture_target_to_string
const gchar * gst_gl_texture_target_to_string (GstGLTextureTarget target)
Parameters:
target
–
the stringified version of target or NULL
GstGL.prototype.gl_texture_target_to_string
function GstGL.prototype.gl_texture_target_to_string(target: GstGL.GLTextureTarget): {
// javascript wrapper for 'gst_gl_texture_target_to_string'
}
Parameters:
GstGL.gl_texture_target_to_string
def GstGL.gl_texture_target_to_string (target):
#python wrapper for 'gst_gl_texture_target_to_string'
Parameters:
gst_gl_video_format_swizzle
gboolean gst_gl_video_format_swizzle (GstVideoFormat video_format, int* swizzle)
Calculates the swizzle indices for video_format and gl_format in order to access a texture such that accessing a texel from a texture through the swizzle index produces values in the order (R, G, B, A) or (Y, U, V, A).
For multi-planer formats, the swizzle index uses the same component order (RGBA/YUVA) and should be applied after combining multiple planes into a single rgba/yuva value. e.g. sampling from a NV12 format would have Y from one texture and UV from another texture into a (Y, U, V) value. Add an Aplha component and then perform swizzling. Sampling from NV21 would produce (Y, V, U) which is then swizzled to (Y, U, V).
Parameters:
video_format
–
the GstVideoFormat in use
swizzle
(
[out][arrayfixed-size=4])
–
the returned swizzle indices
whether valid swizzle indices could be found
Since : 1.24
GstGL.prototype.gl_video_format_swizzle
function GstGL.prototype.gl_video_format_swizzle(video_format: GstVideo.VideoFormat): {
// javascript wrapper for 'gst_gl_video_format_swizzle'
}
Calculates the swizzle indices for video_format and gl_format in order to access a texture such that accessing a texel from a texture through the swizzle index produces values in the order (R, G, B, A) or (Y, U, V, A).
For multi-planer formats, the swizzle index uses the same component order (RGBA/YUVA) and should be applied after combining multiple planes into a single rgba/yuva value. e.g. sampling from a NV12 format would have Y from one texture and UV from another texture into a (Y, U, V) value. Add an Aplha component and then perform swizzling. Sampling from NV21 would produce (Y, V, U) which is then swizzled to (Y, U, V).
Parameters:
the GstVideo.VideoFormat in use
Returns a tuple made of:
whether valid swizzle indices could be found
whether valid swizzle indices could be found
Since : 1.24
GstGL.gl_video_format_swizzle
def GstGL.gl_video_format_swizzle (video_format):
#python wrapper for 'gst_gl_video_format_swizzle'
Calculates the swizzle indices for video_format and gl_format in order to access a texture such that accessing a texel from a texture through the swizzle index produces values in the order (R, G, B, A) or (Y, U, V, A).
For multi-planer formats, the swizzle index uses the same component order (RGBA/YUVA) and should be applied after combining multiple planes into a single rgba/yuva value. e.g. sampling from a NV12 format would have Y from one texture and UV from another texture into a (Y, U, V) value. Add an Aplha component and then perform swizzling. Sampling from NV21 would produce (Y, V, U) which is then swizzled to (Y, U, V).
Parameters:
the GstVideo.VideoFormat in use
Returns a tuple made of:
whether valid swizzle indices could be found
whether valid swizzle indices could be found
Since : 1.24
Enumerations
GstGLFormat
Members
GST_GL_LUMINANCE
(6409)
–
Single component replicated across R, G, and B textures components
GST_GL_ALPHA
(6406)
–
Single component stored in the A texture component
GST_GL_LUMINANCE_ALPHA
(6410)
–
Combination of GST_GL_LUMINANCE and GST_GL_ALPHA
GST_GL_RED
(6403)
–
Single component stored in the R texture component
GST_GL_R8
(33321)
–
Single 8-bit component stored in the R texture component
GST_GL_RG
(33319)
–
Two components stored in the R and G texture components
GST_GL_RG8
(33323)
–
Two 8-bit components stored in the R and G texture components
GST_GL_RGB
(6407)
–
Three components stored in the R, G, and B texture components
GST_GL_RGB8
(32849)
–
Three 8-bit components stored in the R, G, and B texture components
GST_GL_RGB565
(36194)
–
Three components of bit depth 5, 6 and 5 stored in the R, G, and B texture components respectively.
GST_GL_RGB16
(32852)
–
Three 16-bit components stored in the R, G, and B texture components
GST_GL_RGBA
(6408)
–
Four components stored in the R, G, B, and A texture components respectively.
GST_GL_RGBA8
(32856)
–
Four 8-bit components stored in the R, G, B, and A texture components respectively.
GST_GL_RGBA16
(32859)
–
Four 16-bit components stored in the R, G, B, and A texture components respectively.
GST_GL_DEPTH_COMPONENT16
(33189)
–
A single 16-bit component for depth information.
GST_GL_DEPTH24_STENCIL8
(35056)
–
A 24-bit component for depth information and a 8-bit component for stencil informat.
GST_GL_RGB10_A2
(32857)
–
GST_GL_R16
(33322)
–
Single 16-bit component stored in the R texture component
GST_GL_RG16
(33324)
–
Two 16-bit components stored in the R and G texture components
GstGL.GLFormat
Members
GstGL.GLFormat.LUMINANCE
(6409)
–
Single component replicated across R, G, and B textures components
GstGL.GLFormat.ALPHA
(6406)
–
Single component stored in the A texture component
GstGL.GLFormat.LUMINANCE_ALPHA
(6410)
–
Combination of GstGL.GLFormat.LUMINANCE and GstGL.GLFormat.ALPHA
GstGL.GLFormat.RED
(6403)
–
Single component stored in the R texture component
GstGL.GLFormat.R8
(33321)
–
Single 8-bit component stored in the R texture component
GstGL.GLFormat.RG
(33319)
–
Two components stored in the R and G texture components
GstGL.GLFormat.RG8
(33323)
–
Two 8-bit components stored in the R and G texture components
GstGL.GLFormat.RGB
(6407)
–
Three components stored in the R, G, and B texture components
GstGL.GLFormat.RGB8
(32849)
–
Three 8-bit components stored in the R, G, and B texture components
GstGL.GLFormat.RGB565
(36194)
–
Three components of bit depth 5, 6 and 5 stored in the R, G, and B texture components respectively.
GstGL.GLFormat.RGB16
(32852)
–
Three 16-bit components stored in the R, G, and B texture components
GstGL.GLFormat.RGBA
(6408)
–
Four components stored in the R, G, B, and A texture components respectively.
GstGL.GLFormat.RGBA8
(32856)
–
Four 8-bit components stored in the R, G, B, and A texture components respectively.
GstGL.GLFormat.RGBA16
(32859)
–
Four 16-bit components stored in the R, G, B, and A texture components respectively.
GstGL.GLFormat.DEPTH_COMPONENT16
(33189)
–
A single 16-bit component for depth information.
GstGL.GLFormat.DEPTH24_STENCIL8
(35056)
–
A 24-bit component for depth information and a 8-bit component for stencil informat.
GstGL.GLFormat.RGB10_A2
(32857)
–
GstGL.GLFormat.R16
(33322)
–
Single 16-bit component stored in the R texture component
GstGL.GLFormat.RG16
(33324)
–
Two 16-bit components stored in the R and G texture components
GstGL.GLFormat
Members
GstGL.GLFormat.LUMINANCE
(6409)
–
Single component replicated across R, G, and B textures components
GstGL.GLFormat.ALPHA
(6406)
–
Single component stored in the A texture component
GstGL.GLFormat.LUMINANCE_ALPHA
(6410)
–
Combination of GstGL.GLFormat.LUMINANCE and GstGL.GLFormat.ALPHA
GstGL.GLFormat.RED
(6403)
–
Single component stored in the R texture component
GstGL.GLFormat.R8
(33321)
–
Single 8-bit component stored in the R texture component
GstGL.GLFormat.RG
(33319)
–
Two components stored in the R and G texture components
GstGL.GLFormat.RG8
(33323)
–
Two 8-bit components stored in the R and G texture components
GstGL.GLFormat.RGB
(6407)
–
Three components stored in the R, G, and B texture components
GstGL.GLFormat.RGB8
(32849)
–
Three 8-bit components stored in the R, G, and B texture components
GstGL.GLFormat.RGB565
(36194)
–
Three components of bit depth 5, 6 and 5 stored in the R, G, and B texture components respectively.
GstGL.GLFormat.RGB16
(32852)
–
Three 16-bit components stored in the R, G, and B texture components
GstGL.GLFormat.RGBA
(6408)
–
Four components stored in the R, G, B, and A texture components respectively.
GstGL.GLFormat.RGBA8
(32856)
–
Four 8-bit components stored in the R, G, B, and A texture components respectively.
GstGL.GLFormat.RGBA16
(32859)
–
Four 16-bit components stored in the R, G, B, and A texture components respectively.
GstGL.GLFormat.DEPTH_COMPONENT16
(33189)
–
A single 16-bit component for depth information.
GstGL.GLFormat.DEPTH24_STENCIL8
(35056)
–
A 24-bit component for depth information and a 8-bit component for stencil informat.
GstGL.GLFormat.RGB10_A2
(32857)
–
GstGL.GLFormat.R16
(33322)
–
Single 16-bit component stored in the R texture component
GstGL.GLFormat.RG16
(33324)
–
Two 16-bit components stored in the R and G texture components
Constants
GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D
#define GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D "GstBufferPoolOptionGLTextureTarget2D"
String used for GST_GL_TEXTURE_TARGET_2D as a GstBufferPool pool option
GstGL.BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D
String used for GstGL.GLTextureTarget.2D as a Gst.BufferPool pool option
GstGL.BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D
String used for GstGL.GLTextureTarget.2D as a Gst.BufferPool pool option
GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_EXTERNAL_OES
#define GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_EXTERNAL_OES "GstBufferPoolOptionGLTextureTargetExternalOES"
String used for GST_GL_TEXTURE_TARGET_EXTERNAL_OES as a GstBufferPool pool option
GstGL.BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_EXTERNAL_OES
String used for GstGL.GLTextureTarget.EXTERNAL_OES as a Gst.BufferPool pool option
GstGL.BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_EXTERNAL_OES
String used for GstGL.GLTextureTarget.EXTERNAL_OES as a Gst.BufferPool pool option
GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_RECTANGLE
#define GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_RECTANGLE "GstBufferPoolOptionGLTextureTargetRectangle"
String used for GST_GL_TEXTURE_TARGET_RECTANGLE as a GstBufferPool pool option
GstGL.BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_RECTANGLE
String used for GstGL.GLTextureTarget.RECTANGLE as a Gst.BufferPool pool option
GstGL.BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_RECTANGLE
String used for GstGL.GLTextureTarget.RECTANGLE as a Gst.BufferPool pool option
GST_GL_TEXTURE_TARGET_2D_STR
#define GST_GL_TEXTURE_TARGET_2D_STR "2D"
String used for GST_GL_TEXTURE_TARGET_2D in things like caps values
GST_GL_TEXTURE_TARGET_EXTERNAL_OES_STR
#define GST_GL_TEXTURE_TARGET_EXTERNAL_OES_STR "external-oes"
String used for GST_GL_TEXTURE_TARGET_EXTERNAL_OES in things like caps values
GstGL.GL_TEXTURE_TARGET_EXTERNAL_OES_STR
String used for GstGL.GLTextureTarget.EXTERNAL_OES in things like caps values
GstGL.GL_TEXTURE_TARGET_EXTERNAL_OES_STR
String used for GstGL.GLTextureTarget.EXTERNAL_OES in things like caps values
GST_GL_TEXTURE_TARGET_RECTANGLE_STR
#define GST_GL_TEXTURE_TARGET_RECTANGLE_STR "rectangle"
String used for GST_GL_TEXTURE_TARGET_RECTANGLE in things like caps values
GstGL.GL_TEXTURE_TARGET_RECTANGLE_STR
String used for GstGL.GLTextureTarget.RECTANGLE in things like caps values
GstGL.GL_TEXTURE_TARGET_RECTANGLE_STR
String used for GstGL.GLTextureTarget.RECTANGLE in things like caps values
The results of the search are