Commit graph

3542 commits

Author SHA1 Message Date
Matthew Waters
f757da1160 glvideomixer: fix constant alpha enum value for constant alpha 2018-09-21 19:45:13 +10:00
Sebastian Dröge
55ec47f555 vorbisdec: Initialize decoder directly once we have the 3 headers
... instead of waiting for the first non-header buffer.

Also drop non-identification headers arriving after initialization or
before the identification header. We don't do anything with them and
they would just accumulate.

https://bugzilla.gnome.org/show_bug.cgi?id=796980
2018-09-21 11:48:40 +03: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
Marcos Kintschner
e05e8117e7 opusenc: fix segmentation fault at x86 version
The argument 0x0 is interpreted by the x86 compiler as a 32-bit int, but
it is consumed as a 64-bit uint causing a segmentation fault. We need to
explicit cast it to guint64 in order for the va_list to be built correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=797092
2018-09-13 20:00:02 -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
Nirbheek Chauhan
41b7a65b81 meson: Add an option for the 'Tremor' Vorbis implementation
It makes sense to control it explicitly to allow us to enable it on
platforms that don't have hardware floating-point, and to allow people
to enable the 'vorbis' plugin without having to also provide the
Tremor dependency which is useless on most devices.
2018-09-10 22:22:16 +05:30
Matthew Waters
43f0b75e55 gl/meson: add build for iOS 2018-08-31 12:23:40 +10:00
Sebastian Dröge
0619168e2a vorbisdec: Always handle in-band header packets once the first non-header packet arrives
And clean up any old pending headers if we receive a new identification
header, or if we receive a new set of headers via caps.

Otherwise it might happen that we receive one or more header but not
all, and then afterwards all headers again, and libvorbis does not like
getting headers passed multiple times and would error out.

It only makes sense to pass the very latest headers to the decoder at
the time we can actually make use of them.

https://bugzilla.gnome.org/show_bug.cgi?id=796980
2018-08-28 17:47:09 +03:00
Sebastian Dröge
2ace14f613 pango: Create one context per instance and remove class mutex
PangoCairo is thread-safe as long as the context and fontmap are not
shared between threads. Previously each subclass had its own context and
a class mutex for this reason, but apart from hurting performance this
was also not completely safe yet: the same fontmap might've been used by
different classes from different threads as the thread-default fontmap
(at time of class initialization) was used.
2018-08-27 15:41:31 +03:00
Sebastian Dröge
6024b8e46b oggdemux: Ensure that no pad values are set when setting up the mapper
Otherwise we might have arbitrary values set that are used later and can
cause undefined behaviour, as found by ossfuzz.
2018-08-27 11:07:47 +03: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
e89aa2af6a meson: remove obsolete FIXME 2018-08-16 11:35:33 +01: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
Alessandro Decina
06b8792a5f gl/meson: OSX support (CGL and Cocoa)
[Matthew Waters]: minor additions such as -fobjc-arc and relying on
dependency rather than cc.find_library()
2018-08-03 12:53:10 +10:00
Nicolas Dufresne
d2aff7b184 opusdec: Add property to control phase inversion
When enabled, phase-inversion slightly increase stereo quality, but
produce a stream that when downmixed to mono will present important
audio distortion. This patch disables this feature by default and
introduce a property that let user enable it if desired.

https://bugzilla.gnome.org/show_bug.cgi?id=791771
2018-08-01 09:45:07 -04:00
Nirbheek Chauhan
28caf92587 meson: Fix detection of cdparanoia library
Without this the pkg-config file is required when the plugin is enabled.
2018-07-31 13:30:46 +05:30
Nirbheek Chauhan
eadedc68f8 meson: Add feature options for all plugins
GL dependency detection is still automagic.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 18:42:11 +05:30
Sebastian Dröge
c2a7c93840 gl: Also don't leak floating references to elements set via properties
Fixup for 58ac815eae. Floating references
are such a mess.
2018-07-25 15:03:59 +03:00
Sebastian Dröge
58ac815eae gl: Don't steal callers reference when setting non-floating elements via properties
Introduced by fbef9220d3. The code there
is only correct for elements we get from signals.
2018-07-25 14:35:40 +03:00
Matthew Waters
5518eb26fb gluploadelement: also set the context in decide_allocation
If downstream doesn't perform allocation queries, the context would
never be set and criticals would occur.
2018-07-12 13:15:48 +10:00
Matthew Waters
3a3577f826 glvideomixer: fix default placement when different sized output
i.e. when expanding from 320x240 to 800x600, the resulting frame should
appear in the top left corner, not the middle.

