Commit graph

23 commits

Author SHA1 Message Date
Matthew Waters 85feb6d6f2 glfiltershader: expand the docs slightly
Add an example OpenGL shader
2017-12-09 19:32:24 +00:00
Matthew Waters 18ac98c58b gl: GST_GL_TYPE -> GST_TYPE_GL
Some deprecated symbols are kept for backwards compatibility
2017-12-09 19:32:23 +00:00
Matthew Waters b3d8e09839 glfilter: rewrite subclasses for filter_texture() occuring on GL thread
There's no need for the jump to an extra thread in most cases, especially
when relying solely on a shader to render.  We can use the provided
render_to_target() functions to simplify filter writing.
2017-12-09 19:32:21 +00:00
Matthew Waters 7f10822de4 gl: use GLMemory for accessing textures everywhere
This simplifies and consolidates a lot of duplicated code creating
and modifying textures.
2017-12-09 19:32:21 +00:00
Matthew Waters c7dd43f21a glfilter: rename draw_texture to draw_fullscreen_quad
And remove unused arguments.
2017-12-09 19:32:21 +00:00
Florent Thiéry ce96cce1f2 glshader: fix usage doc
The property location has been changed in favor of vertex/fragment
string properties; the doc had not been updated and was still referring
to the previous property; also, now the #version header has become mandatory

https://bugzilla.gnome.org/show_bug.cgi?id=759902
2017-12-09 19:32:13 +00:00
Vineeth TM 0061913f08 plugins-bad: Fix example pipelines
rename gst-launch --> gst-launch-1.0
replace old elements with new elements(ffmpegcolorspace -> videoconvert, ffenc_** -> avenc_**)
fix caps in examples

https://bugzilla.gnome.org/show_bug.cgi?id=759432
2017-12-09 19:32:12 +00:00
Reynaldo H. Verdejo Pinochet 68e668168d Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
2017-12-09 19:32:11 +00:00
Matthew Waters 89122224eb glshaderelement: free the vertex and fragment strings on finalize
Fixes a memory leak when using the vertex/fragment properties.
2017-12-09 19:32:09 +00:00
Matthew Waters 3f8edbee03 glshaderelement: remove unneeded reference to <gst/gl/gstglshadervariables.h> 2017-12-09 19:32:09 +00:00
Matthew Waters c766ca0381 glshaderelement: implement setting arbitrary uniforms
Currently float and int are supported by default. vec2, vec3, vec4
and mat4 are supported if graphene is used.  Of course if one wants
to set custom uniforms they can also be set using the create-shader
signal.
2017-12-09 19:32:09 +00:00
Matthew Waters 3a8fc708ee glshaderelement: implement on-demand create-shader signalling
One may not have an GstGLContext available or current in the thread where one
would need to update the shader.  Support this by signalling create-shader
whenever the one-shot 'update-shader' is set to TRUE.
2017-12-09 19:32:09 +00:00
Matthew Waters ad4109dbec glshader: port element to GstGLSLStage
- Provide a shader property to set the full shader pipeline
- Provide vertex and fragment properties for just providing simple
  shader sources.
2017-12-09 19:32:09 +00:00
Matthew Waters 1e9f7b6303 gl: consolidate internal_rgba_format into glmemory
Expose some useful value format conversion functions available in
GstGLMemory.
2017-12-09 19:32:03 +00:00
Julien Isorce fce0e0ba3c gl: add and use gst_gl_internal_format_rgba
Previously when compiling GstGL with both GL and GLES2,
GL_RGBA8 was picked from GL/gl.h. But a clash may happen at
runtime when one is selecting GLES2.

gst_gl_internal_format_rgba allows to check at runtime
if it should use GL_RGBA or GL_RGBA8.
2017-12-09 19:32:02 +00:00
Sebastian Dröge ee6bfe0127 glfilter: De-camelcase onInitFBO() vfunc 2017-12-09 19:31:59 +00:00
Sebastian Dröge 3613ecfd0a glfilter: Remove onStart/onStop vfuncs, and unused onReset()
onStart/onStop are just duplicates of the basetransform ones, onReset
was never called but was used everywhere when stop should've been used.
2017-12-09 19:31:59 +00:00
Matthew Waters 92f0aa9bd8 gl: get the context from basemixer/basefilter 2017-12-09 19:31:57 +00:00
Matthew Waters 4bd62ebb03 gldisplay: implement runtime GL api filtering
Needed so that the pipeline/application can limit the choice of GL api
to what it supports
2017-12-09 19:31:51 +00:00
Matthew Waters 9dfd234fec glfiltershader: support gl3 2017-12-09 19:31:51 +00:00
Matthew Waters 025d6a87ba glshader: enable glshader on GLES2 2017-12-09 19:31:43 +00:00
Matthew Waters 918ff5b25f glfiltershader: port to GLES2
Provide a time variable
2017-12-09 19:31:43 +00:00
Matthew Waters a884d6feee move gl elements to ext subdirectory 2017-12-09 19:31:34 +00:00