Commit graph

462 commits

Author SHA1 Message Date
Haihua Hu
b43af664bc glimagesink: need to clean window_id when state change form READY to NULL
When application change pipeline state NULL->READY and then READY->NULL,
glimagesink will not clear glsink->window_id. After that, when application
change state NULL->READY, the new_window_id is equal to window_id, glimagesink
will not set window handle. It will use the internal window but not the window
create by application.

https://bugzilla.gnome.org/show_bug.cgi?id=765241
2017-12-09 19:32:19 +00:00
Heinrich Fink
981beba52d gl/caopengllayersink: Actually unset caps_change flag after resize
Otherwise, the sink would execute "on_resize" for each frame.

https://bugzilla.gnome.org/show_bug.cgi?id=765194
2017-12-09 19:32:19 +00:00
Luis de Bethencourt
73110e6985 gltestsrc: don't dereference null pointer
funcs can be NULL, it is one of the two conditions of the OR statement
above, so confirm it isn't before dereferencing with funcs->free.

CID 1358388
2017-12-09 19:32:19 +00:00
Matthew Waters
458c3067e4 glbasemixer: chain up to the parent implementation 2017-12-09 19:32:19 +00:00
Matthew Waters
7f8e09523f videoaggregator: repect the result of find_best_format in the default update_caps
We weren't using the result of find_best_format at all.

Also, move the find_best_format usage to the default update_caps() to make
sure that it is also overridable.

https://bugzilla.gnome.org/show_bug.cgi?id=764363
2017-12-09 19:32:19 +00:00
Matthew Waters
aae649dc75 glvideomixer: add support for the affine transformation meta 2017-12-09 19:32:18 +00:00
Matthew Waters
9829245b2b glimagesink: support the affine transformation meta for any texture target 2017-12-09 19:32:18 +00:00
Matthew Waters
b9f77bf92b glmixer: set the current texture to 0 before mapping
If we fail mapping, we don't want to use undefined video data in the subclass.
2017-12-09 19:32:18 +00:00
Matthew Waters
366d7ac90b glmixerbin: proxy the start-time-* properties from aggregator 2017-12-09 19:32:18 +00:00
Matthew Waters
e5c43ab7fb gl/build: add missing '\' at the end of the line in MakeFile.am
Otherwise the following elements aren't included in the correct variable.

Fixes error in 'make distcheck' failing to find gstgltestsrc.h
2017-12-09 19:32:18 +00:00
Matthew Waters
79935c7ee3 gldifferencematte: port to gl3/gles2 2017-12-09 19:32:18 +00:00
Matthew Waters
cdcd234613 gltestsrc: port to gles2/gl3
This makes gltestsrc work everywhere \o/

- workaround RPi returning invalid values for positive coords in the
  checker shader
- reduce the number of iterations in the mandelbrot shader for gles2

https://bugzilla.gnome.org/show_bug.cgi?id=751540
2017-12-09 19:32:18 +00:00
Matthew Waters
55eaa869ea gltestsrc: port smpte pattern to shaders
Loosely based on patch by
Lubosz Sarnecki <lubosz.sarnecki@collabora.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=751540
2017-12-09 19:32:18 +00:00
Matthew Waters
b7ab7aa349 gltestsrc: implement the circular method
https://bugzilla.gnome.org/show_bug.cgi?id=759801
2017-12-09 19:32:18 +00:00
Matthew Waters
309005b12d gltestsrc: add a generic src framework
Any unsupported pattern (circular) results in an error
2017-12-09 19:32:18 +00:00
Matthew Waters
5a68528419 glsterosplit: remove internal glupload/glcolorconvert
They are provided separately as elements and no other element contains the
internal references to glupload/glcolorconvert.
2017-12-09 19:32:18 +00:00
Vineeth TM
e92bbb2a83 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2017-12-09 19:32:18 +00:00
Matthew Waters
c7da2adf7f glstereo{mix,split}: allow running on GLES 2/3
It's mostly supported for GLES 2.x, fully supported on GLES 3.x
2017-12-09 19:32:17 +00:00
Matthew Waters
d1b3b63c1c gleffects; give each effect a unique long name and description
Gives applications that scrape the factory details more detailed and unique
details on the exact element.

