Xavier Claessens
77e1e70fdc
gl: win32: fix crash when finalizing GstGLContext
...
gst_gl_context_finalize() is calling gst_gl_window_win32_quit()
which was posting a message. But then window_proc takes window's
context and get a NULL.
Now that we've got a GMainLoop we can do like other backends and
simply call g_main_loop_quit().
This also remove duplicated code to release the parent window and
potential crash there because parent_proc could be NULL if we never
created the internal window. That could happen for example if setting
state to READY then setting a window_handle, and go back to NULL state.
https://bugzilla.gnome.org/show_bug.cgi?id=749601
2017-12-09 19:32:02 +00:00
Xavier Claessens
db0380a9ee
gl: win32: Fix leaked GstGLContext
...
https://bugzilla.gnome.org/show_bug.cgi?id=749601
2017-12-09 19:32:02 +00:00
Xavier Claessens
8f268785d6
gl: win32: set the parent window when creating internal window
...
When _set_window_handle() was called in READY state, it wasn't
set to the internal window created later.
https://bugzilla.gnome.org/show_bug.cgi?id=749601
2017-12-09 19:32:02 +00:00
Xavier Claessens
886ea15c52
gl: win32: use a GMainContext to dispatch win32 messages
...
gst_gl_window_win32_send_message_async() could be called before the
internal window is created so we cannot use PostMessage there.
x11 and wayland backends both create a custom GSource for this,
so there is no reason to not do that for win32.
https://bugzilla.gnome.org/show_bug.cgi?id=749601
2017-12-09 19:32:02 +00:00
Matthew Waters
66cec1c47a
gl/win32: fixup compilation
2017-12-09 19:31:53 +00:00
Matthew Waters
598715fc4b
glwindow: make showing a window explicit
...
Also fixes the cgl context always displaying a window to render to for
every GstGLContextCocoa created
2017-12-09 19:31:53 +00:00
Matthew Waters
019367c128
glwindow: remove width/height from _draw()
...
Depending on the platform, it was only ever implemented to 1) set a
default surface size, 2) resize based on the video frame or 3) nothing.
Instead, provide a set_preferred_size () that elements/applications
can use to request a certain size which may be ignored for
videooverlay/other cases.
2017-12-09 19:31:53 +00:00
Matthew Waters
7d97a35139
glcontext: add more functionality to wrapped contexts
...
Implements get_current_context() and get_proc_address() for wrapped
contexts.
2017-12-09 19:31:49 +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
1f6fceafa4
gl/win32: make send_message reentrant
...
I could not find a comparable win32API function so keep the running
thread pointer to compare against.
https://bugzilla.gnome.org/show_bug.cgi?id=730782
2017-12-09 19:31:41 +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
6491e4d275
gl: fix out-of-source builds pt2
...
21b897de2f
did this for x11 and wayland.
Do it for the other backends as well.
2017-12-09 19:31:35 +00:00
Matthew Waters
0fa966bb3d
gl: remove explicit reference to X_CFLAGS
...
They are in GL_CFLAGS if required
2017-12-09 19:31:35 +00:00
Matthew Waters
350981b14c
gl/win32: use the correct include and gst-indent
2017-12-09 19:31:35 +00:00
Wang Xin-yu (王昕宇)
369bee2031
gl: use wglCreateContextAttribsARB to create share context
...
https://bugzilla.gnome.org/show_bug.cgi?id=726494
2017-12-09 19:31:35 +00:00
Julien Isorce
b30d15d4b8
gl: keep only one occurence of '#include <EGL/egl.h>'
...
To simply maintainance if we need to put specific includes around it.
2017-12-09 19:31:34 +00:00
Matthew Waters
97f6bc0bfc
[891/906] context: add support for wrapping external contexts
2017-12-09 19:31:33 +00:00
Matthew Waters
2026f60879
[862/906] window: remove set_need_lock
...
No-one is using it. The only code that did was the x11 one which
doesn't need it anymore.
2017-12-09 19:31:33 +00:00
Matthew Waters
3b1ec77cf8
[818/906] window: add send_message_async vmethod
...
- provide a default synchronous send_message
- make context creation threadsafe again
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
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
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
Sebastian Dröge
fe0ad33572
[774/906] win32: Fix some compiler errors/warnings
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
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
29874d3be6
[743/906] win32: Allow setting window handle before creating the context
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
Matthew Waters
ac1a2297f5
[726/906] window: don't call a NULL destroy function
2017-12-09 19:31:29 +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
b9a10f8e15
[678/906] window_win32_wgl: implement wglGetProcAddress for extension functions
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
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
c3526080aa
[629/906] window: add GError for error handling of context creation
2017-12-09 19:31:26 +00:00
Matthew Waters
ee992ec531
[623/906] move GL includes into a single file
2017-12-09 19:31:26 +00:00
Matthew Waters
0be301af24
[621/906] GstGLRendererAPI => GstGLAPI and get GstGLAPI from a window
2017-12-09 19:31:26 +00:00
Matthew Waters
62e6b36cd0
[619/906] fix typo for win32 debug variables
2017-12-09 19:31:26 +00:00
Matthew Waters
80fdf4c30c
[616/906] move window-specific code into seperate subfolders
2017-12-09 19:31:26 +00:00