Commit graph

521 commits

Author SHA1 Message Date
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