https://bugzilla.gnome.org/show_bug.cgi?id=760566
2017-12-09 19:32:17 +00:00
Matthew Waters
c1d49430ec glfilterapp: update for the use of shaders
Fixes black output when placed in pipelines (using the default drawing).

https://bugzilla.gnome.org/show_bug.cgi?id=763365
2017-12-09 19:32:17 +00:00
Vineeth TM
cd696a0b79 glimagesink: Fix window memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=763356
2017-12-09 19:32:17 +00:00
Matthew Waters
7b2ab7279f glvideomixer: signal continuation in reset
We want to iterate over all the pads, not just the first one.  Fix by returning
TRUE in the GstAggregatorPadForeachFunc.

Removes a GST_IS_GL_CONTEXT() assertion on shutdown with >2 inputs
using gst-launch.
2017-12-09 19:32:17 +00:00
Wang Xin-yu (王昕宇)
35765bec0e glmixer: iterator didn't advance in continue statement
Leading to a deadlock.

https://bugzilla.gnome.org/show_bug.cgi?id=760873
2017-12-09 19:32:17 +00:00
Matthew Waters
7e108f4763 gl: fix the build
2d287812 was incomplete
2017-12-09 19:32:17 +00:00
Matthew Waters
e71e492413 gl: error out if the configured GL API is unsupported by our element
https://bugzilla.gnome.org/show_bug.cgi?id=759801
2017-12-09 19:32:17 +00:00
Matthew Waters
9ac6c546de glimagesink: remove unsed reconfigure variable 2017-12-09 19:32:16 +00:00
Matthew Waters
5694cdd8ca glimagesink: don't push a reconfigure event from the GL thread
Doing so may cause deadlocks when other elements attempt destroy or created
GL resources.

https://bugzilla.gnome.org/show_bug.cgi?id=760559
2017-12-09 19:32:16 +00:00
Wang Xin-yu (王昕宇)
176149039b glvideomixer: don't leak pad's vertex buffer on release_pad
https://bugzilla.gnome.org/show_bug.cgi?id=760873
2017-12-09 19:32:16 +00:00
Matthew Waters
c1376c91ef glmixer: Remove usage of GstGLMixerFrameData
Subclasses can just iterate over the list of pads themselves

https://bugzilla.gnome.org/show_bug.cgi?id=760873
2017-12-09 19:32:16 +00:00
Matthew Waters
03fdd2fc82 glmixer: don't hold the object lock while calling into GL
Doing so can deadlock between the GL thread and the object lock e.g.
when performing reconfigure events in glimagesink on a resize event.

https://bugzilla.gnome.org/show_bug.cgi?id=760559
2017-12-09 19:32:16 +00:00
Alessandro Decina
ecdb9d6550 glvideoflip: don't ignore method changes when caps aren't set (yet) 2017-12-09 19:32:16 +00:00
Matthew Waters
d8c710d143 gleffects: identity: add the shader to the hash table
So that we don't recreate it every frame and leak memory.

https://bugzilla.gnome.org/show_bug.cgi?id=761578
2017-12-09 19:32:16 +00:00
Matthew Waters
afd3624b28 gltransformation: reconfigure the src when changing to/from passthrough
Otherwise it's very possible that any GL resources have not been created yet.
2017-12-09 19:32:16 +00:00
Matthew Waters
612ee0089f glvideoflip: correctly update the output caps on method changes
When changing methods we may need different output caps.
2017-12-09 19:32:16 +00:00
Alessandro Decina
2f8f4a5b90 gldownload: allow video/x-raw as input
...and just passthrough. This is useful for pipelines where downstream must be
non-GL but upstream can optionally be GL.
2017-12-09 19:32:16 +00:00
Wang Xin-yu (王昕宇)
46cf23b0a1 glvideomixer: fix checker vbo leak
https://bugzilla.gnome.org/show_bug.cgi?id=760925
2017-12-09 19:32:15 +00:00
Haihua Hu
3fb60ac10c gleffects: fix gleffects fisheye shader compile error
On some embedded systems, sqrt() is not supported in the shader,
use the actual value of sqrt(2) instead.

