GstGL.GLFilter¶
- Subclasses:
None
Methods¶
- Inherited:
GstGL.GLBaseFilter (2), GstBase.BaseTransform (15), Gst.Element (82), Gst.Object (27), GObject.Object (37)
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
GstGL.GLBaseFilter (3), GstBase.BaseTransform (22), Gst.Element (16), Gst.Object (1), GObject.Object (7)
|
|
|
|
|
|
|
|
|
Properties¶
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
default_shader |
r |
||
draw_attr_position_loc |
r |
||
draw_attr_texture_loc |
r |
||
fbo |
r |
|
|
gl_result |
r |
||
in_info |
r |
the video info for input buffers |
|
in_texture_target |
r |
The texture target of the input buffers (usually 2D) |
|
inbuf |
r |
||
out_caps |
r |
the output |
|
out_info |
r |
the video info for output buffers |
|
out_texture_target |
r |
The texture target of the output buffers (usually 2D) |
|
outbuf |
r |
||
parent |
r |
||
valid_attributes |
r |
||
vao |
r |
||
vbo_indices |
r |
||
vertex_buffer |
r |
Class Details¶
- class GstGL.GLFilter(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
GstGL.GLFilter
helps to implement simple OpenGL filter elements taking a single input and producing a single output with aGstGL.GLFramebuffer
- classmethod add_rgba_pad_templates(klass)[source]¶
- Parameters:
klass (
GstGL.GLFilterClass
) –
- draw_fullscreen_quad()[source]¶
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.
New in version 1.10.
- filter_texture(input, output)[source]¶
- Parameters:
input (
Gst.Buffer
) – an input bufferoutput (
Gst.Buffer
) – an output buffer
- Returns:
whether the transformation succeeded
- Return type:
Calls filter_texture vfunc with correctly mapped
GstGL.GLMemorys
New in version 1.4.
- render_to_target(input, output, func, *data)[source]¶
- Parameters:
input (
GstGL.GLMemory
) – the input textureoutput (
GstGL.GLMemory
) – the output texturefunc (
GstGL.GLFilterRenderFunc
) – the function to transform input into output. called with data
- Returns:
the return value of func
- Return type:
Transforms input into output using func on through FBO.
New in version 1.10.
- render_to_target_with_shader(input, output, shader)[source]¶
- Parameters:
input (
GstGL.GLMemory
) – the input textureoutput (
GstGL.GLMemory
) – the output textureshader (
GstGL.GLShader
) – the shader to use.
Transforms input into output using shader with a FBO.
See also:
GstGL.GLFilter.render_to_target
()New in version 1.4.
- do_filter(inbuf, outbuf) virtual¶
- Parameters:
inbuf (
Gst.Buffer
) –outbuf (
Gst.Buffer
) –
- Return type:
perform operations on the input and output buffers. In general, you should avoid using this method if at all possible. One valid use-case for using this is keeping previous buffers for future calculations. Note: If filter exists, then filter_texture is not run
- do_filter_texture(input, output) virtual¶
- Parameters:
input (
GstGL.GLMemory
) – an input bufferoutput (
GstGL.GLMemory
) – an output buffer
- Returns:
whether the transformation succeeded
- Return type:
Calls filter_texture vfunc with correctly mapped
GstGL.GLMemorys
New in version 1.4.
- do_init_fbo() virtual¶
- Return type:
perform initialization when the Framebuffer object is created
- do_set_caps(incaps, outcaps) virtual¶
-
mirror from
GstBase.BaseTransform
- do_transform_internal_caps(direction, caps, filter_caps) virtual¶
- Parameters:
direction (
Gst.PadDirection
) –caps (
Gst.Caps
) –filter_caps (
Gst.Caps
) –
- Return type:
Perform sub-class specific modifications of the caps to be processed between upload on input and before download for output.