Matthew Waters
d7f43bb06b
gl/tests: add some simple shader testing
...
Making sure that the default shaders compile and are usable
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
5345acac54
glbasefilter: actually indicate start internally
...
Otherwise when we stop, the necessary stop functions will not be called
and things may be leaked.
https://bugzilla.gnome.org/show_bug.cgi?id=788280
2017-12-09 19:32:30 +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
Matthew Waters
a534d8d74c
gl/shader: allow setting non-square matrices as uniforms on gles platforms
...
It is possible with GLES3
2017-12-09 19:32:30 +00:00
Matthew Waters
fab729c61f
gl/query: split tests and fix some corresponding issues in usage
2017-12-09 19:32:30 +00:00
Jérôme Laheurte
247e232ec4
Use value instead of version macro when testing for mac OS version
...
https://bugzilla.gnome.org/show_bug.cgi?id=788404
2017-12-09 19:32:30 +00:00
Cassandra Rommel
2ed379c732
gl: Use GstGLDisplayEGL directly instead of creating a GstGLDisplayVIVFb subclass
...
This simplifies the code a lot without any functional changes apart from
not closing the display connection. Closing the display connection is
not safe to do as it is shared between all other code in the same
process and no reference counting or anything happens at the platform
layer.
2017-12-09 19:32:30 +00:00
Justin Kim
5b35e2339a
glcontext_egl: Add gstglwindow header
...
Otherwise, compiler complains implicit function declaration warning.
https://bugzilla.gnome.org/show_bug.cgi?id=788413
2017-12-09 19:32:30 +00:00
Ponnam Srinivas
e686f1b628
glfilter: Unmap video frame in error case
...
https://bugzilla.gnome.org/show_bug.cgi?id=788194
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
c33fc416b2
gl/viv-fb: transform screen coordinate to viewport coordinate
...
In y direction, screen coordinate are opposite to viewport coordinate.
https://bugzilla.gnome.org/show_bug.cgi?id=787394
2017-12-09 19:32:30 +00:00
Haihua Hu
8ef4a7ddaf
gl/viv-fb: fix wrong pos (x,y) calculate in queue_resize
...
queue_resize viewport coordinate calculate is wrong and
force queue_resize when do _set_render_rectangle in case
user input pos changed
https://bugzilla.gnome.org/show_bug.cgi?id=787394
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
a5aff145a2
gl/wayland: call eglTerminate() before wl_display_disconnect()
...
Calling these two functions in the wrong order will result in
use-after-free inside wayland.
https://bugzilla.gnome.org/show_bug.cgi?id=787293
2017-12-09 19:32:30 +00:00
Matthew Waters
143f9abf49
gtkglsink: expose the created display and context correctly
...
1. Propagate the GstGLDisplay we create
2. Add the created GstGLContext to the propagated GstGLDisplay
Otherwise with multi-branch GL pipelines involving gtkglsink, things
will fall apart and errors will be genarated somewhere.
2017-12-09 19:32:30 +00:00
Philippe Normand
b9a2c64d8d
examples/gl/gtk: build fix for the 3dvideo example on macOS
2017-12-09 19:32:30 +00:00
Philippe Normand
0559b42d6c
examples/gl/gtk: fix overlay handling for macOS
...
The GTK+ window requires a NSView sub-view, not an NSWindow.
2017-12-09 19:32:30 +00:00
Matthew Waters
ed7d0c48f6
gl: fix build for ios/win32/android after 2fd84a6c
...
Some missing GL includes.
2017-12-09 19:32:30 +00:00
Tim-Philipp Müller
ccb27e7317
gl: install new glfuncs.h header
2017-12-09 19:32:30 +00:00
Matthew Waters
9620edc49e
gl/checks: fix build
2017-12-09 19:32:30 +00:00
Matthew Waters
66bdef894a
gl/meson: add build for the vivante fb backend
2017-12-09 19:32:30 +00:00
Matthew Waters
e15f116de2
gl/meson: detect valid configuration from enabled apis/platform/winsys
2017-12-09 19:32:30 +00:00
Matthew Waters
00498d2b30
gl/build: also check for the GL/gl.h header
...
In order to successfully build against a detected libGL library we also need headers
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
Philippe Normand
0214f4fb55
gl/cocoa: fix build after commit 2fd84a6c
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
Tim-Philipp Müller
b6e65172fe
gl: fix build
...
Include private headers for parent class debug categories.
2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
62069a9dc6
gl: add missing new header files
...
https://bugzilla.gnome.org/show_bug.cgi?id=786170
2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
1ddde50048
gl: make some debug categories private
...
They weren't supposed to be public.
https://bugzilla.gnome.org/show_bug.cgi?id=786170
2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
4be04f8315
gl: don't export symbols that are not supposed to be public
...
Make a bunch of symbols private that are currently leaked
accidentally because they have a gst_* prefix and are used
internally. We mark those we can't make static with
G_GNUC_INTERNAL so that they get hidden with the autotools
build as well (although we could just pass -fvisibility=hidden
there too).
2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
150511d931
gl: sprinkle more GST_EXPORT
2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
fbb62097e7
gl, wayland: mark more declared functions with GST_EXPORT
2017-12-09 19:32:29 +00:00
Julien Isorce
a50c09ac26
gl: return NULL mem if eglCreateImage failed
...
Found on rpi when gpu_mem is too low so there is not enough memory to
create the eglimage. But still gst_buffer_pool_acquire_buffer succeeded.
And it leads to a CRITICAL assert:
gst_egl_image_get_image: assertion 'GST_IS_EGL_IMAGE (image)' failed
https://bugzilla.gnome.org/show_bug.cgi?id=785518
2017-12-09 19:32:29 +00:00
Matthew Waters
5c4b47e615
gl: document missing GstGLShader functions
2017-12-09 19:32:29 +00:00
Matthew Waters
82cf1b9c71
gl/docs: some documentation updates
...
Add some missing/incomplete docs
2017-12-09 19:32:29 +00:00
Matthew Waters
3200e2f00d
gl/docs: correctly name our objects in the documentation GstGl -> GstGL
2017-12-09 19:32:29 +00:00
Matthew Waters
99f9bb5612
gl/docs: document GstGLFormat enum
2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
d6766ec881
gl: fix g-i annotations for glframebuffer
...
gstglframebuffer.c:176: Error: GstGL: annotations not supported for tag "Since:".
2017-12-09 19:32:29 +00:00
Alessandro Decina
b299f70dcf
meson: specify fallback for libgmodule_dep
...
Fixes build with glib built as a subproject.
2017-12-09 19:32:29 +00:00
Edward Hervey
79d5b5151b
meson: Fix GLES2 check
...
On systems without pkg-config, we have the the library present but
not the headers
https://bugzilla.gnome.org/show_bug.cgi?id=785010
2017-12-09 19:32:29 +00:00
Philippe Normand
28a2734184
glwindow_cocoa: fix video overlay support
...
Make sure the window handle is configured after the NSWindow was created.
https://bugzilla.gnome.org/show_bug.cgi?id=767462
2017-12-09 19:32:29 +00:00