Commit graph

1576 commits

Author SHA1 Message Date
Julien Isorce
c806125e15 [810/906] gstglutils: use gl_vtable for glDeleteTextures 2014-03-15 18:37:02 +01:00
Matthew Waters
135ea8e562 [808/906] x11: remove dead code 2014-03-15 18:37:02 +01:00
Matthew Waters
311592f8b1 [807/906] context: Move some window error enums to context 2014-03-15 18:37:02 +01:00
Matthew Waters
cb7bf213fe [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.
2014-03-15 18:37:01 +01:00
Matthew Waters
93692c7437 [805/906] glfilter: rename external-opengl-context prop to other-context
It now requires a GstGLContext instead of a handle
2014-03-15 18:37:01 +01:00
Julien Isorce
6497947186 [804/906] rpi: call bcm_host_init in plugin_init 2014-03-15 18:37:01 +01:00
Julien Isorce
561a71c244 [803/906] raspberrypi: add support for dispmanx
See https://bugzilla.gnome.org/show_bug.cgi?id=703342
2014-03-15 18:37:01 +01:00
Matthew Waters
b24021b1ac [801/906] context: Reimplement GL context sharing
https://bugzilla.gnome.org/show_bug.cgi?id=704806
2014-03-15 18:37:01 +01:00
Matthew Waters
5e0217d4dd [798/906] build: install needed header 2014-03-15 18:37:01 +01:00
Matthew Waters
c639a2d126 [797/906] x11: fix build for clang 2014-03-15 18:37:01 +01:00
Matthew Waters
32f40b28a5 [796/906] move egl into its own directory 2014-03-15 18:37:01 +01:00
Matthew Waters
f7d4776c7d [795/906] android: port to GstGLContext
not tested
2014-03-15 18:37:01 +01:00
Matthew Waters
95c08c2ee2 [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)
2014-03-15 18:37:01 +01:00
Matthew Waters
cf5e910d9b [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.
2014-03-15 18:37:01 +01:00
Matthew Waters
b5d595f402 [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
2014-03-15 18:37:01 +01:00
Julien Isorce
bfac5a8d76 [791/906] glwindow/x11: remove X11EventSource as soon as the window is deleted
gst_gl_window_x11_send_message do not use XSendEvent anymore
2014-03-15 18:37:01 +01:00
Sebastian Dröge
7bd7d7a48f [789/906] egl: Create a window surface if necessary 2014-03-15 18:37:00 +01:00
Tonu Jaansoo
3662fa14c6 [788/906] osx: Fix compilation 2014-03-15 18:37:00 +01:00
Tonu Jaansoo
e45dfb2f93 [787/906] gl: The GLSL rectangle resampler does not always work with int tex coords
Use floats instead.
2014-03-15 18:37:00 +01:00
Sebastian Dröge
52052a758a [786/906] glprototypes: Add support for NV extensions for DrawBuffers and ReadBuffer 2014-03-15 18:37:00 +01:00
Sebastian Dröge
ba1403fdd4 [785/906] egl: Use EGL_KHR_surfaceless_context instead of creating a useless surface if available 2014-03-15 18:37:00 +01:00
Sebastian Dröge
4f356f999c [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]
2014-03-15 18:37:00 +01:00
Matthew Waters
3130ac1596 [781/906] download: propogate errors from the GL thread 2014-03-15 18:37:00 +01:00
Matthew Waters
f590a1ce23 [780/906] up/download: check return values
So we fail properly
2014-03-15 18:37:00 +01:00
Matthew Waters
41a89bafce [779/906] download: remove _thread variants of the API 2014-03-15 18:37:00 +01:00
Matthew Waters
01a4472b7f [778/906] upload: remove _thread variants of the API 2014-03-15 18:37:00 +01:00
Matthew Waters
a4445ea016 [777/906] upload: overhaul and addition of new video formats
use the shaders from eglglessink (adapted for Desktop GL)
error out properly
2014-03-15 18:37:00 +01:00
Matthew Waters
26e46d449c [776/906] download: fix compiler warning about missing string format 2014-03-15 18:37:00 +01:00
Sebastian Dröge
228474806c [775/906] configure: Check for GLeglImageOES and others again
https://bugzilla.gnome.org/show_bug.cgi?id=704498
2014-03-15 18:37:00 +01:00
Sebastian Dröge
3900c6750c [774/906] win32: Fix some compiler errors/warnings 2014-03-15 18:37:00 +01:00
Mathieu Duponchelle
b26c4dbe4e [773/906] glfilters: Mark writable-only properties as readable as well
https://bugzilla.gnome.org/show_bug.cgi?id=704429
2014-03-15 18:37:00 +01:00
Sebastian Dröge
20cb4fb038 [771/906] gl: Some less long/ulong/gulong usage 2014-03-15 18:36:59 +01:00
Matthew Waters
10ca3beee6 [766/906] utils: generate a RGBA texture in all cases 2014-03-15 18:36:59 +01:00
Matthew Waters
3f90c6fbfd [765/906] wayland: remove fullscreen 2014-03-15 18:36:59 +01:00
Matthew Waters
6b213b1dae [764/906] filter: fix pad template caps
upload is for the sink template
download is form the src template
2014-03-15 18:36:59 +01:00
Matthew Waters
71a70e78f6 [763/906] memory: copy properly depending on where the most recent data is 2014-03-15 18:36:59 +01:00
Sebastian Dröge
f6f0c4ddad [762/906] glimagesink: Fix some memory leaks and properly set up the buffer pool 2014-03-15 18:36:59 +01:00
Sebastian Dröge
380ab312ca [761/906] x11: Protect event display connection with a mutex
We use it from different threads and need to serialize the
accesses to it.
2014-03-15 18:36:59 +01:00
Sebastian Dröge
ddfc527857 [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
2014-03-15 18:36:59 +01:00
Sebastian Dröge
1a6b357b39 [759/906] gldownload: #ifdef some GLES2 specific code to fix compilation 2014-03-15 18:36:59 +01:00
Sebastian Dröge
030c8ed624 [758/906] android: Don't require a window to be set
This allows the filters to be usable without a GL sink downstream.
2014-03-15 18:36:59 +01:00
Sebastian Dröge
39b6b5c272 [757/906] egl: Create an offscreen surface if no window was provided 2014-03-15 18:36:59 +01:00
Sebastian Dröge
7551b627e8 [756/906] gldownload: Reset the viewport after download RGB via GLES2 2014-03-15 18:36:59 +01:00
Sebastian Dröge
62f9105715 [755/906] gldownload: Unbind framebuffer after downloading RGB with GLES2 2014-03-15 18:36:59 +01:00
Sebastian Dröge
743ad83b06 [754/906] gldownload: Add support for RGB reordering when using GLES2 2014-03-15 18:36:58 +01:00
Sebastian Dröge
f4e76a9367 [753/906] gldisplay: Sending a message is synchronous, we can allocate the memory on the stack 2014-03-15 18:36:58 +01:00
Sebastian Dröge
2b6e54d416 [752/906] glwindow: Add destroy notifies for the data of the callbacks
And actually call the close callback when the window is closed.
2014-03-15 18:36:58 +01:00
Sebastian Dröge
7dba9d0dce [751/906] gldisplay: Don't hold lock while sending a message to the GL thread
https://bugzilla.gnome.org/show_bug.cgi?id=704247
2014-03-15 18:36:58 +01:00
Sebastian Dröge
60aefacd32 [750/906] glupload: Add support for RGB reordering when using GLES2 2014-03-15 18:36:58 +01:00
Sebastian Dröge
d87a0eaf1d [749/906] glshader: Add some more debug output 2014-03-15 18:36:58 +01:00
Sebastian Dröge
258bb6fb81 [748/906] glupload: GL_STENCIL_ATTACHMENT is needed for desktop GL, not GLES 2014-03-15 18:36:58 +01:00
Sebastian Dröge
f36efba6da [747/906] gl: Constify YUV conversion shaders 2014-03-15 18:36:58 +01:00
Sebastian Dröge
98e5077b8f [746/906] android: Add comment to clarify the type of a variable 2014-03-15 18:36:58 +01:00
Sebastian Dröge
01ce41f684 [745/906] gl: Simplify and optimize YUV conversion shaders a bit 2014-03-15 18:36:58 +01:00
Sebastian Dröge
d7f69c3d93 [744/906] gl: Use __GST_GL_H__ instead of __GL_H__ as a multi-include guard
GL/gl.h might use the latter already.
2014-03-15 18:36:58 +01:00
Sebastian Dröge
4c7388be18 [743/906] win32: Allow setting window handle before creating the context 2014-03-15 18:36:58 +01:00
Sebastian Dröge
d00770cec0 [742/906] cocoa: Allow setting window handle before creating the context 2014-03-15 18:36:58 +01:00
Sebastian Dröge
f36ee81a84 [741/906] wayland: Don't leak main context and loop 2014-03-15 18:36:58 +01:00
Sebastian Dröge
7fffd9097e [740/906] x11: Allow setting window handle before creating the context 2014-03-15 18:36:58 +01:00
Sebastian Dröge
c479544540 [739/906] x11: Don't leak main context and main loop 2014-03-15 18:36:58 +01:00
Sebastian Dröge
16a5316755 [738/906] gl: Include glu.h after gl.h 2014-03-15 18:36:58 +01:00
Sebastian Dröge
a77992c658 [735/906] gl: Add support for Android
https://bugzilla.gnome.org/show_bug.cgi?id=703340
2014-03-15 18:36:57 +01:00
Sebastian Dröge
83d066b0a5 [734/906] win32: Make automake happy by using noinst_HEADERS 2014-03-15 18:36:57 +01:00
Sebastian Dröge
a5a46aa833 [733/906] gl: Major header and include cleanup 2014-03-15 18:36:57 +01:00
Julien Isorce
dd7e054e2c [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
2014-03-15 18:36:57 +01:00
Julien Isorce
3c0b9715a9 [731/906] cocoa: fix build when GNUSTEP is not defined 2014-03-15 18:36:57 +01:00
Sebastian Dröge
a98180cd53 [730/906] glcompat: Properly check for GLchar and other types
On Android for example these are no #defines but typedefs
2014-03-15 18:36:57 +01:00
Sebastian Dröge
19dff69a2e [729/906] gl: Include config.h everywhere 2014-03-15 18:36:57 +01:00
Sebastian Dröge
a8d5b21013 [727/906] egl: Refactor EGL logic into a helper object 2014-03-15 18:36:57 +01:00
Matthew Waters
908cc1989b [726/906] window: don't call a NULL destroy function 2014-03-15 18:36:57 +01:00
Matthew Waters
f9d46c29ca [725/906] x11: use GMainContext/GMainLoop
allows us to be reentrant

https://bugzilla.gnome.org/show_bug.cgi?id=703445
2014-03-15 18:36:57 +01:00
Matthew Waters
96deb2fba3 [724/906] wayland: make reentrant
https://bugzilla.gnome.org/show_bug.cgi?id=703445
2014-03-15 18:36:57 +01:00
Julien Isorce
ba19813816 [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.
2014-03-15 18:36:57 +01:00
Руслан Ижбулатов
89a6d7ef5d [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
2014-03-15 18:36:57 +01:00
Sebastian Dröge
c07d72f768 [721/906] glfilter: Use uint64 for the OpenGL context property
ulong/long properties are deprecated and should not be used anymore
for portability reasons.
2014-03-15 18:36:57 +01:00
Sebastian Dröge
98cca97840 [719/906] gl: Fix compilation with GLES2 2014-03-15 18:36:56 +01:00
Matthew Waters
11b810fcf5 [718/906] shader: make it possible to unref in the non-GL thread 2014-03-15 18:36:56 +01:00
Matthew Waters
a5b877fb13 [717/906] remove outdated cmake build files 2014-03-15 18:36:56 +01:00
Matthew Waters
f6a9c807f6 [716/906] wayland: properly choose EGL_RENDERABLE_TYPE
based on the gl api we chose
2014-03-15 18:36:56 +01:00
Matthew Waters
cdbe8c2d0e [715/906] display: inherit from the right object class 2014-03-15 18:36:56 +01:00
Matthew Waters
4646a1e95e [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
2014-03-15 18:36:56 +01:00
Matthew Waters
09496fc8a1 [713/906] shader: make it possible to create the object in a non-GL thread 2014-03-15 18:36:56 +01:00
Matthew Waters
4801abb13a [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.
2014-03-15 18:36:56 +01:00
Matthew Waters
118b947e57 [711/906] wayland: support choosing Desktop GL as the api 2014-03-15 18:36:56 +01:00
Matthew Waters
c748fb7999 [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.
2014-03-15 18:36:56 +01:00
Matthew Waters
53753ad2e6 [709/906] display: some more cleanups 2014-03-15 18:36:56 +01:00
Matthew Waters
c60d94f1bc [708/906] display: a cleanup and removal of old code 2014-03-15 18:36:56 +01:00
Matthew Waters
c799696b48 [707/906] display: move error_message to utils 2014-03-15 18:36:56 +01:00
Matthew Waters
393b483743 [706/906] display: move activate_context into utils 2014-03-15 18:36:56 +01:00
Matthew Waters
ac4db593f8 [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.
2014-03-15 18:36:56 +01:00
Matthew Waters
13067b104c [704/906] Use gst_object_[un]ref so we can get refcounts in the log 2014-03-15 18:36:56 +01:00
Matthew Waters
2d69905592 [703/906] x11: don't segfault if destroy_cb is NULL 2014-03-15 18:36:55 +01:00
Matthew Waters
6dfee9c975 [702/906] x11: fix segfault if the x11 backend is instantiated but not used 2014-03-15 18:36:55 +01:00
Matthew Waters
dbeb6a911b [701/906] display: move context creation into window 2014-03-15 18:36:55 +01:00
Matthew Waters
5841abc5e4 [700/906] display: move most of the code into utils for sorting later
This contains a hack that essentially requires one GstGLDisplay
per process.
2014-03-15 18:36:55 +01:00
Matthew Waters
96114e62cb [699/906] display: remove list of upload and download objects
and only create an up/download object when needed.
2014-03-15 18:36:55 +01:00
Matthew Waters
d76a61608d [698/906] move sink-specific stuff from GstGLDisplay into glimagesink 2014-03-15 18:36:55 +01:00
Matthew Waters
ba9e2213fc [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
2014-03-15 18:36:55 +01:00
Matthew Waters
db3c98c688 [696/906] glapi: fix memory leak from not freeing a string 2014-03-15 18:36:55 +01:00
Matthew Waters
9adc3c8cf3 [695/906] build: remove libtool warning about -version-info not used in convenience libraries 2014-03-15 18:36:55 +01:00