Commit graph

573 commits

Author SHA1 Message Date
Matthew Waters
2a937dd96a [817/906] make the state change test pass 2017-12-09 19:31:31 +00:00
Matthew Waters
f7c8658464 [816/906] x11: fix make check segfault 2017-12-09 19:31:31 +00:00
Matthew Waters
4bec88ea28 [815/906] fix some refcount errors 2017-12-09 19:31:31 +00:00
Matthew Waters
a44517a1e8 [814/906] mixer: timestamp buffers 2017-12-09 19:31:31 +00:00
Matthew Waters
fa02b04292 [813/906] unref the pool on shutdown 2017-12-09 19:31:31 +00:00
Matthew Waters
711ad485b2 [812/906] move the GL vtable from GstGLDisplay to GstGLContext
Conflicts:
	tests/check/libs/gstglcontext.c
2017-12-09 19:31:31 +00:00
Julien Isorce
b54293266d [810/906] gstglutils: use gl_vtable for glDeleteTextures 2017-12-09 19:31:31 +00:00
Matthew Waters
704f231343 [808/906] x11: remove dead code 2017-12-09 19:31:31 +00:00
Matthew Waters
d9cc31aca0 [807/906] context: Move some window error enums to context 2017-12-09 19:31:31 +00:00
Matthew Waters
57c32baab7 [806/906] egl: doesn't require the EGLConfig from the other context
libEGL should give us the same or similar EGLConfig from the
EGLDisplay we have.
2017-12-09 19:31:31 +00:00
Matthew Waters
0f8fc0881a [805/906] glfilter: rename external-opengl-context prop to other-context
It now requires a GstGLContext instead of a handle
2017-12-09 19:31:31 +00:00
Julien Isorce
cc38e16ef2 [804/906] rpi: call bcm_host_init in plugin_init 2017-12-09 19:31:31 +00:00
Julien Isorce
dd679dee25 [803/906] raspberrypi: add support for dispmanx
See https://bugzilla.gnome.org/show_bug.cgi?id=703342
2017-12-09 19:31:31 +00:00
Matthew Waters
48cd6ac353 [801/906] context: Reimplement GL context sharing
https://bugzilla.gnome.org/show_bug.cgi?id=704806
2017-12-09 19:31:31 +00:00
Matthew Waters
40a2c12495 [798/906] build: install needed header 2017-12-09 19:31:31 +00:00
Matthew Waters
72cc3c4815 [797/906] x11: fix build for clang 2017-12-09 19:31:31 +00:00
Matthew Waters
b8b9fced19 [796/906] move egl into its own directory 2017-12-09 19:31:31 +00:00
Matthew Waters
83ac943fc4 [795/906] android: port to GstGLContext
not tested
2017-12-09 19:31:31 +00:00
Matthew Waters
9cbb652b66 [794/906] context: add subclasses for the different platforms (egl, glx, wgl, etc)
- most code taken from the Window subclasses
- tested combinations: xEGL, GLX, Wayland+EGL, Cocoa (under GNUStep), WGL (Wine)
2017-12-09 19:31:30 +00:00
Matthew Waters
e80533dcee [793/906] add a GstGLContext object that will be the basis of OpenGL contexts
At the moment it just sits in between GstGLDisplay and GstGLWindow
performing some of the stuff that GstGLWindow used to do.
2017-12-09 19:31:30 +00:00
Matthew Waters
175f28848c [792/906] build: use our own in tree headers before system ones
allows us to develop against the tree rather than what may be installed
2017-12-09 19:31:30 +00:00
Julien Isorce
b56bf26dce [791/906] glwindow/x11: remove X11EventSource as soon as the window is deleted
gst_gl_window_x11_send_message do not use XSendEvent anymore
2017-12-09 19:31:30 +00:00
Sebastian Dröge
4e8c78a4da [789/906] egl: Create a window surface if necessary 2017-12-09 19:31:30 +00:00
Tonu Jaansoo
431ce49db3 [788/906] osx: Fix compilation 2017-12-09 19:31:30 +00:00
Tonu Jaansoo
c304635ecf [787/906] gl: The GLSL rectangle resampler does not always work with int tex coords
Use floats instead.
2017-12-09 19:31:30 +00:00
Sebastian Dröge
396717587e [786/906] glprototypes: Add support for NV extensions for DrawBuffers and ReadBuffer 2017-12-09 19:31:30 +00:00
Sebastian Dröge
b6207a10a2 [785/906] egl: Use EGL_KHR_surfaceless_context instead of creating a useless surface if available 2017-12-09 19:31:30 +00:00
Sebastian Dröge
82eb297aba [782/906] gldownload: Use strlen() instead of sizeof(char*)
gstgldownload.c:846:22: error: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
2017-12-09 19:31:30 +00:00
Matthew Waters
e32e8f45e0 [781/906] download: propogate errors from the GL thread 2017-12-09 19:31:30 +00:00
Matthew Waters
7c4d51edf4 [780/906] up/download: check return values
So we fail properly
2017-12-09 19:31:30 +00:00
Matthew Waters
13d487741a [779/906] download: remove _thread variants of the API 2017-12-09 19:31:30 +00:00
Matthew Waters
1f19143837 [778/906] upload: remove _thread variants of the API 2017-12-09 19:31:30 +00:00
Matthew Waters
d009a216e6 [777/906] upload: overhaul and addition of new video formats
use the shaders from eglglessink (adapted for Desktop GL)
error out properly
2017-12-09 19:31:30 +00:00
Matthew Waters
0df6a5e963 [776/906] download: fix compiler warning about missing string format 2017-12-09 19:31:30 +00:00
Sebastian Dröge
e4f45140d6 [775/906] configure: Check for GLeglImageOES and others again
https://bugzilla.gnome.org/show_bug.cgi?id=704498
2017-12-09 19:31:30 +00:00
Sebastian Dröge
fe0ad33572 [774/906] win32: Fix some compiler errors/warnings 2017-12-09 19:31:30 +00:00
Mathieu Duponchelle
47b9fb1d49 [773/906] glfilters: Mark writable-only properties as readable as well
https://bugzilla.gnome.org/show_bug.cgi?id=704429
2017-12-09 19:31:30 +00:00
Sebastian Dröge
8efcecb98c [771/906] gl: Some less long/ulong/gulong usage 2017-12-09 19:31:30 +00:00
Matthew Waters
49951beac8 [766/906] utils: generate a RGBA texture in all cases 2017-12-09 19:31:30 +00:00
Matthew Waters
d492036322 [765/906] wayland: remove fullscreen 2017-12-09 19:31:30 +00:00
Matthew Waters
2c6f8de516 [764/906] filter: fix pad template caps
upload is for the sink template
download is form the src template
2017-12-09 19:31:30 +00:00
Matthew Waters
8577de136e [763/906] memory: copy properly depending on where the most recent data is 2017-12-09 19:31:30 +00:00
Sebastian Dröge
5b1dd556de [762/906] glimagesink: Fix some memory leaks and properly set up the buffer pool 2017-12-09 19:31:30 +00:00
Sebastian Dröge
4f23429abb [761/906] x11: Protect event display connection with a mutex
We use it from different threads and need to serialize the
accesses to it.
2017-12-09 19:31:30 +00:00
Sebastian Dröge
9810469db0 [760/906] x11: Always use the same display connection from the GL thread
The other display connection might be used by async calls from elsewhere
at the same time.

