Commit graph

814 commits

Author SHA1 Message Date
Tim-Philipp Müller
289d8e53e2 Remove autotools build system 2019-10-13 14:15:43 +01:00
Sebastian Dröge
73bd32e791 glfilters: Don't use static variables for storing per-element state 2019-10-03 00:49:09 +00:00
Thibault Saunier
909baa2360 Pass the code through codespell 2019-08-30 13:05:36 +00:00
Matthew Waters
0973e1d07a gl: also build plugin with -fobjc-arc
Fixes macos werror build

../ext/gl/caopengllayersink.m:336:23: error: '__bridge_retained' casts have no effect when not using ARC [-Werror,-Warc-bridge-casts-disallowed-in-nonarc]
    ca_sink->layer = (__bridge_retained gpointer)layer;
                      ^~~~~~~~~~~~~~~~~~
2019-08-30 13:20:37 +10:00
Niels De Graef
0314b482f3 Don't pass default GLib marshallers for signals
By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-08-27 07:31:57 +02:00
Philippe Normand
8d122f21ad gl: New pushsrc-based glbasesrc base class
The gltestsrc element was refactored to inherit from this base class which
handles the GL context. The sub-class only needs to implement the gl_start,
gl_stop and fill_gl_memory vfuncs, along with properly advertizing the GL APIs
it supports through the supported_gl_api GstGLBaseSrc class attribute.
2019-08-20 09:51:05 +01:00
Matthew Waters
df7b189ecb gluploadelement: don't passthrough on same caps
If we do, then multiple disjoint OpenGL contexts will not perform the
necessary download and reupload of data that is necessary to cross between
each OpenGL context sharegroup.
2019-07-24 14:27:30 +10:00
Matthew Waters
f31b83bc86 glvideomixer: perform _get_highest_precision on the GL thread
gst_gl_shader_string_get_highest_precision needs to make an OpenGL call
so execution outside the OpenGL thread and context results in undefined
behaviour.
2019-06-13 09:37:37 +00:00
Matthew Waters
b596bf7cb7 glmosaic: port to opengl3/gles2
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/543
2019-06-13 09:37:37 +00:00
Mathieu Duponchelle
d3e983280b gstglfiltershader: don't try to link to "version" in doc 2019-05-25 17:26:52 +02:00
Matthew Waters
51f2d05ff6 gl/docs: add to new docs system 2019-05-21 01:49:48 +00:00
Thibault Saunier
287897e465 doc: Fix some gtk-doc comments 2019-05-13 11:34:08 -04:00
Thibault Saunier
27ba8d24ec doc: Port to hotdoc 2019-05-13 11:34:08 -04:00
Seungha Yang
e007710b59 gluploadelement: Fix caps leak
gst_event_new_caps() does not take ownership of the caps

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/885
2019-03-29 12:42:45 +09:00
Matthew Waters
6a37bf9bb9 gl: Don't restore the viewport on function exit
Doing so involves retrieving the current viewport from OpenGL which as
with any glGet operation, is expensive.

This means that the various sinks need to reset the viewport on draw.

In the process, fix resizing on cocoa.
2019-03-08 17:49:05 +11:00
Matthew Waters
4e13980e10 gl: fix a few other leaks when not getting to PAUSED 2019-03-07 02:01:09 +11:00
Matthew Waters
86aa568383 glcolorconvert: Ensure we free the internal convert object
If we only ever make it to READY, transform_caps can create an
internal convert object that will never be freed by basetransform's
stop vmethod (PAUSED->READY).
2019-03-06 23:32:18 +11:00
Matthew Waters
675415bf2e gl: try to use highp precision where supported
The use of mediump as a specifier in GLSL shaders will have limited
resolution and when used as texture coordinates may become inaccurate
over texture sizes of 1024.
2019-02-28 17:26:32 +11:00
Nicolas Dufresne
32d8ed7a86 glimagesink: Don't call set_property helper in get_property 2019-02-15 21:47:56 +00:00
Sebastian Dröge
33680a3800 glcolorbalance: Copy caps in transform_internal_caps()
We don't get ownership of the caps that are passed in, and doing so
causes crashes at a later time.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/546
2019-01-24 10:15:31 +02:00
Sebastian Dröge
acc098a736 gl: Only unbind buffers/vertex attrib arrays if we can't directly bind the vertex array to 0
Binding the vertex array to 0 will unbind everything else already.

In the previous order older versions of the Intel GL driver caused
errors to be printed for every single call when disabling the vertex
attrib arrays after binding the vertex array to 0.
2019-01-16 14:09:18 +02:00
Víctor Manuel Jáquez Leal
b1df1000b1 glsinkbin: validate property in internal sink
It might be the case that glgsinkbin would try to set a property to
its internal sink which doesn't exist in it, leading to a glib's
warning. For example, when playsink sets 'force-aspect-ratio' property
and glsinkbin has, as internal sink, appsink, which doesn't handle
that property.

The patch validates the incoming property to forward to internal sink
if it exists in the internal sink and both properties has the same
type.
2019-01-12 15:11:25 +01:00
Andoni Morales Alastruey
a52ad2078a gl: fix build with more recent versions of MinGW 2019-01-07 10:17:25 +00:00
Tim-Philipp Müller
56688ce078 gl: build gl mixer elements, moved from -base 2018-12-28 12:16:25 +01:00
Tim-Philipp Müller
f11571f398 Move GstVideoAggregator, compositor and OpenGL mixers from -bad
Merge branch 'videoaggregator-compositor-glmixers-move'

