GstGL.GLFilter

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.Element Gst.Element GstBase.BaseTransform GstBase.BaseTransform Gst.Element->GstBase.BaseTransform Gst.Object->Gst.Element GstGL.GLBaseFilter GstGL.GLBaseFilter GstBase.BaseTransform->GstGL.GLBaseFilter GstGL.GLFilter GstGL.GLFilter GstGL.GLBaseFilter->GstGL.GLFilter

Subclasses:

None

Methods

Inherited:

GstGL.GLBaseFilter (2), GstBase.BaseTransform (15), Gst.Element (82), Gst.Object (27), GObject.Object (37)

Structs:

Gst.ElementClass (10), GObject.ObjectClass (5)

class

add_rgba_pad_templates (klass)

draw_fullscreen_quad ()

filter_texture (input, output)

render_to_target (input, output, func, *data)

render_to_target_with_shader (input, output, shader)

Virtual Methods

Inherited:

GstGL.GLBaseFilter (3), GstBase.BaseTransform (22), Gst.Element (16), Gst.Object (1), GObject.Object (7)

do_filter (inbuf, outbuf)

do_filter_texture (input, output)

do_init_fbo ()

do_set_caps (incaps, outcaps)

do_transform_internal_caps (direction, caps, filter_caps)

Properties

Inherited:

GstGL.GLBaseFilter (1), GstBase.BaseTransform (1), Gst.Object (2)

Signals

Inherited:

Gst.Element (3), Gst.Object (1), GObject.Object (1)

Fields

Inherited:

Gst.Element (3), Gst.Object (1), GObject.Object (1)

Name

Type

Access

Description

default_shader

GstGL.GLShader

r

draw_attr_position_loc

int

r

draw_attr_texture_loc

int

r

fbo

GstGL.GLFramebuffer

r

GstGL.GLFramebuffer object used for transformations (only for subclass usage)

gl_result

bool

r

in_info

GstVideo.VideoInfo

r

the video info for input buffers

in_texture_target

GstGL.GLTextureTarget

r

The texture target of the input buffers (usually 2D)

inbuf

Gst.Buffer

r

out_caps

Gst.Caps

r

the output Gst.Caps

out_info

GstVideo.VideoInfo

r

the video info for output buffers

out_texture_target

GstGL.GLTextureTarget

r

The texture target of the output buffers (usually 2D)

outbuf

Gst.Buffer

r

parent

GstGL.GLBaseFilter

r

valid_attributes

bool

r

vao

int

r

vbo_indices

int

r

vertex_buffer

int

r

Class Details

class GstGL.GLFilter(**kwargs)
Bases:

GstGL.GLBaseFilter

Abstract:

No

Structure:

GstGL.GLFilterClass

GstGL.GLFilter helps to implement simple OpenGL filter elements taking a single input and producing a single output with a GstGL.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:
Returns:

whether the transformation succeeded

Return type:

bool

Calls filter_texture vfunc with correctly mapped GstGL.GLMemorys

New in version 1.4.

render_to_target(input, output, func, *data)[source]
Parameters:
Returns:

the return value of func

Return type:

bool

Transforms input into output using func on through FBO.

New in version 1.10.

render_to_target_with_shader(input, output, shader)[source]
Parameters:

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:
Return type:

bool

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:
Returns:

whether the transformation succeeded

Return type:

bool

Calls filter_texture vfunc with correctly mapped GstGL.GLMemorys

New in version 1.4.

do_init_fbo() virtual
Return type:

bool

perform initialization when the Framebuffer object is created

do_set_caps(incaps, outcaps) virtual
Parameters:
Return type:

bool

mirror from GstBase.BaseTransform

do_transform_internal_caps(direction, caps, filter_caps) virtual
Parameters:
Return type:

Gst.Caps

Perform sub-class specific modifications of the caps to be processed between upload on input and before download for output.