https://bugzilla.gnome.org/show_bug.cgi?id=794401
2018-07-12 12:48:39 +10:00
Daniel Klamt
32c7249c5e glvideomixer: Moves the objects to zero on z axis
Matches the output from a similar glimagesink pipeline when
rotating from an upstream gltransformation passed through
the affine transformation meta with xpos/ypos being set.

https://bugzilla.gnome.org/show_bug.cgi?id=794401
2018-07-12 12:46:40 +10:00
Nicolas Dufresne
443b321ca1 glvideomixer: Fix coding style 2018-07-10 09:45:31 -04:00
Nicolas Dufresne
5958b0bd32 glvideomixer: Add missing string.h include 2018-07-10 09:42:47 -04:00
Daniel Klamt
b1bd804cb3 Moved the pad offset and aspect ratio to a matrix so it will be added in view space and not in world space
https://bugzilla.gnome.org/show_bug.cgi?id=794401
2018-07-10 20:31:26 +10:00
Matthew Waters
16cba63d43 gl/utils: fixup matrix math again for column major
e4bf9ed8f0 was not quite right and changed
the wrong thing. Intead we needed to change the multiplication order
and should have kept the previous to/from matrices as is done in this
patch.
2018-07-10 20:13:22 +10:00
Tim-Philipp Müller
69534fe9a0 gl: Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 01:37:08 +02:00
Sebastian Dröge
3dd95b1311 oggdemux: Make sure that events are writable before changing their seqnum 2018-06-18 13:28:15 +03:00
Matthew Waters
6f04c3ac87 glalpha: fix compilation with msvc
It doesn't define M_PI
2018-06-07 14:23:55 +10:00
Matthew Waters
4bd93dc4d8 gldownloadelement: fix build with msvc
msvc doesn't like #ifdef inside macro expansion
2018-06-06 23:36:08 +10:00
Matthew Waters
e4bf9ed8f0 gl/utils: Fix NDC conversion matrices for column-majorness
The matrices were converting the wrong values with non-diagonal-only matrices.
e.g. a typical yflip matrix in [-1,1]^3 such as
 1  0  0  0
 0 -1  0  0
 0  0  1  0
 0  0  0  1

Would have actually required a matrix like this in [0,1]^3
 1  0  0  0
 0 -1  0  0
 0  0  1  0
 0 -2  0  1

Which is
1. not consistent with our multiplication convention and would require
   transposing matrices or changing our multiplication order (from what is
   generally used on opengl matrix guides/tutorials).
2. Produces incorrect values when input with actual vertices accounting for
   the difference in multiplication order.  e.g. some vertices multiplied by
   the yflip matrix using vertex * yflip(== transpose(yflip) * vertex):

     vertex:       -> result:           expected:
     vec4(1,0,1,1) -> vec4(1,-2,1,1)    vec4(1,1,1,1)
     vec4(1,1,1,1) -> vec4(1,-3,1,1)    vec4(1,0,1,1)

With the updated values, we now get the expected values.

Includes a test for this behaviour and the example above
2018-06-06 23:36:08 +10:00
Edward Hervey
5c118e5924 oggdemux: Properly relay seqnum of segments
Not all cases were handled regarding properly propagating the
seqnum of SEGMENT events on all downstream segment-related events
2018-06-05 17:24:05 +02:00
Edward Hervey
63e8900c47 ogg: Avoid undefined granule shift
A granule is a 64bit signed integer, shifting by 63 or more is
undefined and most likely an indication that the stream is
corrupted or invalid.

Detected by oss-fuzz
2018-05-30 10:57:14 +02:00
Jan Schmidt
567bbe3c07 glcolorbalance: Support OES textures for input/passthrough
glcolorbalance is in the default GL path inside glimagesink,
so has been causing an possibly-unnecessary extra texture copy
on Android for a while now. If we're just doing passthrough,
we can support OES directly. If not, they'll be transformed
to 2D textures and colourbalanced.
2018-05-07 01:16:27 +10:00
Sebastian Dröge
dbb21615c4 videoaggregator: Rename get_output_buffer() to create_output_buffer()
For consistency with GstAudioAggregator.
2018-05-06 16:05:28 +02:00
Sebastian Dröge
33a8e28207 videoaggregator: Switch to a GstVideoAggregatorConvertPad subclass
This moves all the conversion related code to a single place, allows
less code-duplication inside compositor and makes the glmixer code less
awkward. It's also the same pattern as used by GstAudioAggregator.
2018-05-06 15:22:51 +02:00
Sebastian Dröge
d37e778692 glmixer: Include string.h for memset()
gstglmixer.c:143:5: error: implicit declaration of function ‘memset’ [-Werror=implicit-function-declaration]
     memset (prepared_frame, 0, sizeof (GstVideoFrame));
     ^~~~~~