https://bugzilla.gnome.org/show_bug.cgi?id=704247
2017-12-09 19:31:30 +00:00
Sebastian Dröge
bb4414ac7f [759/906] gldownload: #ifdef some GLES2 specific code to fix compilation 2017-12-09 19:31:30 +00:00
Sebastian Dröge
a41b21f4a5 [758/906] android: Don't require a window to be set
This allows the filters to be usable without a GL sink downstream.
2017-12-09 19:31:30 +00:00
Sebastian Dröge
0a6359fc59 [757/906] egl: Create an offscreen surface if no window was provided 2017-12-09 19:31:30 +00:00
Sebastian Dröge
1de089fe81 [756/906] gldownload: Reset the viewport after download RGB via GLES2 2017-12-09 19:31:29 +00:00
Sebastian Dröge
85a4f1042b [755/906] gldownload: Unbind framebuffer after downloading RGB with GLES2 2017-12-09 19:31:29 +00:00
Sebastian Dröge
f804d53a9c [754/906] gldownload: Add support for RGB reordering when using GLES2 2017-12-09 19:31:29 +00:00
Sebastian Dröge
b3eef9dd15 [753/906] gldisplay: Sending a message is synchronous, we can allocate the memory on the stack 2017-12-09 19:31:29 +00:00
Sebastian Dröge
b2934152ce [752/906] glwindow: Add destroy notifies for the data of the callbacks
And actually call the close callback when the window is closed.
2017-12-09 19:31:29 +00:00
Sebastian Dröge
ef68e5ade2 [751/906] gldisplay: Don't hold lock while sending a message to the GL thread
https://bugzilla.gnome.org/show_bug.cgi?id=704247
2017-12-09 19:31:29 +00:00
Sebastian Dröge
15438d5b7f [750/906] glupload: Add support for RGB reordering when using GLES2 2017-12-09 19:31:29 +00:00
Sebastian Dröge
9d4f99b8bb [749/906] glshader: Add some more debug output 2017-12-09 19:31:29 +00:00
Sebastian Dröge
b28a1e943d [748/906] glupload: GL_STENCIL_ATTACHMENT is needed for desktop GL, not GLES 2017-12-09 19:31:29 +00:00
Sebastian Dröge
6c5ce0ee99 [747/906] gl: Constify YUV conversion shaders 2017-12-09 19:31:29 +00:00
Sebastian Dröge
90450a39b7 [746/906] android: Add comment to clarify the type of a variable 2017-12-09 19:31:29 +00:00
Sebastian Dröge
d0293d9f0c [745/906] gl: Simplify and optimize YUV conversion shaders a bit 2017-12-09 19:31:29 +00:00
Sebastian Dröge
bbd9dd465c [744/906] gl: Use __GST_GL_H__ instead of __GL_H__ as a multi-include guard
GL/gl.h might use the latter already.
2017-12-09 19:31:29 +00:00
Sebastian Dröge
29874d3be6 [743/906] win32: Allow setting window handle before creating the context 2017-12-09 19:31:29 +00:00
Sebastian Dröge
bd60dd7f22 [742/906] cocoa: Allow setting window handle before creating the context 2017-12-09 19:31:29 +00:00
Sebastian Dröge
d937a7e899 [741/906] wayland: Don't leak main context and loop 2017-12-09 19:31:29 +00:00
Sebastian Dröge
09795ef023 [740/906] x11: Allow setting window handle before creating the context 2017-12-09 19:31:29 +00:00
Sebastian Dröge
764e682cd0 [739/906] x11: Don't leak main context and main loop 2017-12-09 19:31:29 +00:00
Sebastian Dröge
52b44e4c07 [738/906] gl: Include glu.h after gl.h 2017-12-09 19:31:29 +00:00
Sebastian Dröge
192b37980f [735/906] gl: Add support for Android
https://bugzilla.gnome.org/show_bug.cgi?id=703340
2017-12-09 19:31:29 +00:00
Sebastian Dröge
6a5bebebb9 [734/906] win32: Make automake happy by using noinst_HEADERS 2017-12-09 19:31:29 +00:00
Sebastian Dröge
f7998a2e98 [733/906] gl: Major header and include cleanup 2017-12-09 19:31:29 +00:00
Julien Isorce
d17a4381b1 [732/906] build: fix repeated typedefs
Write forward declarations in another way to avoid
repeated typedefs "error: redefinition of typedef".
Raised when using i686-apple-darwin11-llvm-gcc-4.2
It seems that C apple compiler does not support
C11 feature.

