Commit graph

30 commits

Author SHA1 Message Date
Nirbheek Chauhan
6106816f50 gstgl: Add GST_EXPORT to all symbols used on Windows
This is a requirement for those symbols to be exported in gstgl-1.0.dll
when building with the MSVC compiler
2017-12-09 19:32:23 +00:00
Matthew Waters
1e8c7e0f31 gl: add necessary padding bytes to all public structs 2017-12-09 19:32:22 +00:00
Matthew Waters
31b1094744 gl: misc docs fixes/additions 2017-12-09 19:32:17 +00:00
Matthew Waters
5f87cc0b65 glcontext: add a method to add a context to another share group
Intended for use with wrapped contexts that are created shared with gst's
gl contexts in order to manage the internal sharegroup state correctly.

e.g. with caopengllayer (which is used in glimagesink and caopengllayersink
on OS X), we create a CGL context from the gst context and the sharing state
was not being correctly set on either GL context and gst_gl_context_is_shared()
was always returning FALSE.

With 11fb4fff80 only flushing with multiple
shared contexts, the required flush was not occuring causing screen
corruption or stuttering.

Note: this didn't affect GST_GL_API=opengl pipelines

https://bugzilla.gnome.org/show_bug.cgi?id=762620
2017-12-09 19:32:17 +00:00
Matthew Waters
472970324c glcontext: implement checking whether a context has been shared
Some operations are unnecessary when running with only a single GL
context.
e.g. glFlush when setting a fence object as the flush happens on wait.

API: gst_gl_context_is_shared
2017-12-09 19:32:14 +00:00
Matthew Waters
06de6998e5 gl: be consistent in gobject boilerpate
GST_GL_IS_* vs GST_IS_GL_*

git grep -l 'GST_GL_IS_' | xargs sed -i 's/GST_GL_IS_/GST_IS_GL_/g'
2017-12-09 19:32:09 +00:00
Matthew Waters
66407b9877 glcontext: fix get_current_gl_api on x11/nvidia drivers
They require to get_proc_address some functions through the
platform specific {glX,egl}GetProcAddress rather than the default
GL library symbol lookup.
2017-12-09 19:32:05 +00:00
Matthew Waters
cfa9b94045 glcontext: consolidate get_proc_address function definition
Pass the GstGLAPI directly.
2017-12-09 19:32:05 +00:00
Julien Isorce
38a1939ea1 glcontext: move display from priv
https://bugzilla.gnome.org/show_bug.cgi?id=750310
2017-12-09 19:32:04 +00:00
Julien Isorce
cbc3f1242f Revert "glcontext: add gst_gl_context_set_display helper"
This reverts commit 71b8103cbd.
2017-12-09 19:32:04 +00:00
Julien Isorce
5849a9f657 glcontext: add gst_gl_context_set_display helper 2017-12-09 19:32:02 +00:00
Julien Isorce
bad3e16601 glcontext: add missing _CAST after G_TYPE_CHECK_CLASS 2017-12-09 19:32:02 +00:00
Matthew Waters
d44594c622 glcontext: store the thread current context 2017-12-09 19:31:57 +00:00
Edward Hervey
6d6c7f1f19 gl: Make glcontext debug category used in more places
As a bonus it makes the egl context debug messages visible now :)
2017-12-09 19:31:54 +00:00
Matthew Waters
bef3f020a6 glcontext: allow wrapped contexts to be utilised like non-wrapped contexts
Fill in the missing pieces like get_proc_address, the gl function vtable
2017-12-09 19:31:52 +00:00
Matthew Waters
be5d0d81e4 glcontext: add api for retreiving the current context and api
that is current in the calling thread.
2017-12-09 19:31:48 +00:00
Matthew Waters
14630fac38 glcontext: add gst_gl_context_can_share
Which determines whether two GstGLContext's can share sharable
OpenGL resources.
2017-12-09 19:31:46 +00:00
Matthew Waters
4e75ceba46 glcontext: add API to retreive the thread that context is active in 2017-12-09 19:31:46 +00:00
Matthew Waters
4277d2742a glcontext: add a destroy function
that just calls the subclass
2017-12-09 19:31:45 +00:00
Matthew Waters
babef3069b gl/context: add check_gl_version 2017-12-09 19:31:42 +00:00
Julien Isorce
67c18fee19 gl: add missing cgl and eagl context type
https://bugzilla.gnome.org/show_bug.cgi?id=729245
2017-12-09 19:31:41 +00:00
Matthew Waters
166d7b505c gl/context: add generic feature checking
At the moment it simply delegates to the subclass.
2017-12-09 19:31:40 +00:00
Matthew Waters
857200ff40 gl: make all GObjects inherit from GstObject
Aids memory leak debugging with GST_TRACE=mem-live
2017-12-09 19:31:39 +00:00
Matthew Waters
1460d22e92 gl/context: provide get_gl_version 2017-12-09 19:31:36 +00:00
Matthew Waters
97f6bc0bfc [891/906] context: add support for wrapping external contexts 2017-12-09 19:31:33 +00:00
Matthew Waters
d6bdcbe751 [856/906] context: document it 2017-12-09 19:31:32 +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
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
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