gstreamer/ext/gl
Lubosz Sarnecki 6a58c684a7 gltransformation: implement pivot point for rotation and scale
https://bugzilla.gnome.org/show_bug.cgi?id=744763

Add a pivot vector for setting the origin of rotations and scales.

With the pivot point the rotation and scale operations can have
different origins. This adds the ability to rotate around different points.
Currently the default (0, 0) pivot point is possible,
a rotation around the center, and zooming into and out of the center.

With an pivot point this is optional.
I defined the following image coordinates for the pivot point:

	 (-1,1) ------------------------- (1,1)
		|			|
		|			|
		|			|
		|	  (0,0)		|
		|			|
		|			|
		|			|
	(-1,-1) ------------------------- (1,-1)

Example:

	Rotate the video at the bottom left corner

	gst-launch-1.0 videotestsrc \
			! gltransformation \
		 		scale-x=0.5 \
				scale-y=0.5 \
				rotation-z=25.0 \
				pivot-x=-1.0 \
				pivot-y=-1.0 \
			! glimagesink

The pivot-z option defines the pivot point in 3D space.
This only affects rotation, since we have no Z data to scale.
With this option a video can be rotated around a point in 3D space.

Example:

	Rotate around point behind the video:

    	gst-launch-1.0 videotestsrc \
			! gltransformation \
				rotation-x=10.0 \
				pivot-z=-4.0 \
			! glimagesink