https://bugzilla.gnome.org/show_bug.cgi?id=703885
2017-12-09 19:31:29 +00:00
Julien Isorce
d4a8451c11 [731/906] cocoa: fix build when GNUSTEP is not defined 2017-12-09 19:31:29 +00:00
Sebastian Dröge
61dfdc19b9 [730/906] glcompat: Properly check for GLchar and other types
On Android for example these are no #defines but typedefs
2017-12-09 19:31:29 +00:00
Sebastian Dröge
341210eaa6 [729/906] gl: Include config.h everywhere 2017-12-09 19:31:29 +00:00
Sebastian Dröge
92c66f55bc [727/906] egl: Refactor EGL logic into a helper object 2017-12-09 19:31:29 +00:00
Matthew Waters
ac1a2297f5 [726/906] window: don't call a NULL destroy function 2017-12-09 19:31:29 +00:00
Matthew Waters
3c2810c3d6 [725/906] x11: use GMainContext/GMainLoop
allows us to be reentrant

https://bugzilla.gnome.org/show_bug.cgi?id=703445
2017-12-09 19:31:29 +00:00
Matthew Waters
17e4fe41d3 [724/906] wayland: make reentrant
https://bugzilla.gnome.org/show_bug.cgi?id=703445
2017-12-09 19:31:29 +00:00
Julien Isorce
bbc71ed90f [723/906] gstglwindow: close has to be called in the glthread.
Indeed 'glXMakeCurrent (window_x11->device, None, NULL);'
has to be called in the thread where the glcontext is actually
current.
Otherwise glXDestroyContext may crash.
2017-12-09 19:31:28 +00:00
Руслан Ижбулатов
9af1cee2f7 [722/906] gl: Fix build on Win32
1) Need to include GL/glext.h on W32 to provide necessary macros
2) W32 macros that pre-processor has by default are different for different
   toolchains. Borland uses __WIN32__, everyone else has _WIN32, so check both.

