Commit graph

316 commits

Author SHA1 Message Date
Matthew Waters
2210ba5d46 glmemory: separate pbo transfer from texture transfers
When supported, the potentially longer pbo upload/download can be
initiated before the texture upload/download, potentially increasing
throughput.
2017-12-09 19:32:04 +00:00
Matthew Waters
dffa2857d7 gl: move basesink properties from glimagesinkbin to glsinkbin 2017-12-09 19:32:04 +00:00
Sebastian Dröge
3bfe8fcb5b gl: Use gst_object_ref_sink() for gl{filter,mixer,src}bin too 2017-12-09 19:32:04 +00:00
Sebastian Dröge
25c554a5e4 glsinkbin: Use gst_object_ref_sink() for consistency with the video-sink property on playbin 2017-12-09 19:32:04 +00:00
Thiago Santos
33b5cd5426 Fix a common typo: retreive -> retrieve
Seems to have been copy pasted around a few places
2017-12-09 19:32:03 +00:00
Matthew Waters
1e9f7b6303 gl: consolidate internal_rgba_format into glmemory
Expose some useful value format conversion functions available in
GstGLMemory.
2017-12-09 19:32:03 +00:00
Matthew Waters
6c56aba687 glwindow: handle gst_video_overlay_set_render_rectangle 2017-12-09 19:32:03 +00:00
Julien Isorce
238edceda4 gl: add GstGLContextGPUProcess backend
It builds its GL vtable from a proc address provided
by the application.
2017-12-09 19:32:02 +00:00
Julien Isorce
fce0e0ba3c gl: add and use gst_gl_internal_format_rgba
Previously when compiling GstGL with both GL and GLES2,
GL_RGBA8 was picked from GL/gl.h. But a clash may happen at
runtime when one is selecting GLES2.

gst_gl_internal_format_rgba allows to check at runtime
if it should use GL_RGBA or GL_RGBA8.
2017-12-09 19:32:02 +00:00
Luis de Bethencourt
7361160673 gleffects: 'for' loop initial declaration
'for' loop initial declarations are not allowed in C89, moving the declarations
to before the 'for' loops.
2017-12-09 19:32:02 +00:00
Xavier Claessens
0280be02ca gloverlay: fix a leak
https://bugzilla.gnome.org/show_bug.cgi?id=749846
2017-12-09 19:32:02 +00:00
Xavier Claessens
01177670ea gloverlay: properly handle errors while loading file
Post an error on the bus if anything bad happens while reading
and parsing the image file.

https://bugzilla.gnome.org/show_bug.cgi?id=749846
2017-12-09 19:32:02 +00:00
Xavier Claessens
80914d1731 gloverlay: remove unused type_file field
https://bugzilla.gnome.org/show_bug.cgi?id=749846
2017-12-09 19:32:02 +00:00
Matthew Waters
c55790143f gleffects: properly initialize the shaders across contexts implementing multiple API's 2017-12-09 19:32:02 +00:00
Matthew Waters
b53178f724 gleffects_laplacian: fix shader compilation in gl3/gles2
https://bugzilla.gnome.org/show_bug.cgi?id=748393
2017-12-09 19:32:02 +00:00
Matthew Waters
1d796508e8 gltransformation: fix DrawElements call for element array buffers
https://bugzilla.gnome.org/show_bug.cgi?id=749734
2017-12-09 19:32:02 +00:00
Sebastian Dröge
5503937337 compositor/glvideomixer: Don't calculate PAR/DAR with unset GstVideoInfos
Otherwise we divide by zero.
2017-12-09 19:32:02 +00:00
Matthew Waters
44153e637b compositor/glvideomixer: fix up par handling
We were using the wrong formula

https://bugzilla.gnome.org/show_bug.cgi?id=749634
2017-12-09 19:32:01 +00:00
Matthew Waters
f0ed0b728d caopengllayersink: static const the indices array
the contents will never change anyway.
2017-12-09 19:32:01 +00:00
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
0e2fe3c2e9 glimagesink: free the vertex buffer when done
fixes a memory leak
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
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