2017-12-09 19:32:07 +00:00
..
effects gleffects_laplacian: fix shader compilation in gl3/gles2 2017-12-09 19:32:02 +00:00
BUGS move gl elements to ext subdirectory 2017-12-09 19:31:34 +00:00
caopengllayersink.h caopengllayersink: correctly use the sync meta across multiple contexts 2017-12-09 19:32:01 +00:00
caopengllayersink.m caopengllayersink: remove unused label context_creation_error 2017-12-09 19:32:06 +00:00
gltestsrc.c gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls 2017-12-09 19:32:01 +00:00
gltestsrc.h gltestsrc: implement snow pattern with GLSL. 2017-12-09 19:31:46 +00:00
gstglbasemixer.c gl: use gst_gl_display_create_context in more elements. 2017-12-09 19:32:06 +00:00
gstglbasemixer.h gl: add a new glbasemixer class below glmixer 2017-12-09 19:31:56 +00:00
gstglbumper.c glfilter: De-camelcase onInitFBO() vfunc 2017-12-09 19:31:59 +00:00
gstglbumper.h move gl elements to ext subdirectory 2017-12-09 19:31:34 +00:00
gstglcolorconvertelement.c glimagesinkbin: Add GstVideoOverlayCompositionMeta caps features 2017-12-09 19:32:06 +00:00
gstglcolorconvertelement.h Revert "gl: readd glupload/download onto element pads" 2017-12-09 19:32:00 +00:00
gstglcolorscale.c glfilter: De-camelcase onInitFBO() vfunc 2017-12-09 19:31:59 +00:00
gstglcolorscale.h glcolorscale: support gl3 2017-12-09 19:31:51 +00:00
gstgldeinterlace.c gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls 2017-12-09 19:32:01 +00:00
gstgldeinterlace.h move gl elements to ext subdirectory 2017-12-09 19:31:34 +00:00
gstgldifferencematte.c gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls 2017-12-09 19:32:01 +00:00
gstgldifferencematte.h gl: silence all the compiler warnings 2017-12-09 19:31:34 +00:00
gstgldownloadelement.c download: only start a download transfer for sysmem caps features 2017-12-09 19:32:05 +00:00
gstgldownloadelement.h gl: add new gldownloadelement 2017-12-09 19:31:57 +00:00
gstgleffects.c gl: consolidate internal_rgba_format into glmemory 2017-12-09 19:32:03 +00:00
gstgleffects.h gleffects: Create element for each effect 2017-12-09 19:31:59 +00:00
gstglfilterapp.c gl: get the context from basemixer/basefilter 2017-12-09 19:31:57 +00:00
gstglfilterapp.h glfilterapp: actually emit the client-draw signal 2017-12-09 19:31:43 +00:00
gstglfilterbin.c gstglfilterbin: remove unused variable 2017-12-09 19:32:07 +00:00
gstglfilterbin.h gl: new element glfilterbin 2017-12-09 19:31:57 +00:00
gstglfiltercube.c gl: element buffers are part of vao state 2017-12-09 19:32:01 +00:00
gstglfiltercube.h gl: element buffers are part of vao state 2017-12-09 19:32:01 +00:00
gstglfilterglass.c gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls 2017-12-09 19:32:01 +00:00
gstglfilterglass.h gl: silence all the compiler warnings 2017-12-09 19:31:34 +00:00
gstglfilterreflectedscreen.c gl: get the context from basemixer/basefilter 2017-12-09 19:31:57 +00:00
gstglfilterreflectedscreen.h gl: silence all the compiler warnings 2017-12-09 19:31:34 +00:00
gstglfiltershader.c gl: consolidate internal_rgba_format into glmemory 2017-12-09 19:32:03 +00:00
gstglfiltershader.h glfiltershader: port to GLES2 2017-12-09 19:31:43 +00:00
gstglimagesink.c glimagesink: fix allocation meta structure leak 2017-12-09 19:32:06 +00:00
gstglimagesink.h glimagesink: Upload and draw overlays with GstGLOverlayCompositor 2017-12-09 19:32:06 +00:00
gstglmixer.c gl: Don't leak pool if set_config failed 2017-12-09 19:32:05 +00:00
gstglmixer.h Revert "gl: readd glupload/download onto element pads" 2017-12-09 19:32:00 +00:00
gstglmixerbin.c glvideomixer, glmixer: Add description and klass 2017-12-09 19:32:05 +00:00
gstglmixerbin.h gl: new glmixerbin element 2017-12-09 19:31:57 +00:00
gstglmosaic.c gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls 2017-12-09 19:32:01 +00:00
gstglmosaic.h gl: Move GstGLMixer to the plugin for now 2017-12-09 19:31:44 +00:00
gstgloverlay.c gloverlay: fix a leak 2017-12-09 19:32:02 +00:00
gstgloverlay.h gloverlay: remove unused type_file field 2017-12-09 19:32:02 +00:00
gstglsinkbin.c gl: move basesink properties from glimagesinkbin to glsinkbin 2017-12-09 19:32:04 +00:00
gstglsinkbin.h gl: new glsinkbin element 2017-12-09 19:31:57 +00:00
gstglsrcbin.c gl: Use gst_object_ref_sink() for gl{filter,mixer,src}bin too 2017-12-09 19:32:04 +00:00
gstglsrcbin.h gl: new glsrcbin element 2017-12-09 19:31:57 +00:00
gstglstereomix.c glstereomix: remove redundant initialization 2017-12-09 19:32:07 +00:00
gstglstereomix.h gl: Add glviewconvert, glstereomix and glstereosplit elements 2017-12-09 19:32:04 +00:00
gstglstereosplit.c glstereosplit: use gst_gl_display_create_context 2017-12-09 19:32:06 +00:00
gstglstereosplit.h gl: Add glviewconvert, glstereomix and glstereosplit elements 2017-12-09 19:32:04 +00:00
gstgltestsrc.c gl: use gst_gl_display_create_context in more elements. 2017-12-09 19:32:06 +00:00
gstgltestsrc.h gltestsrc: remove usage of gldownload library object 2017-12-09 19:31:57 +00:00
gstgltransformation.c gltransformation: implement pivot point for rotation and scale 2017-12-09 19:32:07 +00:00
gstgltransformation.h gltransformation: implement pivot point for rotation and scale 2017-12-09 19:32:07 +00:00
gstgluploadelement.c glupload: Forward composition meta even without params 2017-12-09 19:32:06 +00:00
gstgluploadelement.h gl: add a new glupload element based on the glupload library object 2017-12-09 19:31:56 +00:00
gstglvideomixer.c glvideomixer: swap control binding proxy 2017-12-09 19:32:07 +00:00
gstglvideomixer.h gl: element buffers are part of vao state 2017-12-09 19:32:01 +00:00
gstglviewconvert.c gl: add missing break 2017-12-09 19:32:05 +00:00
gstglviewconvert.h gl: Add glviewconvert, glstereomix and glstereosplit elements 2017-12-09 19:32:04 +00:00
gstopengl.c gl: consolidate egl header includes to egl-only headers 2017-12-09 19:32:05 +00:00
Makefile.am gl: Add glviewconvert, glstereomix and glstereosplit elements 2017-12-09 19:32:04 +00:00