Side-note: glext.h is not supplied by mingw-w64 at the moment, but can be
downloaded from http://www.opengl.org/registry/

https://bugzilla.gnome.org/show_bug.cgi?id=703364
2017-12-09 19:31:28 +00:00
Sebastian Dröge
6c89d7e839 [721/906] glfilter: Use uint64 for the OpenGL context property
ulong/long properties are deprecated and should not be used anymore
for portability reasons.
2017-12-09 19:31:28 +00:00
Sebastian Dröge
685d855ded [719/906] gl: Fix compilation with GLES2 2017-12-09 19:31:28 +00:00
Matthew Waters
5b13d0ebf4 [718/906] shader: make it possible to unref in the non-GL thread 2017-12-09 19:31:28 +00:00
Matthew Waters
71c8edf9c0 [717/906] remove outdated cmake build files 2017-12-09 19:31:28 +00:00
Matthew Waters
bc5d65928f [716/906] wayland: properly choose EGL_RENDERABLE_TYPE
based on the gl api we chose
2017-12-09 19:31:28 +00:00
Matthew Waters
5ec9f248a1 [715/906] display: inherit from the right object class 2017-12-09 19:31:28 +00:00
Matthew Waters
1c84c0fb96 [714/906] Add GstGLFramebuffer to replace _display_gen_fbo and friends
This version is simply API compatible with _display_gen_fbo.
The next version will likely revamp the API
2017-12-09 19:31:28 +00:00
Matthew Waters
d7f5cac7ce [713/906] shader: make it possible to create the object in a non-GL thread 2017-12-09 19:31:28 +00:00
Matthew Waters
ef6b1ca760 [712/906] wayland: shutdown properly
We cannot use _finalize as this will be called before GstGLWindow's
_finalize.  This causes us to try and perform operations with the
wayland server when the connection has been severed.
2017-12-09 19:31:28 +00:00
Matthew Waters
380f918802 [711/906] wayland: support choosing Desktop GL as the api 2017-12-09 19:31:28 +00:00
Matthew Waters
951daee416 [710/906] window: fail if the user specifies an GL api that we cannot work with
It would've been caught later in an g_assert anyway.
2017-12-09 19:31:28 +00:00
Matthew Waters
2ae5b50fa4 [709/906] display: some more cleanups 2017-12-09 19:31:28 +00:00
Matthew Waters
6e86d0e920 [708/906] display: a cleanup and removal of old code 2017-12-09 19:31:28 +00:00
Matthew Waters
bdf5b5be0f [707/906] display: move error_message to utils 2017-12-09 19:31:28 +00:00
Matthew Waters
5bc069a5d5 [706/906] display: move activate_context into utils 2017-12-09 19:31:28 +00:00
Matthew Waters
4f117323b8 [705/906] x11: don't shutdown in _finalize
The window's loop could be still running when _finalize is called
and if we destroy the display connection it will never be closed.

