GstGL.GLColorConvert¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
context |
r |
||
fbo |
r |
||
in_info |
r |
||
inbuf |
r |
||
initted |
r |
||
out_info |
r |
||
outbuf |
r |
||
parent |
r |
||
passthrough |
r |
||
shader |
r |
Class Details¶
- class GstGL.GLColorConvert(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
GstGL.GLColorConvert
is an object that converts between color spaces and/or formats using OpenGL Shaders.A
GstGL.GLColorConvert
can be created withGstGL.GLColorConvert.new
(), the configuration negotiated withGstGL.GLColorConvert.transform_caps
() and the conversion performed withGstGL.GLColorConvert.perform
().The glcolorconvertelement provides a GStreamer element that uses
GstGL.GLColorConvert
to convert between video formats and color spaces.- classmethod fixate_caps(context, direction, caps, other)[source]¶
- Parameters:
context (
GstGL.GLContext
) – aGstGL.GLContext
to use for transforming capsdirection (
Gst.PadDirection
) – aGst.PadDirection
- Returns:
the fixated
Gst.Caps
- Return type:
Provides an implementation of
GstBase.BaseTransform.do_fixate_caps
()New in version 1.8.
- classmethod new(context)[source]¶
- Parameters:
context (
GstGL.GLContext
) – aGstGL.GLContext
- Returns:
a new
GstGL.GLColorConvert
object- Return type:
New in version 1.4.
- classmethod swizzle_shader_string(context)[source]¶
- Parameters:
context (
GstGL.GLContext
) – aGstGL.GLContext
- Returns:
a shader string that can be used to swizzle vec components in a GLSL shader.
- Return type:
New in version 1.24.
- classmethod transform_caps(context, direction, caps, filter)[source]¶
- Parameters:
context (
GstGL.GLContext
) – aGstGL.GLContext
to use for transforming capsdirection (
Gst.PadDirection
) – aGst.PadDirection
- Returns:
the converted
Gst.Caps
- Return type:
Provides an implementation of
GstBase.BaseTransform.do_transform_caps
()New in version 1.6.
- classmethod yuv_to_rgb_shader_string(context)[source]¶
- Parameters:
context (
GstGL.GLContext
) – aGstGL.GLContext
- Returns:
a glsl function that can be used to convert from yuv to rgb
- Return type:
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.
New in version 1.24.
- decide_allocation(query)[source]¶
- Parameters:
- Returns:
whether the allocation parameters were successfully chosen
- Return type:
Provides an implementation of
GstBase.BaseTransform.do_decide_allocation
()New in version 1.8.
- perform(inbuf)[source]¶
- Parameters:
inbuf (
Gst.Buffer
) – theGstGL.GLMemory
filledGst.Buffer
to convert- Returns:
a converted
Gst.Buffer
orNone
- Return type:
Gst.Buffer
orNone
Converts the data contained by inbuf using the formats specified by the
Gst.Caps
passed toGstGL.GLColorConvert.set_caps
()New in version 1.4.