gstglmixer.c:143:5: error: incompatible implicit declaration of built-in function ‘memset’ [-Werror]
2018-05-05 17:48:30 +02:00
Sebastian Dröge
1c8110ab17 videoaggregator: Move aggregated_frame and the pad buffer into the private struct
The aggregated_frame is now called prepared_frame and passed to the
prepare_frame and cleanup_frame virtual methods directly. For the
currently queued buffer there is a method on the video aggregator pad
now.
2018-05-05 16:32:19 +02:00
Matthew Waters
c150928756 glbasefilter: expose finding the local GL context
And use it to attempt to find the GL context sooner for upload and color
conversion caps transformations.
2018-05-05 21:24:25 +10:00
Matthew Waters
af5b0ee7d0 gl: add glalpha element that is similar to the alpha element
It performs similarly to the existing alpha element however performs
calculations in floating point rather than with small (guint8) integers
so some differences are to be expected.

https://bugzilla.gnome.org/show_bug.cgi?id=794070
2018-05-05 21:24:25 +10:00
Sebastian Dröge
404b802846 glmixer: Move frame/texture mapping/unmapping into prepare/clean_frame
Previously we assumed that the texture ID is going to be valid even
after unmapping the frame, as it was immediately unmapped before even
being used. Now we only unmap once we're done with the texture.
2018-05-05 12:17:34 +02:00
Sebastian Dröge
51c359dda6 videoaggregator: Rename ignore-eos pad property to repeat-after-eos
What it does is to repeat the last frame forever after EOS, it does not
literally ignore EOS.
2018-05-04 16:46:00 +02:00
Sebastian Dröge
a240fb7997 videoaggregator: Move GstChildProxy implementations into leaf classes
Not every subclass will want to expose the pads via the interface.

https://bugzilla.gnome.org/show_bug.cgi?id=739011
2018-05-04 16:13:16 +02:00
Xavier Claessens
201e7c7803 Meson: Generate pc file for all plugins in base
https://bugzilla.gnome.org/show_bug.cgi?id=794568
2018-04-25 11:05:56 +01:00
Tim-Philipp Müller
762733c3d8 meson: gl: fix 'invalid keyword argument' meson warnings
Required is not a valid kwarg for cc.has_header()
2018-04-20 11:44:55 +01:00
Mathieu Duponchelle
32ca1701b7 alsamidisrc: unref buffer_list before early return 2018-04-13 01:07:21 +02:00
Mathieu Duponchelle
44ea6f4c06 vorbisenc: do not map input buffer in WRITE mode 2018-04-12 15:47:27 +02:00
Sebastian Dröge
43145292d4 gl: Disable glmixerbin for the time being too
Otherwise we have one copy in gst-plugins-bad and one (unused) here,
which makes static linking unhappy.
2018-03-25 12:48:43 +03:00
Edward Hervey
17d5f08316 oggstream: protect against out-of-bounds read
We need at least 17 bytes of data for a valid flac header

oss-fuzz #6974
2018-03-17 06:34:47 +01:00
Tim-Philipp Müller
ae9911617e Revert "alsasrc: lock calls to snd_pcm_delay() with mutex as in alsasink"
This reverts commit 4f88125b3d.

This seems to have undesirable side-effects and needs more
investigation first.

https://bugzilla.gnome.org/show_bug.cgi?id=746015
2018-03-07 18:50:25 +00:00
Mathieu Duponchelle
b59da8eced Port to latest GstAggregator segment API
The aggregator segment is now exposed on the src pad

https://bugzilla.gnome.org/show_bug.cgi?id=793946
2018-03-01 15:37:06 +01:00
Mathieu Duponchelle
22981e8a42 Port to latest GstAggregator segment API
The aggregator segment is now exposed on the src pad