Fixes #137 and #138.
2018-12-28 12:15:39 +01:00
Nicolas Dufresne
42a031edbe gldeinterlace: Indentation fix 2018-12-05 12:13:07 -05:00
Freyr666
7e92aa5bca opengl: gldeinterlace: remove interlace-mode from srcpad's caps
This fixes output caps format, so the output frames are not interlaced anymore
2018-11-30 02:09:50 +00:00
Philippe Normand
d5f2b5dcfa gltestsrc: Run context query only during decide_allocation
Running the context query in _start and during the NULL->READY state transition
can fail because downstream elements might not be able to answer and thus the
source element would not be able to reuse downstream GLContext and GLDisplay.

This issue happened specifically when trying to use gltestsrc in playbin.
2018-11-30 01:55:34 +00:00
Jordan Petridis
2229d53f60
Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 05:51:53 +02:00
Michael Olbrich
b006ef97fc gluploadelement: try to avoid dropping buffers
Without this, a buffer is dropped if glupload indicates that it is
necessary to reconfigure.
Avoid this by explicitly reconfiguring immediately and uploading the buffer
again.

https://bugzilla.gnome.org/show_bug.cgi?id=783521
2018-10-30 12:25:08 +01:00
Matthew Waters
a164d86804 Revert "Revert "gl: use correct blend functions for unpremultiplied alpha""
This reverts commit 452d90a88c.

This was actually correct. sorry for the noise!
2018-10-05 01:21:01 +10:00
Matthew Waters
89c14c955b glvideomixer: fix the default blend modes for unpremultipled alpha
Alpha in GStreamer is unpremultiplied
2018-10-05 01:18:59 +10:00
Matthew Waters
6e591403a7 glimagesink: make multiview none equivalent to mono
Fixes the internal viewconvert to not scale buffers for output with the
following pipeline:

gltestsrc ! glimagesink

It also fixes overlay composition with a resized output with an OpenGL
upstream:

gltestsrc ! timeoverlay ! glimagesink
2018-10-05 00:48:58 +10:00
Matthew Waters
452d90a88c Revert "gl: use correct blend functions for unpremultiplied alpha"
This reverts commit 779d028f27.
2018-10-05 00:03:09 +10:00
Matthew Waters
779d028f27 gl: use correct blend functions for unpremultiplied alpha
Fallback to the closest but incorrect values we had before if we can't
do this correctly.
2018-10-04 23:43:19 +10:00
Matthew Waters
d9992ba1b7 gl/meson: fix wrong overlay filename 2018-10-04 16:45:34 +10:00
Matthew Waters
2f88e2ae16 glmixerbin: add gloverlaycompositor to each input stream
Flattens the overlay compositions into the stream before the mixer will
mix them.

https://bugzilla.gnome.org/show_bug.cgi?id=759867
2018-10-04 14:32:14 +10:00
Matthew Waters
57f07fcbd4 glimagesink: only update the output info iff there's a valid display_rect
Attempting to use the MAX(1, display_rect) would result in the overlay
composition attempting to draw into 1x1 buffer and calculate some
grossly incorrect sizes.

previously failing case:
gltestsrc ! textoverlay text=GStreamer ! glimagesinkelement
2018-10-04 14:28:35 +10:00
Matthew Waters
f960beaa98 gl: add a new overlay compositor element
Flattens all the overlays from the GstVideoOverlayCompositionMeta into
the video stream.

https://bugzilla.gnome.org/show_bug.cgi?id=759867
2018-10-04 14:28:35 +10:00
Sebastian Dröge
b37c08ecb5 glstereomix: Fix build after deprecating misnamed GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE 2018-10-03 16:00:23 +03:00
Sebastian Dröge
c5b78fdc93 gl: Rename GST_TYPE_GL_STEREO_DOWNMIX GType macro everywhere
The old one still exists but behind GST_DISABLE_DEPRECATED
2018-10-03 14:49:32 +03:00
Sebastian Dröge
b59fcdc789 glmixerbin: "latency" property on aggregator is uint64, not int64
Also update the property description and range with aggregator's values.
2018-09-24 23:26:52 +03:00
Matthew Waters
f757da1160 glvideomixer: fix constant alpha enum value for constant alpha 2018-09-21 19:45:13 +10:00
Sebastian Dröge
05d0c72a59 glvideomixer: Fix typo in property description 2018-09-19 10:28:56 +03:00
Nicolas Dufresne
46f47416fe Revert "gluploadelement: try to avoid dropping buffers"
This reverts commit 75f2532da7.
2018-09-13 20:02:34 -04:00
Michael Olbrich
75f2532da7 gluploadelement: try to avoid dropping buffers
Without this, a buffer is dropped if glupload indicates that it is
necessary to reconfigure.
Avoid this by explicitly reconfiguring immediately and uploading the buffer
again.

https://bugzilla.gnome.org/show_bug.cgi?id=783521
2018-09-10 23:29:10 -04:00
Matthew Waters
43f0b75e55 gl/meson: add build for iOS 2018-08-31 12:23:40 +10:00
Tim-Philipp Müller
c1cf04f67f glcolorscale: fix compiler warning
gstglcolorscale.c(173): warning C4098: 'gst_gl_colorscale_gl_stop': 'void' function returning a value
2018-08-26 11:16:23 +02:00
Tim-Philipp Müller
cec90050b0 meson: gl: find libjpeg via pkg-config
This effectively (but optionally) requires libjpeg-turbo which
ships with a .pc file and is what pretty much everyone these days
uses anyway for libjpeg, so shouldn't be a problem hopefully.

https://bugzilla.gnome.org/show_bug.cgi?id=796947
2018-08-16 11:09:51 +01:00
Tim-Philipp Müller
4ec1ba433d meson: add option for opengl and the misc optional gl plugin deps
Finer control over the opengl integration library dependencies
is already implemented via the gl_api, gl_platform, and gl_winsys
options.

https://bugzilla.gnome.org/show_bug.cgi?id=796947
2018-08-16 10:56:58 +01:00