Commit graph

1537 commits

Author SHA1 Message Date
Sebastian Dröge
46e71e095f gl/x11: Remove unused static function 2017-12-09 19:32:25 +00:00
Matthew Waters
86a9499d5e gl/contextglx: error out on more invalid display/window combinations
https://bugzilla.gnome.org/show_bug.cgi?id=774851
2017-12-09 19:32:25 +00:00
Matthew Waters
afbca8576e gl: add necessary context_egl.h #includes to the source files 2017-12-09 19:32:25 +00:00
Matthew Waters
6992e16d4d gl/memoryegl: remove access to private header gstglcontext_egl.h
It's been removed and thus compiling anything against GstGLMemoryEGL
would error with:

In file included from gstomxvideodec.c:41:0:
usr/include/gstreamer-1.0/gst/gl/egl/gstglmemoryegl.h:32:41: fatal error: gst/gl/egl/gstglcontext_egl.h: No such file or directory
 #include <gst/gl/egl/gstglcontext_egl.h>
                                         ^

https://bugzilla.gnome.org/show_bug.cgi?id=774886
2017-12-09 19:32:25 +00:00
David Evans
7d034ba2d9 gl: add gstreamer-video to pkg-config path
https://bugzilla.gnome.org/show_bug.cgi?id=774624
2017-12-09 19:32:25 +00:00
Matthew Waters
dd31f7934c meson: gl/egl: add missing source file
d42145e8c1 didn't add the necessary
meson build changes.
2017-12-09 19:32:25 +00:00
Matthew Waters
59b65373b0 gl/egl: remove EGLImage functions from egl context
By adding the necessary GstEGLImage entry points to create a GstEGLImage
from a GstGLMemory.

https://bugzilla.gnome.org/show_bug.cgi?id=774518
2017-12-09 19:32:25 +00:00
Matthew Waters
39e75767fb glcontext: add vfunc to retrieve the OpenGL platform version
i.e. the version of EGL, GLX, etc implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=774518
2017-12-09 19:32:25 +00:00
Matthew Waters
6703641734 gl/egl: move get_error_string() into gstegl
So others can use it without #include-ing a private header

https://bugzilla.gnome.org/show_bug.cgi?id=774518
2017-12-09 19:32:24 +00:00
Matthew Waters
415ce6c96a display/egl: implement getting the EGLDisplay of a specific platform
https://bugzilla.gnome.org/show_bug.cgi?id=774518
2017-12-09 19:32:24 +00:00
Víctor Manuel Jáquez Leal
ddf7fe0e80 gl/egl: check the feature in the extensions list
https://bugzilla.gnome.org/show_bug.cgi?id=774518
2017-12-09 19:32:24 +00:00
Matthew Waters
6e409db6e0 glcontext/cocoa: implement empty swap_buffers
Fixes some GL tests on OS X.
2017-12-09 19:32:24 +00:00
Matthew Waters
569fa380e5 glwindow/cocoa: remove unneeded window code in NSWindow
This is all taken care of by GstGLWindowCocoa/GstGLNSView now.
2017-12-09 19:32:24 +00:00
Matthew Waters
66619ed690 glwindow/cocoa: remove our view from the parent when closing
Otherwise, when the application reuses the same UIView, we were getting
draw notifications on the previous view/layer's which weren't valid anymore
and were referencing pointers that had been freed.