Add _open and _close vfuncs to GstGLWindow so that subclasses can
start up and shutdown at the right time.
2017-12-09 19:31:28 +00:00
Matthew Waters
761bc0156a [704/906] Use gst_object_[un]ref so we can get refcounts in the log 2017-12-09 19:31:28 +00:00
Matthew Waters
9e7af77dc8 [703/906] x11: don't segfault if destroy_cb is NULL 2017-12-09 19:31:28 +00:00
Matthew Waters
5818b015d6 [702/906] x11: fix segfault if the x11 backend is instantiated but not used 2017-12-09 19:31:28 +00:00
Matthew Waters
c6988cb064 [701/906] display: move context creation into window 2017-12-09 19:31:28 +00:00
Matthew Waters
9c633e658a [700/906] display: move most of the code into utils for sorting later
This contains a hack that essentially requires one GstGLDisplay
per process.
2017-12-09 19:31:28 +00:00
Matthew Waters
38e0434d95 [699/906] display: remove list of upload and download objects
and only create an up/download object when needed.
2017-12-09 19:31:28 +00:00
Matthew Waters
81334a1af0 [698/906] move sink-specific stuff from GstGLDisplay into glimagesink 2017-12-09 19:31:28 +00:00
Matthew Waters
ad31c9f8e2 [697/906] display: allow the user to try and choose the GL api we use via env variable
GST_GL_API=opengl,opengl3,gles2,gles3
2017-12-09 19:31:28 +00:00
Matthew Waters
f5472457bf [696/906] glapi: fix memory leak from not freeing a string 2017-12-09 19:31:28 +00:00
Matthew Waters
06eb6f4965 [695/906] build: remove libtool warning about -version-info not used in convenience libraries 2017-12-09 19:31:28 +00:00
Matthew Waters
696477bbf6 [693/906] x11_glx: ask for a 3.0 GL Context
(falling back if needed)
2017-12-09 19:31:27 +00:00
Matthew Waters
957b4cf08b [692/906] window_x11: add XError trapping
some functions in GLX can fail if the implementation does not support
certain features we ask for (i.e. GL 3) bringing down the entire
application
2017-12-09 19:31:27 +00:00
Matthew Waters
d88a9c0044 [691/906] feature: make gst_gl_check_extension public
prevents duplication of code of extension string parsing in GstGLWindow's
2017-12-09 19:31:27 +00:00
Matthew Waters
df675e7335 [690/906] windowx11glx: use fbconfigs if supported 2017-12-09 19:31:27 +00:00
Matthew Waters
d71ab51c9f [688/906] display: properly shutdown if we error after context creation
The _finalize() code checks to see if the context was created before
attempting to destroy it.  We never did say that we had created the context.
2017-12-09 19:31:27 +00:00
Matthew Waters
01518880fa [685/906] filter: improve error handling 2017-12-09 19:31:27 +00:00
Matthew Waters
a9b5bfe9d7 [684/906] display: lack of format-string causing a compiler warning 2017-12-09 19:31:27 +00:00
Matthew Waters
94d1326a7f [683/906] feature: remove double free 2017-12-09 19:31:27 +00:00
Matthew Waters
1a04002052 [681/906] win32: fix gl api calls on 32-bit
win has the bright idea of having 5 different calling conventions.
we should probably use the right one so we don't crash from stack
corruption.
2017-12-09 19:31:27 +00:00
Matthew Waters
31a5beb3f3 [680/906] overlay: tentative port to new GstGLFuncs API 2017-12-09 19:31:27 +00:00
Matthew Waters
b9a10f8e15 [678/906] window_win32_wgl: implement wglGetProcAddress for extension functions 2017-12-09 19:31:27 +00:00
Matthew Waters
ed98971953 [677/906] memory: fix GSIZE printf format on win32 2017-12-09 19:31:27 +00:00
Matthew Waters
8d07dcbd5e [676/906] windwo_win32: port to new API 2017-12-09 19:31:27 +00:00
Matthew Waters
72ac429e57 [675/906] upload: provide nicer debugging 2017-12-09 19:31:27 +00:00
Matthew Waters
6e8099fa20 [674/906] feature: try and catch more GL extension functions
if we don't find the extension in core GL, try the extension version anyway
2017-12-09 19:31:27 +00:00
Matthew Waters
1198b27830 [673/906] feature: add gstreamer license 2017-12-09 19:31:27 +00:00
Matthew Waters
792f055db4 [672/906] display: constify GstGLFuncs *gl 2017-12-09 19:31:27 +00:00
Matthew Waters
267bf848de [671/906] win32: #include GL/glext.h on windows
also add some GL default variables if some GL types are not defined
2017-12-09 19:31:27 +00:00
Matthew Waters
dba83ebbd3 [670/906] display: replace glib deprecated api 2017-12-09 19:31:27 +00:00
Matthew Waters
7d4d1f50d4 [669/906] window: seperate object creation and context creation 2017-12-09 19:31:27 +00:00
Matthew Waters
63a5d9e981 [668/906] shader: fix gles2 segfault 2017-12-09 19:31:27 +00:00
Matthew Waters
0cc3150e37 [658/906] mixer: fix eos timestamp check 2017-12-09 19:31:27 +00:00
Matthew Waters
535074cc87 [655/906] download: remove erronous ReadBuffer call
- it was causing segfaults in mesa
- we didn't set the readbuffer so we shouldn't reset it
2017-12-09 19:31:27 +00:00
Matthew Waters
ccfa7d674a [652/906] bumper: port to non-GLEW + arrays 2017-12-09 19:31:27 +00:00
Matthew Waters
847e6540fb [651/906] up/download: fix some typos when removing GLEW 2017-12-09 19:31:27 +00:00
Matthew Waters
173467e48a [650/906] filter: fix _draw_texture()'s wrong vertices 2017-12-09 19:31:27 +00:00
Matthew Waters
6bee9b9c93 [647/906] remove dependecy on glew 2017-12-09 19:31:27 +00:00
Matthew Waters
17fdb480d0 [646/906] some gl header fixes/additions 2017-12-09 19:31:27 +00:00
Matthew Waters
2f2916dd50 [645/906] fix gles2 compilation 2017-12-09 19:31:27 +00:00
Matthew Waters
57e209a423 [644/906] update .gitignore for some new files 2017-12-09 19:31:27 +00:00
Matthew Waters
c692a610de [643/906] display: privatise most of the struct 2017-12-09 19:31:26 +00:00
Matthew Waters
e983f02e87 [642/906] add gstglconfig.h for apps to find out what our capabilites are
ie libgstgl can be compiled with any combination of opengl/gles2
2017-12-09 19:31:26 +00:00
Matthew Waters
8375116c4b [641/906] display: feature check for GL extension functions 2017-12-09 19:31:26 +00:00
Matthew Waters
a87b070abb [640/906] build: add missing file to built sources 2017-12-09 19:31:26 +00:00
Matthew Waters
4a886e91e4 [639/906] add get_proc_address implementations for egl and glx 2017-12-09 19:31:26 +00:00
Matthew Waters
4a024734da [638/906] window: add get_proc_address + stub for retrieving gl functions 2017-12-09 19:31:26 +00:00
Matthew Waters
87e5cd6777 [637/906] x11_egl: add prelim support for choosing opengl or gles 2017-12-09 19:31:26 +00:00
Matthew Waters
59cb56fa4d [636/906] window_x11: compact debug info 2017-12-09 19:31:26 +00:00
Matthew Waters
17e6d70dba [635/906] fixup compile errors 2017-12-09 19:31:26 +00:00
Matthew Waters
68b4ddff12 [634/906] wayland egl: deactivate context before we destroy it
avoids a segfault with dri drivers
2017-12-09 19:31:26 +00:00
Matthew Waters
db236c510f [633/906] display: fail properly in context creation in order to minimize a race condition
previously, on context creation, when we failed to get a valid context
we would still atempt to run the window mainloop as well as setting an error
on the display. This would cause the calling element to finalize the display
and therefore attempt to quit the window mainloop.  However the mainloop
may not have started running.  Thus when the window mainloop ran it would
never a get a quit message and never end.
2017-12-09 19:31:26 +00:00
Matthew Waters
12b045af81 [631/906] remove redefinition warnings in compiling tests 2017-12-09 19:31:26 +00:00
Matthew Waters
1ec4ffc824 [630/906] display: add gl api checking
i.e. check for cases where the window wants a different API than
what the library was compiled with
2017-12-09 19:31:26 +00:00
Matthew Waters
c3526080aa [629/906] window: add GError for error handling of context creation 2017-12-09 19:31:26 +00:00