GstGLColorConvert
GstGLColorConvert is an object that converts between color spaces and/or formats using OpenGL Shaders.
A GstGLColorConvert can be created with gst_gl_color_convert_new, 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 GstGLColorConvert to convert between video formats and color spaces.
GstGLColorConvert
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstGLColorConvert
Opaque GstGLColorConvert object
Class structure
GstGL.GLColorConvert
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──GstGL.GLColorConvert
Opaque GstGL.GLColorConvert object
GstGL.GLColorConvert
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──GstGL.GLColorConvert
Opaque GstGL.GLColorConvert object
Constructors
gst_gl_color_convert_new
GstGLColorConvert * gst_gl_color_convert_new (GstGLContext * context)
Parameters:
context
–
a new GstGLColorConvert object
Since : 1.4
GstGL.GLColorConvert.prototype.new
function GstGL.GLColorConvert.prototype.new(context: GstGL.GLContext): {
// javascript wrapper for 'gst_gl_color_convert_new'
}
Parameters:
a new GstGL.GLColorConvert object
Since : 1.4
GstGL.GLColorConvert.new
def GstGL.GLColorConvert.new (context):
#python wrapper for 'gst_gl_color_convert_new'
Parameters:
a new GstGL.GLColorConvert object
Since : 1.4
Methods
gst_gl_color_convert_decide_allocation
gboolean gst_gl_color_convert_decide_allocation (GstGLColorConvert * convert, GstQuery * query)
Provides an implementation of decide_allocation()
whether the allocation parameters were successfully chosen
Since : 1.8
GstGL.GLColorConvert.prototype.decide_allocation
function GstGL.GLColorConvert.prototype.decide_allocation(query: Gst.Query): {
// javascript wrapper for 'gst_gl_color_convert_decide_allocation'
}
Provides an implementation of vfunc_decide_allocation()
Parameters:
whether the allocation parameters were successfully chosen
Since : 1.8
GstGL.GLColorConvert.decide_allocation
def GstGL.GLColorConvert.decide_allocation (self, query):
#python wrapper for 'gst_gl_color_convert_decide_allocation'
Provides an implementation of do_decide_allocation()
Parameters:
whether the allocation parameters were successfully chosen
Since : 1.8
gst_gl_color_convert_perform
GstBuffer * gst_gl_color_convert_perform (GstGLColorConvert * convert, GstBuffer * inbuf)
Converts the data contained by inbuf using the formats specified by the GstCaps passed to gst_gl_color_convert_set_caps
Since : 1.4
GstGL.GLColorConvert.prototype.perform
function GstGL.GLColorConvert.prototype.perform(inbuf: Gst.Buffer): {
// javascript wrapper for 'gst_gl_color_convert_perform'
}
Converts the data contained by inbuf using the formats specified by the Gst.Caps passed to GstGL.GLColorConvert.prototype.set_caps
a converted Gst.Buffer or null
Since : 1.4
GstGL.GLColorConvert.perform
def GstGL.GLColorConvert.perform (self, inbuf):
#python wrapper for 'gst_gl_color_convert_perform'
Converts the data contained by inbuf using the formats specified by the Gst.Caps passed to GstGL.GLColorConvert.set_caps
a converted Gst.Buffer or None
Since : 1.4
gst_gl_color_convert_set_caps
gboolean gst_gl_color_convert_set_caps (GstGLColorConvert * convert, GstCaps * in_caps, GstCaps * out_caps)
Initializes convert with the information required for conversion.
Since : 1.6
GstGL.GLColorConvert.prototype.set_caps
function GstGL.GLColorConvert.prototype.set_caps(in_caps: Gst.Caps, out_caps: Gst.Caps): {
// javascript wrapper for 'gst_gl_color_convert_set_caps'
}
Initializes convert with the information required for conversion.
Parameters:
Since : 1.6
GstGL.GLColorConvert.set_caps
def GstGL.GLColorConvert.set_caps (self, in_caps, out_caps):
#python wrapper for 'gst_gl_color_convert_set_caps'
Initializes convert with the information required for conversion.
Parameters:
Since : 1.6
Functions
gst_gl_color_convert_fixate_caps
GstCaps * gst_gl_color_convert_fixate_caps (GstGLContext * context, GstPadDirection direction, GstCaps * caps, GstCaps * other)
Provides an implementation of fixate_caps()
Parameters:
context
–
a GstGLContext to use for transforming caps
direction
–
caps
(
[transfer: none])
–
the GstCaps of direction
other
(
[transfer: full])
–
the GstCaps to fixate
the fixated GstCaps
Since : 1.8
GstGL.GLColorConvert.prototype.fixate_caps
function GstGL.GLColorConvert.prototype.fixate_caps(context: GstGL.GLContext, direction: Gst.PadDirection, caps: Gst.Caps, other: Gst.Caps): {
// javascript wrapper for 'gst_gl_color_convert_fixate_caps'
}
Provides an implementation of vfunc_fixate_caps()
Since : 1.8
GstGL.GLColorConvert.fixate_caps
def GstGL.GLColorConvert.fixate_caps (context, direction, caps, other):
#python wrapper for 'gst_gl_color_convert_fixate_caps'
Provides an implementation of do_fixate_caps()
Since : 1.8
gst_gl_color_convert_swizzle_shader_string
gchar * gst_gl_color_convert_swizzle_shader_string (GstGLContext * context)
Parameters:
context
–
a shader string that can be used to swizzle vec components in a GLSL shader.
Since : 1.24
GstGL.GLColorConvert.prototype.swizzle_shader_string
function GstGL.GLColorConvert.prototype.swizzle_shader_string(context: GstGL.GLContext): {
// javascript wrapper for 'gst_gl_color_convert_swizzle_shader_string'
}
Parameters:
a shader string that can be used to swizzle vec components in a GLSL shader.
Since : 1.24
GstGL.GLColorConvert.swizzle_shader_string
def GstGL.GLColorConvert.swizzle_shader_string (context):
#python wrapper for 'gst_gl_color_convert_swizzle_shader_string'
Parameters:
a shader string that can be used to swizzle vec components in a GLSL shader.
Since : 1.24
gst_gl_color_convert_transform_caps
GstCaps * gst_gl_color_convert_transform_caps (GstGLContext * context, GstPadDirection direction, GstCaps * caps, GstCaps * filter)
Provides an implementation of transform_caps()
Parameters:
context
–
a GstGLContext to use for transforming caps
direction
–
caps
(
[transfer: none])
–
the GstCaps to transform
filter
(
[transfer: none])
–
a set of filter GstCaps
the converted GstCaps
Since : 1.6
GstGL.GLColorConvert.prototype.transform_caps
function GstGL.GLColorConvert.prototype.transform_caps(context: GstGL.GLContext, direction: Gst.PadDirection, caps: Gst.Caps, filter: Gst.Caps): {
// javascript wrapper for 'gst_gl_color_convert_transform_caps'
}
Provides an implementation of vfunc_transform_caps()
Since : 1.6
GstGL.GLColorConvert.transform_caps
def GstGL.GLColorConvert.transform_caps (context, direction, caps, filter):
#python wrapper for 'gst_gl_color_convert_transform_caps'
Provides an implementation of do_transform_caps()
Since : 1.6
gst_gl_color_convert_yuv_to_rgb_shader_string
gchar * gst_gl_color_convert_yuv_to_rgb_shader_string (GstGLContext * context)
The returned glsl function has declaration:
vec3 yuv_to_rgb (vec3 rgb, vec3 offset, vec3 ycoeff, vec3 ucoeff, vec3 vcoeff);
The Y component is placed in the 0th index of the returned value, The U component in the 1st, and the V component in the 2nd. offset, ycoeff, ucoeff, and vcoeff are the specific coefficients and offset used for the conversion.
Parameters:
context
–
a glsl function that can be used to convert from yuv to rgb
Since : 1.24
GstGL.GLColorConvert.prototype.yuv_to_rgb_shader_string
function GstGL.GLColorConvert.prototype.yuv_to_rgb_shader_string(context: GstGL.GLContext): {
// javascript wrapper for 'gst_gl_color_convert_yuv_to_rgb_shader_string'
}
The returned glsl function has declaration:
vec3 yuv_to_rgb (vec3 rgb, vec3 offset, vec3 ycoeff, vec3 ucoeff, vec3 vcoeff);
The Y component is placed in the 0th index of the returned value, The U component in the 1st, and the V component in the 2nd. offset, ycoeff, ucoeff, and vcoeff are the specific coefficients and offset used for the conversion.
Parameters:
a glsl function that can be used to convert from yuv to rgb
Since : 1.24
GstGL.GLColorConvert.yuv_to_rgb_shader_string
def GstGL.GLColorConvert.yuv_to_rgb_shader_string (context):
#python wrapper for 'gst_gl_color_convert_yuv_to_rgb_shader_string'
The returned glsl function has declaration:
vec3 yuv_to_rgb (vec3 rgb, vec3 offset, vec3 ycoeff, vec3 ucoeff, vec3 vcoeff);
The Y component is placed in the 0th index of the returned value, The U component in the 1st, and the V component in the 2nd. offset, ycoeff, ucoeff, and vcoeff are the specific coefficients and offset used for the conversion.
Parameters:
a glsl function that can be used to convert from yuv to rgb
Since : 1.24
Function Macros
GST_GL_COLOR_CONVERT_CAST
#define GST_GL_COLOR_CONVERT_CAST(obj) ((GstGLColorConvert*)(obj))
Constants
GST_GL_COLOR_CONVERT_EXT_FORMATS
#define GST_GL_COLOR_CONVERT_EXT_FORMATS \ ", RGBA64_LE, BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE, Y212_LE, Y412_LE" \ ", A444_16LE, A422_16LE, A420_16LE, A444_12LE, A422_12LE, A420_12LE, A420_10LE" \ ", A422_10LE, A444_10LE, I420_12LE, I420_10LE, I422_10LE, I422_12LE, Y444_16LE, Y444_10LE"
GST_GL_COLOR_CONVERT_FORMATS
#define GST_GL_COLOR_CONVERT_FORMATS "{ RGBA, RGB, RGBx, BGR, BGRx, BGRA, xRGB, " \ "xBGR, ARGB, ABGR, GBRA, GBR, RGBP, BGRP, Y444, I420, YV12, Y42B, " \ "Y41B, NV12, NV21, NV16, NV61, YUY2, UYVY, Y210, AYUV, " \ "VUYA, Y410, A444, A422, GRAY8, GRAY16_LE, GRAY16_BE, " \ "RGB16, BGR16, ARGB64, A420, AV12, NV12_16L32S, NV12_4L4, RBGA, v210" \ GST_GL_COLOR_CONVERT_EXT_FORMATS "}"
The currently supported formats that can be converted
GstGL.GL_COLOR_CONVERT_FORMATS
The currently supported formats that can be converted
GstGL.GL_COLOR_CONVERT_FORMATS
The currently supported formats that can be converted
GST_GL_COLOR_CONVERT_VIDEO_CAPS
#define GST_GL_COLOR_CONVERT_VIDEO_CAPS \ "video/x-raw(" GST_CAPS_FEATURE_MEMORY_GL_MEMORY "), " \ "format = (string) " GST_GL_COLOR_CONVERT_FORMATS ", " \ "width = " GST_VIDEO_SIZE_RANGE ", " \ "height = " GST_VIDEO_SIZE_RANGE ", " \ "framerate = " GST_VIDEO_FPS_RANGE ", " \ "texture-target = (string) { 2D, rectangle, external-oes } " \ " ; " \ "video/x-raw(" GST_CAPS_FEATURE_MEMORY_GL_MEMORY "," \ GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION "), " \ "format = (string) " GST_GL_COLOR_CONVERT_FORMATS ", " \ "width = " GST_VIDEO_SIZE_RANGE ", " \ "height = " GST_VIDEO_SIZE_RANGE ", " \ "framerate = " GST_VIDEO_FPS_RANGE ", " \ "texture-target = (string) { 2D, rectangle, external-oes }" \ " ; " \ GST_VIDEO_DMA_DRM_CAPS_MAKE
The currently supported GstCaps that can be converted
The results of the search are