Signed-off-by: Haihua Hu <b55597@freescale.com>
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=761271
2017-12-09 19:32:15 +00:00
Matthew Waters
931090bf18 glvideomixer: par may not exist in the caps
Fixes a critical in the gst-validate tests:

gst_structure_fixate_field_nearest_fraction: assertion 'gst_structure_has_field
(structure, field_name)
2017-12-09 19:32:15 +00:00
Matthew Waters
e03e983e90 videoaggregator: don't do caps processing that is not overridable
Allows the subclass to completely override the chosen src caps.

This is needed as videoaggregator generally has no idea exactly
what operation is being performed.

- Adds a fixate_caps vfunc for fixation
- Merges gst_video_aggregator_update_converters() into
  gst_videoaggregator_update_src_caps() as we need some of its info
  for proper caps handling.
- Pass the downstream caps to the update_caps vfunc

https://bugzilla.gnome.org/show_bug.cgi?id=756207
2017-12-09 19:32:15 +00:00
Matthew Waters
f8c6be86c2 glcolorbalance: return HARDWARE from get_balance_type 2017-12-09 19:32:15 +00:00
Matthew Waters
81f0d05d37 glsinkbin: add glcolorbalance element
This makes playbin not plug videobalance as glcolorbalance already exists and
implements the GstColorBalance interface.
2017-12-09 19:32:15 +00:00
Matthew Waters
2cef90184e gl: move control binding proxy implementation from glvideomixer
Other elements may need to use it's functionality
2017-12-09 19:32:15 +00:00
Matthew Waters
e3f53deb32 glcolorbalance: create the shader if it doesn't exist in the render callback
Changing the properties may result in glcolorbalance moving from passthrough to
non-passthrough and we weren't creating the shader in that case.
2017-12-09 19:32:15 +00:00
Matthew Waters
5ecc3413fd glvideoflip: incorporate the aspect ratio into the scale_x calculations
1. Otherwise rotating the video will clip and show black bars due to
   gltransformation's implementation.
2. The other option of make gltransformation aspect-agnostic produces
   incorrect output with perspective transformations.
2017-12-09 19:32:15 +00:00
Tim-Philipp Müller
e905ace0b0 gl: fix compiler warnings with gcc-6
In file included from effects/gstgleffectrgbtocurve.c:25:0:
effects/gstgleffectscurves.h:174:32: error: 'xray_curve' defined but not used
 static const GstGLEffectsCurve xray_curve = {
...
2017-12-09 19:32:15 +00:00
Matthew Waters
a15305ea02 gl: add a videoflip element
Behaves exactly the same as the non-GL videoflip element
2017-12-09 19:32:15 +00:00
Matthew Waters
0e928db89e gltransformation: always build a valid mvp matrix
The default case is to build an identity matrix.
2017-12-09 19:32:14 +00:00
Matthew Waters
e8544db8cf gltransformation: support negative scales
A scale of -1.0 means to flip the video.
2017-12-09 19:32:14 +00:00
Matthew Waters
d05bd79042 gltransformation: implement passthrough handling 2017-12-09 19:32:14 +00:00
Matthew Waters
1fe2996b01 gltransformation: implement navigation events
Reverses the transformation applied through the properties and forwards the
event.

The process for finding the coordinates on the video are as follows:
1. Convert the given pointer_x and pointer_y to model space at the near and far planes
2. Get the equation of the video plane
3. Find where the ray in 1 intersects the plane
4. Profit!
2017-12-09 19:32:14 +00:00