https://bugzilla.gnome.org/show_bug.cgi?id=793944
2018-03-01 15:33:25 +01:00
Jan Schmidt
09584edc9a glimagesink: Correct PAR in output caps when transforming
When doing a 3D/multiview transformation and rescaling to
match the output window size, the resulting PAR may
not match the input any more and needs recalculating,
or else the GstSample reported to client-draw has the
wrong PAR.
2018-02-23 19:39:37 +11:00
Sebastian Dröge
1cfe070de7 gl: Link to libgstallocators for the dmabuf allocator 2018-02-17 18:34:58 +02:00
Tim-Philipp Müller
466b868459 vorbisparse: error out when headers are missing
https://bugzilla.gnome.org/show_bug.cgi?id=791606
2018-02-14 00:22:38 +00:00
Edward Hervey
aab5cccc34 vorbisdec: Improve "new headers while initialized" handling
If new headers arrive after we are initialized, we need to make
sure that they are indeed valid.

A vorbis bitstream always begins with three header packets and must
be in order.

Also some streams have unframed (invalid?) headers that might
confuse and disrupt the decoding process.

Therefore if ever we see new headers, we accumulate them and once
we get a non-header packet we check them to make sure that:
* We have at least 3 headers
* They are the expected ones (identification, comments and setup)
* They are in order
* Any other "header" is ignored

If those conditions are met, we reset and reconfigure the decoder

https://bugzilla.gnome.org/show_bug.cgi?id=784530
2018-02-13 08:41:29 +01:00
Jan Schmidt
46260654a4 glimagesink: Always display with requested stereo display mode
Even if the input is monoscopic, the app might want to display
it in a different layout, to do side-by-side for VR for example,
so if the app changes the output-multiview-mode always use that.
2018-02-09 18:16:04 +11:00
Matthew Waters
fbef9220d3 gl*bin: fix transfer semantics for the create-element signal
We can either receive an element that is floating or not and need to
accomodate that in the signal return values.  Do so by removing the
floating flag.

https://bugzilla.gnome.org/show_bug.cgi?id=792597
2018-02-09 17:15:30 +11:00
Matthew Waters
0d69b9d3cc gldownload: remove texture-target field from dmabuf/sysmem caps
https://bugzilla.gnome.org/show_bug.cgi?id=792342
2018-02-09 12:33:28 +11:00
Edward Hervey
0d14819ef2 oggdemux: Handle invalid-sized packets
On invalid packets there is the possibility we might end up wanting
to trim/offset more than what is available.

oss-fuzz issue #5866
2018-02-01 10:51:21 +01:00
Nicolas Dufresne
17b118c120 glimagesink: Allow resetting render rectangle
As documented, passing -1 to x and/or y should reset the render
rectangle to the window/display size.

https://bugzilla.gnome.org/show_bug.cgi?id=792798
2018-01-30 09:58:14 +00:00
Nicolas Dufresne
3b317ea6c2 glimagesink: Add render-rectangle property
This allow controlling the render rectangle from gst-launch-1.0.

https://bugzilla.gnome.org/show_bug.cgi?id=792798
2018-01-30 09:58:14 +00:00
Vincent Penquerc'h
6df4606044 glvideomixer: fix vertex_buffer leak
We call the base class first as this will remove the pad from
the aggregator, thus stopping misc callbacks from being called,
one of which (process_textures) will recreate the vertex_buffer
if it is destroyed

https://bugzilla.gnome.org/show_bug.cgi?id=760873
2018-01-29 09:58:00 +00:00
Branislav Katreniak
4f88125b3d alsasrc: lock calls to snd_pcm_delay() with mutex as in alsasink
Alsasrc introduced delay_lock in commit 519f85a43e73efb8f3fb2c7be45226e
because alsa-lib is not thread safe for the same handle.
Alsasrc uses the same threading pattern, it should be locked too.

https://bugzilla.gnome.org/show_bug.cgi?id=746015
2018-01-22 20:24:00 +00:00
Edward Hervey
d36a22553b theoradec: Check for valid width/height
If width or height are zero ... there's no video :)
2018-01-17 14:35:51 +01:00
Tim-Philipp Müller
2ee4ab1ebb meson: gl: define HAVE_PNG etc. in config.h instead of c_args
So that the tests have access to them as well (gl-launch-lines.c)
2017-12-22 22:28:20 +01:00
Tim-Philipp Müller
0dd66648c3 gl: fix up a few more #if HAVE_FOO
error: "HAVE_PNG" is not defined, evaluates to 0 [-Werror=undef]
2017-12-19 16:51:24 +00:00
Tim-Philipp Müller
8227135f3b gl: hook up to build system
Tests and documentation will follow separately.

