Commit graph

37 commits

Author SHA1 Message Date
Matthew Waters
c247be334a gl: make all GObjects inherit from GstObject
Aids memory leak debugging with GST_TRACE=mem-live
2014-05-08 15:33:43 +10:00
Matthew Waters
8743301af9 gl/window: fix string length check for eagl 2014-05-06 21:08:30 +10:00
Sebastian Dröge
ae81268565 gl: Add support for iOS EAGL platform
https://bugzilla.gnome.org/show_bug.cgi?id=703341
2014-04-12 22:25:13 +02:00
Matthew Waters
b67af0e314 gl/window: add a dummy window class
Effective for the case where we have a platform that does not
require a native window.  We require a mainloop to run the GL
commands which is currently operated by GstGLWindow.
2014-03-17 10:44:32 +01:00
Matthew Waters
0d1d42b205 [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.
2014-03-15 18:37:06 +01:00
Matthew Waters
7b031f648c [863/906] window: hold a ref to our GstGLDisplay 2014-03-15 18:37:05 +01:00
Matthew Waters
cf7838a0b6 [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.
2014-03-15 18:37:05 +01:00
Matthew Waters
3049627b87 [859/906] window: provide some documetation 2014-03-15 18:37:05 +01:00
Julien Isorce
f506e80686 [841/906] osx: allow x11/glx backend and set default runtime to cocoa/nsgl
https://bugzilla.gnome.org/show_bug.cgi?id=719757
2014-03-15 18:37:04 +01:00
Julien Isorce
6fcd8b7206 [835/906] gstglwindow: remove unused fields 2014-03-15 18:37:03 +01:00
Julien Isorce
e5ed59e61c [834/906] gstglwindow: clear mutex 2014-03-15 18:37:03 +01:00
Julien Isorce
c775bf584b [831/906] glimagesink: avoid to overload the drawer if already drawing
Especially if the application calls gst_video_overlay_expose a lot
2014-03-15 18:37:03 +01:00
Julien Isorce
979633ed1f [820/906] gstglwindow: if available use wayland instead dispmanx on rpi 2014-03-15 18:37:02 +01:00
Matthew Waters
db1c7a242b [818/906] window: add send_message_async vmethod
- provide a default synchronous send_message
- make context creation threadsafe again
2014-03-15 18:37:02 +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
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
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
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
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
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
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
c60d94f1bc [708/906] display: a cleanup and removal of old code 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
dbeb6a911b [701/906] display: move context creation into window 2014-03-15 18:36:55 +01:00
Matthew Waters
9e8eb32080 [669/906] window: seperate object creation and context creation 2014-03-15 18:36:53 +01:00
Matthew Waters
fa3c3b8434 [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
2014-03-15 18:36:52 +01:00
Matthew Waters
4afc9f01e0 [638/906] window: add get_proc_address + stub for retrieving gl functions 2014-03-15 18:36:52 +01:00
Matthew Waters
76dfdd656f [629/906] window: add GError for error handling of context creation 2014-03-15 18:36:51 +01:00
Matthew Waters
fd998dc0a5 [621/906] GstGLRendererAPI => GstGLAPI and get GstGLAPI from a window 2014-03-15 18:36:51 +01:00
Matthew Waters
4a07c73c0c [618/906] add wayland-egl window backend 2014-03-15 18:36:50 +01:00
Matthew Waters
1679a0be7e [616/906] move window-specific code into seperate subfolders 2014-03-15 18:36:50 +01:00
Matthew Waters
6781fdbcff [611/906] cocoa port of determining gl platform at runtime 2014-03-15 18:36:50 +01:00
Matthew Waters
3cf1b078bc [609/906] win32 port of determining GL platform at runtime
- add GstGLWindowWin32 and GstGLWindowWin32WGL along the same lines as the
  X11 variants
2014-03-15 18:36:50 +01:00
Matthew Waters
0c66b39861 [607/906] remove get_platform and get_window_handle vfuncs
- rename choose_visual() to choose_format() for later incorporating
  win32 changes and new GstGLPlatform for WGL, EGL, GLX, etc.
2014-03-15 18:36:50 +01:00
Matthew Waters
1984fa3b7f [606/906] determine the GL platform to use at runtime
- Make GstGLWindow subclassablerather than specified at compile time.
- Add GstGLWindowX11 for x11 windows and two subclasses, GstGLWindowX11GLX
  and GstGLWindwX11EGL for GLX and EGL repectively. (win32 and cocoa
  ports to come)
- Also cleanup GL library detection in configure.ac
2014-03-15 18:36:50 +01:00