Nicolas Dufresne
801f11e36b
gl/x11: Removed unused variable
2017-12-09 19:31:37 +00:00
Sebastian Dröge
8f156591e5
gl/x11: Get rid of unneeded second display connection and do everything from the main loop
2017-12-09 19:31:37 +00:00
Sebastian Dröge
a0a133288e
gl/x11: Block rendering until swapbuffers is called and don't go via X11 events as unneeded indirection
...
This should fix QoS problems, where basesink believed it was rendering with
20FPS but actually we were just queueing up X11 Expose events and only once
in a while something was rendered.
2017-12-09 19:31:37 +00:00
Matthew Waters
e225af3e0d
gl: silence all the compiler warnings
2017-12-09 19:31:34 +00:00
Matthew Waters
8f29fffc2f
[893/906] x11: close both of the display's we use
...
(the comment doesn't seem to apply anymore)
https://bugzilla.gnome.org/show_bug.cgi?id=725048
2017-12-09 19:31:33 +00:00
Matthew Waters
303b77eeff
[890/906] x11: add display subclass
...
GstGLDisplayX11 holds the display connection and name. Each thread requires
it's own X11 Display connection (initialised from name) due to the fact that
we do not want to call XInitThreads(). Doing so would result in segfaults
when integrating with GUI toolkits Gtk, Qt, etc.
The Display connection is for OpenGL platforms where a constant display is
required in order to share contexts (egl). In the case of a wrapped context
(added later), we do not have GstGLWindow to retreive the display from so a
'master' connection is used instead.
2017-12-09 19:31:33 +00:00
Chris Paulson-Ellis
b6f6d585c3
[877/906] x11: Use correct format string for guintptr
...
https://bugzilla.gnome.org/show_bug.cgi?id=723537
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
Julien Isorce
0a2787863b
[832/906] x11: ignore Expose events not initiated by gst_gl_window_draw
2017-12-09 19:31:32 +00:00
Julien Isorce
0da88c6516
[825/906] glwindow_x11: check if the loop exists
...
It happens when calling set_window_handle before to reach GST_STATE_READY.
In this case the parent is set when creating the internal window.
2017-12-09 19:31:32 +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
f7c8658464
[816/906] x11: fix make check segfault
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
72cc3c4815
[797/906] x11: fix build for clang
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
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
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
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
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
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
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
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
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
7d4d1f50d4
[669/906] window: seperate object creation and context creation
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
59cb56fa4d
[636/906] window_x11: compact debug info
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
0be301af24
[621/906] GstGLRendererAPI => GstGLAPI and get GstGLAPI from a window
2017-12-09 19:31:26 +00:00
Matthew Waters
d169907472
[617/906] fix 'set but not used' compiler warnings
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