https://bugzilla.gnome.org/show_bug.cgi?id=753003
2017-12-09 19:32:24 +00:00
Matthew Waters
b19e74e02d gl/caopengllayer: add a debug category 2017-12-09 19:32:24 +00:00
Matthew Waters
28d3ab2922 glbufferpool: introduce check for GLMemory allocators
The last missing piece of EGLImage support has been pushed.
2017-12-09 19:32:24 +00:00
Tim-Philipp Müller
0aae67d261 gl: x11-xcb is not a required dependency
Don't fail if it's not found..
2017-12-09 19:32:24 +00:00
Matthew Waters
8a1d31f6ab gl/utils: move gen_shader() to the plugin and remove del_shader()
gst_gl_context_del_shader() can be replaced by a g_object_unref().
gst_gl_context_gen_shader() should be replaced by using GstGLSLStage.
2017-12-09 19:32:24 +00:00
Matthew Waters
e483b092f1 glwindow: remove unused field in public struct 2017-12-09 19:32:24 +00:00
Matthew Waters
2b89a2c348 glwindow: remove is_running() function
It isn't necessary in correctly written programs.
2017-12-09 19:32:24 +00:00
Nirbheek Chauhan
204e68a5b1 meson/gl: XCB changes also need x11-xcb as a dependency
https://ci.gstreamer.net/job/GStreamer-master-meson/380/console

