Matthew Waters
56bd10a392
caopengllayersink: correctly use the sync meta across multiple contexts
...
1. Set the sync point after the (possible) upload has occured
2. Wait in the correct GL context (the draw context)
Note: We don't add the GL sync meta to the input buffer as it's not
writable and a copy would be expensive.
Similar to the change with the same name for glimagesink
2017-12-09 19:32:01 +00:00
Matthew Waters
d6c4f850ea
caopengllayersink: update for GL3 element array buffer usage
...
fixes blank output
2017-12-09 19:32:01 +00:00
Matthew Waters
f272500ccb
glimagesink: correctly use the sync meta across multiple contexts
...
1. Set the sync point after the (possible) upload has occured
2. Wait in the correct GL context (the draw context)
Note: We don't add the GL sync meta to the input buffer as it's not
writable and a copy would be expensive.
2017-12-09 19:32:01 +00:00
Matthew Waters
e8e84cf6b3
gl/calayer: provide a current wrapped GstGLContext for callbacks
...
So that the draw and resize callbacks can get the current GstGLContext.
2017-12-09 19:32:01 +00:00
Matthew Waters
18b9519a66
glsyncmeta: ensure that the Fence is going to be executed
...
Otherwise it could stay client side without being submitted to the GL
server resulting in another context waiting on a Fence that will never
become signalled causing a deadlock.
2017-12-09 19:32:01 +00:00
Matthew Waters
62c2d98c52
glupload: don't reuse output textures for raw data upload
...
Causes stale textures to be used further down the chain.
2017-12-09 19:32:01 +00:00
Matthew Waters
d5e0d435e4
glframebuffer: don't clear the framebuffer
...
Breaks attempting to blend with the destination buffer and should be done
explicitly by the callback anyway.
2017-12-09 19:32:01 +00:00
Matthew Waters
5a275c77eb
glbasefilter: track gl_start/stop correctly
...
Don't start multiple times without calling gl_stop.
2017-12-09 19:32:01 +00:00
Matthew Waters
0e2fe3c2e9
glimagesink: free the vertex buffer when done
...
fixes a memory leak
2017-12-09 19:32:01 +00:00
Matthew Waters
5d8841c8e7
glcontext/cocoa: implement GL3 core context selection
2017-12-09 19:32:01 +00:00
Matthew Waters
2cbf2abea0
tests/gl: fix typo
2017-12-09 19:32:01 +00:00
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
675f789871
glshader: attempt to detect the gles2 inside opengl3 case
...
This is necessary to use gles2 shaders in a GL 3 core context on
OS X which fails without a proper #version being set on the shaders.
2017-12-09 19:32:01 +00:00
Matthew Waters
2b4ce9435d
glshader: remove references to gl3 specific shaders
...
We rely specifically on gles2 shaders being supported by the GL
implementation with GL3 core profile.
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
cc587ce1f1
glmemory: properly detect (hopefully) the correct ext_rg/arb_rg variant
...
GL_EXT_texture_rg is only valid for GLES2. GLES3 uses similar wording to
the GL_ARB_texture_rg which requires a sized internal format that the
GL_EXT_texture_rg does not require.
https://www.khronos.org/registry/gles/extensions/EXT/EXT_texture_rg.txt
https://www.opengl.org/registry/specs/ARB/texture_rg.txt
2017-12-09 19:32:01 +00:00
Matthew Waters
16522a737c
glcontext: propagate the version/extension failure upwards
...
Otherwise the calling code has no idea that the context failed to
be created fully.
https://bugzilla.gnome.org/show_bug.cgi?id=749284
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
5216434678
glsyncmeta: fixup size declaration
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
Jan Schmidt
c2450a28f5
glcolorconvert: Improve passthrough check when no conversion is needed.
...
Make the passthrough check contingent on only the fields we
can modify being unchanged, and pre-compute it when caps
change instead of checking on each buffer. Makes the passthrough
more lenient if consumers are lax about making input and output
caps complete.
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
Jan Schmidt
9958df5dd1
glupload: Make upload method static caps non-const.
...
Retrieving a GstStaticCaps does a one time internal
initialisation and caches it - they can't be stored as
const structures.
2017-12-09 19:32:00 +00:00
Matthew Waters
84b61ad4d5
glmemory: remove uneeded unref
...
The call to _gl_mem_alloc_data will unref and NULLify 'dest' for us.
We just need to return.
https://bugzilla.gnome.org/show_bug.cgi?id=744246
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
Xavier Claessens
403ee23de1
egl: Use maximum bits per color instead of minimum
...
https://bugzilla.gnome.org/show_bug.cgi?id=748425
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