The mixer elements in the opengl plugin need to stay
in -bad for now since they use GstVideoAggregator.

https://bugzilla.gnome.org/show_bug.cgi?id=754094
2017-12-19 12:01:48 +00:00
Tim-Philipp Müller
26b3955aba gl: use #ifdef HAVE_* instead of #if HAVE_FOO 2017-12-19 12:01:41 +00:00
Tim-Philipp Müller
59fe9c9122 gl: remove GST_USE_UNSTABLE_API bits 2017-12-19 12:01:37 +00:00
Tim-Philipp Müller
729b500208 opus: remove unused build variable and define 2017-12-19 12:01:32 +00:00
Tim-Philipp Müller
cdbb261d9c Move OpenGL library and plugin from -bad
Merge branch 'opengl-move'

https://bugzilla.gnome.org/show_bug.cgi?id=754094
2017-12-19 12:00:43 +00:00
Víctor Manuel Jáquez Leal
8f0bf85cfe gldownload: fix wrong enum
When compiling with clang, an enum conversion error is triggered
since GstVideoFrameFlags are not GstVideoFlags.

This patch sets GST_VIDEO_FRAME_FLAG_NONE to the added video meta.

https://bugzilla.gnome.org/show_bug.cgi?id=791251
2017-12-09 19:32:31 +00:00
Nicolas Dufresne
dc5dd864e6 gldownload: Add missing ifdef for dmabuf and egl
This fixes the build for platforms that don't support one or the other.
2017-12-09 19:32:31 +00:00
Matt Fischer
c98f92ee03 gldownload: Add dmabuf exporting
This patch adds code to gldownload to export the image as a
dmabuf if requested.  The element now exposes memory:DMABuf as
a cap feature, and if it is selected, the element exports the
texture to an EGL image and then a dmabuf. It also implements a
fallback to system memory download in case the exportation failed.

https://bugzilla.gnome.org/show_bug.cgi?id=776927
2017-12-09 19:32:31 +00:00
Tim-Philipp Müller
b5dee0fe5b Remove GstAggregator from -bad, moved to core
https://bugzilla.gnome.org/show_bug.cgi?id=739010
2017-12-09 19:32:31 +00:00
Matthew Waters
1abd0804f4 gl/caopengllayer: use public GstGLContext instead of Cocoa-specific one
Allows keeping the GstGLCAOpenGLLayer public but not the winsys-specific
context/display/window.
2017-12-09 19:32:31 +00:00
Mathieu Duponchelle
d5addcb352 aggregator: Remove klass->sinkpads_type
This posed problems for the python bindings (and possibly others).

Instead, subclasses now use add_pad_template_with_gtype.

https://bugzilla.gnome.org/show_bug.cgi?id=789986
2017-12-09 19:32:31 +00:00
Matthew Waters
0063e63fe3 gltestsrc: guard stop in gl thread
So we don't result in a critical when we've never created the GL context:

gst_gl_context_thread_add: assertion 'GST_IS_GL_CONTEXT (context)' failed
2017-12-09 19:32:31 +00:00
Matthew Waters
5793dfe881 gltestsrc: free in the GL thread on stop
Calling GL functions not on the GL thread may crash in some GL
implementations.

https://bugzilla.gnome.org/show_bug.cgi?id=789665
2017-12-09 19:32:30 +00:00
Tim-Philipp Müller
77277c46f9 gl: use new gst_element_foreach_sink_pad()
Instead of gst_aggregator_iterate_sinkpads() which will
soon be removed.

https://bugzilla.gnome.org/show_bug.cgi?id=785679
2017-12-09 19:32:30 +00:00
Ponnam Srinivas
601e274c95 glmixer: Unmap video frame in error case
https://bugzilla.gnome.org/show_bug.cgi?id=788127
2017-12-09 19:32:30 +00:00
Haihua Hu
29973b7d6c glvidemixer: need reconfigure output gemotry after caps renegotiated 2017-12-09 19:32:30 +00:00
Matthew Waters
9fbd1930b7 Revert "glvideomixer: need update output geometry after src caps reconfigure"
This reverts commit d6e538dc56.
2017-12-09 19:32:30 +00:00
Haihua Hu
60eeef12a0 glvideomixer: need update output geometry after src caps reconfigure
Need update output geometry when sink caps changed and use
gst_structure_set to update caps if structure is fixed

