Julien Isorce
e0f94ae094
gl: add copyright to cocoa example
2017-12-09 19:31:38 +00:00
Julien Isorce
5150408da3
gl: rename cocoa example and move it to its parent directory
2017-12-09 19:31:38 +00:00
Julien Isorce
a6b2cd4c14
gl: remove unuseful README for cocoa example
2017-12-09 19:31:38 +00:00
Matthew Waters
db544c3c1f
gl/pool: init the upload object on start
...
Theoretically, set_config could be called multiple times
2017-12-09 19:31:38 +00:00
Sebastian Dröge
8c56e1bba7
gl: Try harder to load symbols from the correct place
...
This commit makes the loading of the GModules threadsafe, and
always first tries to load the symbol for the GL library that
is selected for the current context. Only then it falls back
to looking into the current module (NULL), and only as a last
resort the context specific function (e.g. eglGetProcAddress())
is called.
Also add configure parameters to select the names of the library
modules instead of using the defaults, and let the defaults be
independent of the G_MODULE_SUFFIX.
https://bugzilla.gnome.org/show_bug.cgi?id=728753
2017-12-09 19:31:38 +00:00
Matthew Waters
b1fc846f83
glcolorscale: fix operation with dual GL, GLES2 libgstgl
2017-12-09 19:31:38 +00:00
Matthew Waters
33091ff6a5
gl/mem: implement texture copying between formats with strides properly
...
Previously, we used the width to determine the amount of data to be
copied using pbos. This, makes it allocate enough data for the
the strides as well.
2017-12-09 19:31:38 +00:00
Matthew Waters
8638a5638c
gl/mem: pad the public struct
2017-12-09 19:31:38 +00:00
Nicolas Dufresne
1e8fc49203
gl: no need to provide full lib path to load symbols
...
- Make gstgl work on Mali
- Keep it work on RPI
- fallback to NULL name module if fails with usual lib name
https://bugzilla.gnome.org/show_bug.cgi?id=728753
2017-12-09 19:31:38 +00:00
Julien Isorce
2a12e57a9f
glcolorscale: use a shader on GLESv2
...
Otherwise you only see black frames
Fix https://bugzilla.gnome.org/show_bug.cgi?id=728947
2017-12-09 19:31:38 +00:00
Julien Isorce
0455cb610a
glimagesink: use new helper function to avoid duplicating default shader text
2017-12-09 19:31:38 +00:00
Julien Isorce
2b8de2d1bc
gleffects: use new helper functions to avoid duplicating the same vertex shader text
...
And also use the default fragment shader text for the identity effect
2017-12-09 19:31:38 +00:00
Julien Isorce
cebcc837de
gl: add convenient functions to setup default vertex and fragment shaders
...
Most of our 2D filters use the same simple vertex shader.
Also define the default fragment shader as the identity.
Avoid duplicating the same vertex and fragment shader text.
2017-12-09 19:31:38 +00:00
Philippe Normand
95290346c6
gl: add missing G_BEGIN/END_DECLS in utils header
2017-12-09 19:31:38 +00:00
Thiago Santos
72f3b228c8
examples: gl: add missing entry to cflags to find gst/gl/gl.h
...
Otherwise build fails
2017-12-09 19:31:38 +00:00
Stefan Sauer
2cb93951df
tests: drop direct include
...
It is only allowed to include gdk/gdkx.h and that will bring all the x11 things.
2017-12-09 19:31:38 +00:00
Jan Schmidt
6b1b6d25de
gl/sdl example: Fix uninstalled build
2017-12-09 19:31:38 +00:00
Jan Schmidt
cf018389e1
gl: Reduce noisy Info level output to LOG
2017-12-09 19:31:38 +00:00
Matthew Waters
84459c386b
gl/examples/sdl: update for the latest gstgl changes
2017-12-09 19:31:38 +00:00
Matthew Waters
05bfd277a8
gl/examples: move to -bad
...
- fix all the compiler errors
- give them their own gl directory
2017-12-09 19:31:38 +00:00
Julien Isorce
d31247253d
gl: append GL_LIB and GL_CFLAGS in pc files
2017-12-09 19:31:38 +00:00
Julien Isorce
391661b626
gl: use gst_gl_platform_from_string because we support gl shareList on all platforms
2017-12-09 19:31:38 +00:00
Julien Isorce
c441afdc6b
glfilter: only warn when other_context attribute is set
...
Fix false positive
2017-12-09 19:31:38 +00:00
Julien Isorce
959aae65c0
gl: fix string literal warning
...
warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
2017-12-09 19:31:38 +00:00
Luis de Bethencourt
8c46b24d51
gl: check the correct GstGLMemory in basic_test
2017-12-09 19:31:37 +00:00
Nicolas Dufresne
801f11e36b
gl/x11: Removed unused variable
2017-12-09 19:31:37 +00:00
Sebastian Dröge
8f156591e5
gl/x11: Get rid of unneeded second display connection and do everything from the main loop
2017-12-09 19:31:37 +00:00
Sebastian Dröge
a0a133288e
gl/x11: Block rendering until swapbuffers is called and don't go via X11 events as unneeded indirection
...
This should fix QoS problems, where basesink believed it was rendering with
20FPS but actually we were just queueing up X11 Expose events and only once
in a while something was rendered.
2017-12-09 19:31:37 +00:00
Julien Isorce
c52dd44e60
gl: fails glimagesink when shader compilation went wrong
...
Those shaders are fixed and very simple so it should not fail
but it's worth to handle a such case.
2017-12-09 19:31:37 +00:00
Julien Isorce
4844c53017
gl: call glClearColor before glClear
2017-12-09 19:31:37 +00:00
Josep Torra
22d5f77ccf
pkgconfig: fix gstreamer-gl uninstalled
...
Ensure to provide libgstgl also in the uninstalled setup.
Fixes build of gst-omx for RPI in uninstalled setup.
2017-12-09 19:31:37 +00:00
Julien Isorce
c9d2f8ee94
gl/rpi: do not scale to full screen
...
Having a 640x360 movie being scaled to 1900x1200 does not look nice
2017-12-09 19:31:37 +00:00
Julien Isorce
7a77d435c1
gl/rpi: change dispmanx attributes of existing element instead of creating a new one
...
I was lucky that:
e1 = vc_dispmanx_element_add ()
eglCreateWindowSurface (e1)
vc_dispmanx_element_remove (e1)
e2 = vc_dispmanx_element_add ()
resulted in having e2 equal to e1. And also having the egl surface
that does not allocate its buffers before the first draw.
2017-12-09 19:31:37 +00:00
Julien Isorce
33a60e238c
gl/rpi: ensure the dispmanx element to be opaque
...
So that we ensure it does not get alpha composited with other
dispmanx elements like the desktop.
2017-12-09 19:31:37 +00:00
Julien Isorce
2cd72a49ec
gl/cocoa: pass a NSView to set_window_handle instead of a NSWindow
...
Fix backwards compatibility
https://bugzilla.gnome.org/show_bug.cgi?id=728451
2017-12-09 19:31:37 +00:00
Julien Isorce
9db9834128
gl/cocoa: only draw once the window has been resized
...
It avoids to draw the first frame with an incorrect view port.
2017-12-09 19:31:37 +00:00
Julien Isorce
545bed3c7a
gl/cocoa: set the view to use for drawing by the context
...
It avoids to draw to an invalid buffer.
Withtout this the default frame buffer is undefined:
glBindFramebuffer (GL_FRAMEBUFFER, 0)
Visually you could see some white frames at the beginning
when lunching videotestsrc ! glimagesink
With OpenGL Profiler from XCode you could see some
GL_INVALID_FRAMEBUFFER_OPERATION for the first frames
2017-12-09 19:31:37 +00:00
Julien Isorce
e4b832db90
gl: fix declaration-definition mismatch for _init_upload
2017-12-09 19:31:37 +00:00
Julien Isorce
213590c79c
gl/bufferpool: do not reset upload when set_config does not change the caps
...
With videotestsrc ! glimagesink it was reset 3 times
2017-12-09 19:31:37 +00:00
Julien Isorce
bc52c7bb00
gl: use #ifdef instead of #if for __APPLE__
...
warning: "__APPLE__" is not defined [-Wundef]
with gcc version 4.7.2 20120731 (prerelease)
(crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08)
2017-12-09 19:31:37 +00:00
Nicolas Dufresne
4372ba8999
glmemory: User g_slice_new0 to ensure fully initilized structure
...
The pbo pointer not being initialized would trigger a use of unitilialized variable
in valgrind.
2017-12-09 19:31:37 +00:00
Sebastian Dröge
569f1363f4
glimagesink: Use the pixel-aspect-ratio adjusted width/height when centering the frame in the display area
...
Makes sure we actually keep the display aspect ratio
2017-12-09 19:31:37 +00:00
Sebastian Dröge
889e92e738
glimagesink: By default keep the display aspect ratio
...
Also the default for the pixel-aspect-ratio should be 1/1, not 0/1.
2017-12-09 19:31:37 +00:00
Sebastian Dröge
7f7ceea8de
gltestsrc: Unref context when creation failed and guard against that in fill()
2017-12-09 19:31:37 +00:00
Sebastian Dröge
fc607b3c53
glimagesink: Call gst_object_unref() on the GstGL GObjects again
...
While they're plain GObjects it does not hurt to call gst_object_unref()
on them and potentially allows to debug reference leaks a bit easier.
2017-12-09 19:31:37 +00:00
Sebastian Dröge
2b38f86b4e
glimagesink: If creating a context or upload failed, destroy it
...
Fixes deadlocks in error cases when later code assumes the broken
context is actually usable.
https://bugzilla.gnome.org/show_bug.cgi?id=728761
2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
f230f758e7
gl: a couple spelling/grammar fixes
2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
d6a87fb0c3
gl: guard against using a NULL window pointer
...
Coverity 1195145
2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
c728fd3b8d
gl: prevent division by 0 on unsupported texture type
...
Coverity 1199697
2017-12-09 19:31:37 +00:00
Jan Schmidt
c891eedb79
glcolorconvert: Fix bt709 conversion matrices.
...
Fix the sign on one entry in the bt.709 YUV->RGB conversion
matrix, and the corresponding inverse matrix. Fixes really
wrong colouring of some videos.
2017-12-09 19:31:37 +00:00