Matthew Waters
72993f54fa
gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
...
We are using shaders everywhere and so they are not needed
2017-12-09 19:32:01 +00:00
Matthew Waters
ac793f691d
glimagesink: cleanup properties
...
remove unused "display-name"
ensure defaults between the bin/element are the same
2017-12-09 19:32:01 +00:00
Matthew Waters
6c9f648462
gleffects: only try the GL2 shader init path if we have a GL2 context
2017-12-09 19:32:01 +00:00
Matthew Waters
65c57b77ff
gl: element buffers are part of vao state
...
Use them as such. They are also required for GL3 core profile support
with glDrawElements on OS X.
2017-12-09 19:32:01 +00:00
Matthew Waters
50d3161ac5
gl: don't deadlock on context creation failure
...
https://bugzilla.gnome.org/show_bug.cgi?id=749284
2017-12-09 19:32:01 +00:00
Sebastian Dröge
9336d8fa80
glmixerbin: Don't unref pad templates
...
Otherwise we unref the reference that is owned by the element class.
2017-12-09 19:32:01 +00:00
Matthew Waters
06cbb3389b
glvideomixer: implement par handling
...
We were previously ignoring it completely
2017-12-09 19:32:01 +00:00
Matthew Waters
5d3dd13433
glvideomixer: don't upload the vertex data every frame
...
Add the missing cache tracking statement.
2017-12-09 19:32:01 +00:00
Nicolas Dufresne
95eb2ef8df
gluploadelement: Remove uneeded header and defines
2017-12-09 19:32:01 +00:00
Nicolas Dufresne
685250928f
gltestsrc: Use default get_caps implementation
...
The custom code is wrong as it ignores the templates, which leads to
missing fields in the result. Instead, simply use the default get_caps
implementation which does it correctly (get the template, intersect
with filter and return).
https://bugzilla.gnome.org/show_bug.cgi?id=749237
2017-12-09 19:32:00 +00:00
Sebastian Dröge
eb626d8ddc
glmixer: Implement GstVideoAggregator::find_best_format()
...
Without this, we will fixate weird pixel-aspect-ratios like 1/2147483647. But
in the end, all the negotiation code in videoaggregator needs a big cleanup
and videoaggregator needs to get rid of the software-mixer specific things
everywhere.
2017-12-09 19:32:00 +00:00
Matthew Waters
b3bf122c94
gl: demote upload/convert/download elements to none
...
Copy paste error
2017-12-09 19:32:00 +00:00
Matthew Waters
41d3ca819d
gl: expose internal glvideomixerelement\
...
We might want more control over the exact pipeline
Also reduces overhead
2017-12-09 19:32:00 +00:00
Matthew Waters
dfddc4b910
gl: expose internal glimagesinkelement
...
We might want more control over the exact pipeline.
Also reduces overhead.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
3353667212
Revert "Revert "glimagesink: add pixel-aspect-ratio property on the bin""
...
This reverts commit d96e43b034
.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
b189e3fec3
Revert "Revert "glimagesink: forward ALL the properties on the bin""
...
This reverts commit 59fb0f830f
.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
7304d3cc75
Revert "Revert "glimagesink: implement as a bin""
...
This reverts commit be938f92d9
.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
51d3a0a059
Revert "gl: readd glupload/download onto element pads"
...
This reverts commit 87d8270f30
.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
3d6031b75c
Revert "Revert "glvideomixer: implement with glmixerbin""
...
This reverts commit b4bd11f2f3
.
2017-12-09 19:32:00 +00:00
Matthew Waters
296397a8b1
glimagesink: handle the local_context query
...
so that upstream elements can get the GL context from glimagesink
2017-12-09 19:32:00 +00:00
Matthew Waters
343947f383
gl: readd glupload/download onto element pads
...
Allows insertion of gl elements into non-gl pipelines without converter
(upload/download) elements.
https://bugzilla.gnome.org/show_bug.cgi?id=743974
2017-12-09 19:32:00 +00:00
Matthew Waters
eb5d578a95
Revert "glvideomixer: implement with glmixerbin"
...
This reverts commit 0fb56738a1
.
2017-12-09 19:32:00 +00:00
Matthew Waters
d9737138ef
Revert "glimagesink: implement as a bin"
...
This reverts commit 8a0017e21d
.
2017-12-09 19:32:00 +00:00
Matthew Waters
3b0efeb731
Revert "glimagesink: forward ALL the properties on the bin"
...
This reverts commit 4be45e5f30
.
2017-12-09 19:32:00 +00:00
Matthew Waters
0da6dbce81
Revert "glimagesink: add pixel-aspect-ratio property on the bin"
...
This reverts commit 2ba6bb9b93
.
2017-12-09 19:32:00 +00:00
Jan Schmidt
7a61e0eca4
glimagesink: Cache caps for passing to the client draw call
...
Don't convert the GstVideoInfo to caps on every draw call,
just cache the caps and pass them into the GstSample.
2017-12-09 19:32:00 +00:00
Matthieu Bouron
dc36647d78
glimagesink: Use gst_pad_get_pad_template_caps in ::get_caps()
2017-12-09 19:32:00 +00:00
Matthew Waters
c902a6f525
glupload: provide the sink template caps that could be used
...
https://bugzilla.gnome.org/show_bug.cgi?id=746399
2017-12-09 19:32:00 +00:00
Matthieu Bouron
41015eb331
glfiltercube: Don't initialize multiple shaders on renegotiation
2017-12-09 19:32:00 +00:00
Matthieu Bouron
3a124511bb
glimagesink: Remove unused stop function
2017-12-09 19:32:00 +00:00
Matthew Waters
45b50cbb72
glimagesink: unref the pool in the correct place
...
Otherwise we could hold a pool to a context that is never going to be used.
https://bugzilla.gnome.org/show_bug.cgi?id=748405
2017-12-09 19:32:00 +00:00
Matthieu Bouron
cf438d7def
gltransformation: Unref shader in ::stop()
2017-12-09 19:32:00 +00:00
Matthew Waters
f4f3284161
gl: unref display/other-context in the correct place
...
Otherwise state changes from PLAYING->READY->PAUSED will cause there to
to be no display configured on the element.
https://bugzilla.gnome.org/show_bug.cgi?id=748405
2017-12-09 19:32:00 +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
Lubosz Sarnecki
590c7032d8
gltransformation: don't initialize multiple shaders on renegotiation
...
https://bugzilla.gnome.org/show_bug.cgi?id=748407
* delete shader if one exists
* set it to NULL after unrefing
2017-12-09 19:31:59 +00:00
Sebastian Dröge
c75f6b347f
glcolorconvert: Fix compiler warning
...
gstglcolorconvertelement.c:230:19: error: unused variable 'in_structure'
[-Werror,-Wunused-variable]
GstStructure *in_structure = gst_caps_get_structure (caps, 0);
^
2017-12-09 19:31:59 +00:00
Matthieu Bouron
4e05044734
glcolorconvert: Keep colorimetry and chroma-site fields if passthrough
...
https://bugzilla.gnome.org/show_bug.cgi?id=748141
2017-12-09 19:31:59 +00:00
Matthew Waters
5fbc9bd5e0
glimagesink: balance change_state display ref/unref
...
the display was being unreffed on the incorrect state change causing
invalid state when changing from PLAYING/PAUSED->READY->PAUSED/PLAYING.
2017-12-09 19:31:59 +00:00
Matthieu Bouron
6d75eaf005
glupload: Release glupload buffer when caps are changed
...
https://bugzilla.gnome.org/show_bug.cgi?id=748371
2017-12-09 19:31:59 +00:00
Vineeth T M
41af2f4ad8
glmixer: Possible null pointer dereference
...
While printing error message when context fails, error variable is not being used anymore
so it will lead to null pointer dereference
https://bugzilla.gnome.org/show_bug.cgi?id=748287
2017-12-09 19:31:59 +00:00
Michał Dębski
7ec1246730
gleffects: Create element for each effect
...
https://bugzilla.gnome.org/show_bug.cgi?id=746209
2017-12-09 19:31:59 +00:00
Michał Dębski
afdc3c8ee3
gleffects: Merge laplacian filter into effects
...
https://bugzilla.gnome.org/show_bug.cgi?id=746209
2017-12-09 19:31:59 +00:00
Michał Dębski
befbf3733b
gleffects: Merge sobel filter into effects
...
https://bugzilla.gnome.org/show_bug.cgi?id=746209
2017-12-09 19:31:59 +00:00
Michał Dębski
208b5f999e
gleffects: Merge blur filter into effects
...
https://bugzilla.gnome.org/show_bug.cgi?id=746209
2017-12-09 19:31:59 +00:00
Michał Dębski
a2ef6757f0
gleffects: Correct attributes for hconv and vconv shaders
...
Width and height were switched for glow shaders. For blur
filter attributes names were obsolete.
https://bugzilla.gnome.org/show_bug.cgi?id=746209
2017-12-09 19:31:59 +00:00
Michał Dębski
eb326ba4c2
gleffects: Fix fisheye shader - pass float to sqrt
...
On OSX passing literal int to sqrt() in GLSL results in error.
https://bugzilla.gnome.org/show_bug.cgi?id=746209
2017-12-09 19:31:59 +00:00
Lubosz Sarnecki
85d9185b0c
gltransformation: fix shader memory leak
2017-12-09 19:31:59 +00:00
Matthew Waters
03908c679e
gldisplay: synchronize the searching and creation of GstGLContext's
...
Ootherwise we could end up with multiple elements in different chains
each creating a context. Fixes context creation with glvideomixer.
2017-12-09 19:31:59 +00:00
Guillaume Desmottes
e6c5410a2a
glmixer: fix caps leak in gst_gl_mixer_pad_sink_getcaps()
...
Caps refcounting was all wrong in this function. Rewrote it and add some
comments to make it clearer.
Fix caps leaks with the
validate.file.glvideomixer.simple.play_15s.synchronized scenario.
https://bugzilla.gnome.org/show_bug.cgi?id=747915
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2017-12-09 19:31:59 +00:00
Guillaume Desmottes
ce76c66f92
glmixer: unref owned caps when finalizing the mixer
...
Fix a caps leak with the
validate.file.glvideomixer.simple.play_15s.synchronized scenario.
https://bugzilla.gnome.org/show_bug.cgi?id=747915
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2017-12-09 19:31:59 +00:00
Guillaume Desmottes
0511d12e4a
glmixer: pass the proper free function to frames and buffers array
...
'array_buffers' contain borrowed GstBuffer and so shouldn't have a free
function. 'frames' is the one containing GstGLMixerFrameData and so should use
_free_glmixer_frame_data as free function.
Fix GstGLMixerFrameData leaks with the
validate.file.glvideomixer.simple.play_15s.synchronized scenario.
https://bugzilla.gnome.org/show_bug.cgi?id=747913
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2017-12-09 19:31:59 +00:00
Sebastian Dröge
3acaa0eb0f
gldownloadelement: Download *from* OpenGL, not into
2017-12-09 19:31:59 +00:00
Matthieu Bouron
15785f794e
gluploadelement: Unref GstGLUpload object and caps in ::stop()
...
Fix leak of the GstGLUpload object.
https://bugzilla.gnome.org/show_bug.cgi?id=748033
2017-12-09 19:31:59 +00:00
Sebastian Dröge
bff8cde2ea
gl: Remove some empty ::finalize() implementations
2017-12-09 19:31:59 +00:00
Sebastian Dröge
c4713af2ef
gldownloadelement: Fix element description
2017-12-09 19:31:59 +00:00
Sebastian Dröge
f8d2219c44
gldownloadelement: Remove unused ::finalize() implementation
2017-12-09 19:31:59 +00:00
Sebastian Dröge
4ccf151d15
glcolorconvertelement: Also unref caps in ::stop() already
...
They are not useful anymore afterwards, so keeping them until ::finalize()
might only cause someone to use them later and then fail.
2017-12-09 19:31:59 +00:00
Guillaume Desmottes
3294854c6d
glcolorconvertelement: fix GstGLColorConvert leak
...
convert->convert was never unreffed.
This can be reproduce with the
validate.file.glvideomixer.simple.play_15s.synchronized scenario.
https://bugzilla.gnome.org/show_bug.cgi?id=747911
2017-12-09 19:31:59 +00:00
Sebastian Dröge
af77f6467f
glimagesink: Disconnect mouse/key event signal handlers from window when shutting down context
2017-12-09 19:31:58 +00:00
Sebastian Dröge
39c72f324b
glimagesink: Guard against disconnecting invalid signal ids
2017-12-09 19:31:58 +00:00
Edward Hervey
36419f2f79
glvideomixer: Don't use context if not present
...
Avoids assertions at runtime
2017-12-09 19:31:58 +00:00
Anton Obzhirov
9294e84334
gleffects: port all effects to GLES2.0
...
https://bugzilla.gnome.org/show_bug.cgi?id=745955
2017-12-09 19:31:58 +00:00
Nicola Murino
1af4a1f759
glimagesink: fix caps leak
...
https://bugzilla.gnome.org/show_bug.cgi?id=746541
2017-12-09 19:31:58 +00:00
Víctor Manuel Jáquez Leal
55dbb25dcc
glupload: move meta-data copy into gst-gl library
...
In some upload implementations the out buffer has more than one references,
turning the buffer not writable, so it won't be possible to modify its
meta-data.
This patch moves the meta-data copy before increasing the reference of the out
buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=746173
2017-12-09 19:31:58 +00:00
Julien Isorce
5f7aaba2d5
glimagesink: keep window invisible when sharing output
...
https://bugzilla.gnome.org/show_bug.cgi?id=739681
2017-12-09 19:31:58 +00:00
Julien Isorce
1d88b95201
glimagesink: provide GstSample in client-draw signal
...
Instead of prividing texture and size directly.
And apply changes to examples.
https://bugzilla.gnome.org/show_bug.cgi?id=739681
2017-12-09 19:31:58 +00:00
Matthew Waters
93968916a4
glsyncmeta: make context to wait and set sync explicit
...
otherwise we may wait on a sync object in same context by accident
2017-12-09 19:31:58 +00:00
Nicolas Dufresne
c68af4d6fc
glimagesink: Add NULL check in error case
...
Other context may be NULL if something went wrong. Avoid trying to unref
a NULL pointer.
2017-12-09 19:31:58 +00:00
Matthew Waters
f58b5b65f1
glupload/colorconvert: only copy timestamps if the input buffer != output
2017-12-09 19:31:58 +00:00
Matthew Waters
15fd4e164a
glshader: attribute locations are -1 on error
2017-12-09 19:31:57 +00:00
Jan Schmidt
bf0440f97b
GL: Remove annoying printf in the filterbin class_init
2017-12-09 19:31:57 +00:00
Matthew Waters
23e2d74112
glimagesink: add pixel-aspect-ratio property on the bin
2017-12-09 19:31:57 +00:00
Matthew Waters
3aad6d73f1
glimagesink: forward ALL the properties on the bin
2017-12-09 19:31:57 +00:00
Matthew Waters
3d8eb44b7c
gluploadelement: properly unref buffers that are the same as the input
...
basetransform doesn't unref equal input and output buffers
2017-12-09 19:31:57 +00:00
Matthew Waters
92f0aa9bd8
gl: get the context from basemixer/basefilter
2017-12-09 19:31:57 +00:00
Matthew Waters
51620950e4
gl: retreive the gldisplay/app gl context as soon as possible
...
fixes the usage of gst_gl_display_filter_gl_api
2017-12-09 19:31:57 +00:00
Matthew Waters
95756a5413
caopengllayersink: implement as a bin like glimagesink
2017-12-09 19:31:57 +00:00
Matthew Waters
35476a4cb4
gl/cocoa: avoid deadlock when creating context on the main thread.
...
Make window/view creation async so that it is possible to
gst_gl_context_create from the main thread.
2017-12-09 19:31:57 +00:00
Matthew Waters
813fb633b4
gl: store the list of contexts within gldisplay
...
Removes the reliance on the allocation query to propogate GL contexts.
Allows thread safely getting a context for the a specific thread.
2017-12-09 19:31:57 +00:00
Matthew Waters
2e16961ab3
glimagesink: unset the current shader after rendering
...
fixes gltestsrc ! glimagesink when gltestsrc doesn't use a shader
2017-12-09 19:31:57 +00:00
Matthew Waters
909b69fad4
gltestsrc: remove usage of gldownload library object
2017-12-09 19:31:57 +00:00
Matthew Waters
abe21912f5
gl: new glsrcbin element
2017-12-09 19:31:57 +00:00
Matthew Waters
b42e4ba079
glvideomixer: implement with glmixerbin
...
The relevant properties are forwarded to/from the containing bin
and sink pads.
2017-12-09 19:31:57 +00:00
Matthew Waters
c562a7e2d9
glmixer: remove usage of upload/download objects
2017-12-09 19:31:57 +00:00
Matthew Waters
e85c7f84db
gl: new glmixerbin element
2017-12-09 19:31:57 +00:00
Matthew Waters
1b0d2b1338
glimagesink: implement as a bin
...
glupload ! glcolorconvert ! sink
Some properties are manually forwarded. The rest are available using
GstChildProxy.
The two signals are forwarded as well.
2017-12-09 19:31:57 +00:00
Matthew Waters
1412e9c764
gl: new glsinkbin element
...
similar to glfilterbin but for sinks
2017-12-09 19:31:57 +00:00
Matthew Waters
fe36f0b065
gl: new element glfilterbin
...
It encapsulates a confiurable GL processing element in the
upload/colorconvert/download dance required to transparently process
the majority of GstBuffer's.
2017-12-09 19:31:57 +00:00
Matthew Waters
df50ba0491
gl: add new gldownloadelement
...
Simply transforms caps to/from raw/glmemory capsfeatures
2017-12-09 19:31:57 +00:00
Matthew Waters
782b343f7d
gl: add a new glcolorconvert element based on the glcolorconvert library object
2017-12-09 19:31:57 +00:00
Matthew Waters
6b6d26fd8f
gl: add a new glupload element based on the glupload library object
2017-12-09 19:31:56 +00:00
Matthew Waters
66b349f100
gl: add a new glbasemixer class below glmixer
...
It deals with propagating the gl display/contexts throughout the
application/pipeline
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
ccdd4d48a0
glmixer: Don't share our downstream pool with upstream
...
Pool cannot have multiple owner. This can lead to spurious
pool was flushing error.
https://bugzilla.gnome.org/show_bug.cgi?id=74570
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
bc92b41c7b
glimagesink: Only cache pool, don't manage it
...
GLImage does not use any kind of internal pool. There was some
remaining code and comment stating that it was managing the
pool, and it was in fact setting the active state when doing
to ready state.
* Only create the pool if requested and in propose_allocation
* Cache the pool to avoid reallocation on spurious reconfigure
* Don't try to deactivate the pool (we don't own it)
https://bugzilla.gnome.org/show_bug.cgi?id=745705
2017-12-09 19:31:56 +00:00
Sebastian Dröge
cb59ace574
gl: Remove format info in glcolorconvert's transform_caps function instead of on every caller
...
... and let glmixer actually transform the caps it is supposed to transform
instead of inventing new caps.
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
2729949b39
gloverlay: Fix upside down and miss-aligned JPEG
...
LibJPEG uses macroblock of 8x8 sample. In this element we use RGB and
Y444, two 24bit formats that are stored in 32bit pixels. This mean we
have 32x32 bytes macroblocks. For this reason, we need to allocate
our buffer slightly larger. We also need to pass the line pointer in
the right order, otherwise the image endup upside-down.
https://bugzilla.gnome.org/show_bug.cgi?id=745109
2017-12-09 19:31:56 +00:00
Xavier Claessens
7fac5085e6
gltransformation: normalize translations
...
https://bugzilla.gnome.org/show_bug.cgi?id=744763
* Lubosz: use maxfloat for transformation range
2017-12-09 19:31:56 +00:00
Xavier Claessens
1250285b30
gltransformation: Fix doc typo
...
https://bugzilla.gnome.org/show_bug.cgi?id=744763
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
de79830b05
glmemory: Add GstAllocationParams and alignment support
...
This implements support for GstAllocationParams and memory alignments.
The parameters where simply ignored which could lead to crash on
certain platform when used with libav and no luck.
https://bugzilla.gnome.org/show_bug.cgi?id=744246
2017-12-09 19:31:55 +00:00