https://bugzilla.gnome.org/show_bug.cgi?id=787820
2017-12-09 19:32:30 +00:00
Haihua Hu
4fa5c37878 glimagesink: expose should do redisplay all the time
when using internal window, window resize should work
when pause state, but expose only do redisplay when
window_id is valid. So expose should do redisplay all
the time.

https://bugzilla.gnome.org/show_bug.cgi?id=787394
2017-12-09 19:32:30 +00:00
Nicolas Dufresne
707385690d Request minimum buffer even if need_pool is FALSE
When tee is used, it will not request a pool, but still it wants to
know how many buffers are required.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-12-09 19:32:30 +00:00
Matthew Waters
21252d450c glutils: fix matrix operations everywhere
- correct the matrix multiplication
- Use column-major matrices
  - reverse order of matrix multiplications

https://bugzilla.gnome.org/show_bug.cgi?id=785980
2017-12-09 19:32:30 +00:00
Matthew Waters
1dc074d401 gltransformation: draw with GL_TRIANGLES
Drawing 5 vertices with GL_TRIANGLE_STRIP will draw an extra unneeded
triangle.
2017-12-09 19:32:30 +00:00
Julien Isorce
d5563a0c06 gl: fix broken build due to previous commit 2fd84a6c
Can reproduce after installing libgraphene-dev

Also fixes caopengllayersink.h to anticipate build error on osx.

https://bugzilla.gnome.org/show_bug.cgi?id=784779
2017-12-09 19:32:30 +00:00
Julien Isorce
4952fdd956 gl: do not include GL headers in public gstgl headers
Except for gst/gl/gstglfuncs.h

It is up to the client app to include these headers.
It is coherent with the fact that gstreamer-gl.pc does not
require any egl.pc/gles.pc. I.e. it is the responsability
of the app to search these headers within its build setup.

For example gstreamer-vaapi includes explicitly EGL/egl.h
and search for it in its configure.ac.

For example with this patch, if an app includes the headers
  gst/gl/egl/gstglcontext_egl.h
  gst/gl/egl/gstgldisplay_egl.h
  gst/gl/egl/gstglmemoryegl.h
it will *no longer* automatically include EGL/egl.h and GLES2/gl2.h.
Which is good because the app might want to use the gstgl api only
without the need to bother about gl headers.

Also added a test: cd tests/check && make libs/gstglheaders.check

https://bugzilla.gnome.org/show_bug.cgi?id=784779
2017-12-09 19:32:29 +00:00
Jan Schmidt
632015a9e8 gldownload: Micro-optimisation. Don't check output caps on every buffer
The output caps will only change on a set_caps() call, so check if
they contain the SystemMemory feature then and save some
per-buffer CPU.
2017-12-09 19:32:29 +00:00
Jan Schmidt
76bf415a96 glfilter: Remove hard-coded pad templates
Add a function to install the default RGBA pad templates,
but don't make them required so that there can be
GstGLFilter sub-classes with different input/output
caps if they want. Remove the hard-coded RGBA restriction in
the set_caps_features call, as it will be taken care
of by intersecting with the pad templates.

Update all the sub-classes to match
2017-12-09 19:32:29 +00:00
Nicolas Dufresne
e0d351c798 gl: Add dependency to gstallocators 2017-12-09 19:32:28 +00:00
Anders Jonsson
4179109ba2 gltestsrc: Fix typo (occured->occurred)
https://bugzilla.gnome.org/show_bug.cgi?id=782947
2017-12-09 19:32:28 +00:00
Olivier Crête
28b7954ea1 glbasemixer: Remove unused negotiated member
This is now all handled in GstAggregator, so this code is not
called anymore.
2017-12-09 19:32:28 +00:00
Olivier Crête
00760618df gl*mixer: Use propose_allocation from the GstAggregator base class
https://bugzilla.gnome.org/show_bug.cgi?id=782918
2017-12-09 19:32:28 +00:00
Olivier Crête
5bb22d8f12 glbasemixer: Remove own decide_allocation, use GstAggregator's
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-12-09 19:32:28 +00:00