[...]
gst-libs/gst/gl/x11/xcb_event_source.c:98: undefined reference to `xcb_get_file_descriptor'
2017-12-09 19:32:24 +00:00
Philippe Normand
3aee8b8b23 gl/x11: fix meson build
The x11_event_source.[ch] files were renamed in
4f6c226bd2.
2017-12-09 19:32:24 +00:00
Matthew Waters
4abca9f5d0 glwindow: remove the navigation thread
This functionality can now effectively be implemented with the display event
thread.
2017-12-09 19:32:24 +00:00
Matthew Waters
0e56bead42 gl/x11: use xcb instead of libX11
- xcb is supposedly thread-safe!

videotestsrc ! glimagesink now doesn't spuriously result in a
'call XInitThreads()' error however if anybody else is using X11,
then XInitThreads() still needs to be called and multiple glimagesink's
still need XInitThreads().

Everything still takes libX11 handles as they are compatible with the xcb
variants.  Unfortunately we cannot move fully over to xcb due to GLX being
entirely based on Xlib.  It's also impossible to transform a xcb_connection
to a Display which means we require X11 handles.
2017-12-09 19:32:24 +00:00
Matthew Waters
af493eb6b2 gldisplay: add a list of glwindow's
With the event thread on the display, for a particular winsys event
we need to be able to retreive the window that the event matches.
2017-12-09 19:32:24 +00:00
Matthew Waters
3870012f18 gldisplay: add a dedicated event thread
Will take the place of the navigation event thread for dealing with
winsys events.
2017-12-09 19:32:24 +00:00
Matthew Waters
ef70a7beae gl: don't expose OpenGL prototypes
We roll our own to avoid depending a certain OpenGL header version
2017-12-09 19:32:24 +00:00
Matthew Waters
4a1d23ea85 gl/cocoa: don't install the gstglcontext_cocoa.h header
It's not needed to be exposed
2017-12-09 19:32:24 +00:00
Matthew Waters
50f60c9ae9 gl/android: don't install the android window header
It's not needed
2017-12-09 19:32:24 +00:00
Matthew Waters
d0b8f7c002 gl: add padding to all exposed winsys/platform-specific structs 2017-12-09 19:32:24 +00:00
Matthew Waters
d7d42971ab gl/wayland: install the gstgldisplay_wayland.h header
As it is used by other OpenGL sinks (gtkglsink, qmlglsink)
2017-12-09 19:32:24 +00:00
Matthew Waters
9d295ed19b gl/egl: don't install the gstglcontext_egl.h header
It's not needed to be exposed and there are no users of the API.
2017-12-09 19:32:24 +00:00
Matthew Waters
181dacc77e glfilter: remove display_init/reset
They are mirrors of GstGLBaseFilter's gl_start() and gl_stop() virtual methods
so use them instead.
2017-12-09 19:32:23 +00:00
Matthew Waters
873466a1f1 gldisplay: Fix inverted precondition
A GError argument must either be null or point to a NULL GError.

https://developer.gnome.org/glib/stable/glib-Error-Reporting.html
2017-12-09 19:32:23 +00:00
Matthew Waters
62d0bac993 gl/gi: some annotation updates for called functions
With scope, closure, destroy annotations
2017-12-09 19:32:23 +00:00
Matthew Waters
3ef6af7b0f gl/gi: also include GstVideo
Removes all the unknown type GstVideo* warnings while building the GIR
file.
2017-12-09 19:32:23 +00:00
Matthew Waters
c6c7f421e3 glfeature: move internal functions into a private header
Don't expose them to the outside world
2017-12-09 19:32:23 +00:00
Matthew Waters
18ac98c58b gl: GST_GL_TYPE -> GST_TYPE_GL
Some deprecated symbols are kept for backwards compatibility
2017-12-09 19:32:23 +00:00
Matthew Waters
9bafa08a5d gl/docs: massive update
- add Since: markers where necessary.
- document structs
- add documentation headers for each module (short_description,
  see_also, etc)
- reduce the number of warnings gtk-doc outputs
- fix spelling mistakes
2017-12-09 19:32:23 +00:00
Matthew Waters
51a6f47bf8 gl/docs: document new API added in 1.10
GstGLRenderbuffer
GstGLFramebuffer
GstGLQuery
GstEGLImage
GstGLMemoryEGL
2017-12-09 19:32:23 +00:00
Matthew Waters
8faebcf915 glsl: fix #version 150 not working with profiles
The spec allows the core/compatibility profiles to be used
with #version 150.

Also tighten up the tests to check for default profiles being chosen
correctly.
2017-12-09 19:32:23 +00:00
Nirbheek Chauhan
a3968fa896 build: Also need to define GST_EXPORTS for Autotools
The change to use GST_EXPORT for symbols under Windows requires
GST_EXPORTS for internal use, and that is also needed under Autotools.
The same thing is done for gstreamer-1.0.dll in -core.
2017-12-09 19:32:23 +00:00
Nirbheek Chauhan
d57808385c gstgl: Re-enable WINAPI on _MSC_VER
The calling convention may be deprecated, but we still need it for
OpenGL. The build issue was caused by an incorrect syntax being used for
the WINAPI (__stdcall) prototype in function pointers which was accepted
by GCC but is rejected by MSVC.
2017-12-09 19:32:23 +00:00
Nirbheek Chauhan
503822eb20 Explicitly define float constants as float
With MSVC, this gives the following warning:

warning C4305: 'function': truncation from 'double' to 'gfloat'

Apparently, MSVC does not figure out what type to use for constants
based on the assignment. This warning is very spammy, so let's try to
fix it.
2017-12-09 19:32:23 +00:00
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
Nirbheek Chauhan
c7c2a68de2 meson: Add support for building WGL on Windows
Currently only tested with MSVC.
2017-12-09 19:32:23 +00:00
Nirbheek Chauhan
45ad33c94c gstgl: Porting fixes for MSVC with Meson
GL/gl.h needs windows.h on MSVC

WINAPI should not be used with MSVC. It also causes a build error.
2017-12-09 19:32:23 +00:00
Matthew Waters
08e20ff131 glsyncmeta: don't glFinish() everytime a sync point is set
At minimum, we only need to glFlush() if we are in a shared GL context
environment.  Move the glFinish() to when the actual wait is requested
which may be never.  Improves the throughput on older GL systems without
GL3/GLES3 and/or fence sync objects.
2017-12-09 19:32:23 +00:00
Matthew Waters
99f5ac40db meson: gl: add support for building with dispmanx on the rpi 2017-12-09 19:32:23 +00:00
Matthew Waters
36b8ed8712 gl/eglimage: Fix passing the destroy function to gst_egl_image_new_wrapped
The function pointer and the user data arguments were swapped in both
uses.

https://bugzilla.gnome.org/show_bug.cgi?id=769382
2017-12-09 19:32:23 +00:00