Commit graph

82 commits

Author SHA1 Message Date
Matthew Waters 4d46edfd50 gl: remove unneeded shader variable parsing code 2017-12-09 19:32:09 +00:00
Matthew Waters 8c922ca96b glsl: add a shader stage object GstGLSLStage
Represents a stage (vertex, geometry, fragment, etc) in the shader
pipeline.
2017-12-09 19:32:09 +00:00
Matthew Waters 332543f3cf gl: add some GLSL utility functions
Specifically parsing/setting GLSL versions and the shader related
function table.
2017-12-09 19:32:09 +00:00
Matthew Waters 16ee1636dc gl: move debugging related functions to their own file 2017-12-09 19:32:09 +00:00
Antoine Jacoutot 9117b50cfb gl: Pass GL_CFLAGS to g-ir-scanner
This unbreaks building when some headers are under a non-standard path.
e.g. /usr/X11R6/include as on OpenBSD.

https://bugzilla.gnome.org/show_bug.cgi?id=755850
2017-12-09 19:32:09 +00:00
Nicolas Dufresne f3bd3d0b94 gl: Add opengl_version.h to the list of sources
Adding this private header to the list of sources. We don't want to make
this header public, but we need it in the list of sources otherwise it
won't be included in the tarball. This fixes make distcheck.

This regression was introduced by commit 1a6fe3db
2017-12-09 19:32:07 +00:00
Nicolas Dufresne b0546f9bfa gloverlaycompositor: Hide GstCompsitionOverlay object
This object is only used inside the compositor and does not
need to be expose in libgstgl API.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Nicolas Dufresne 9caaf9eb63 libgstgl: Makefile style fix 2017-12-09 19:32:06 +00:00
Matthew Waters 11f058b1ca gl/build: fix typo in _HEADERS resulting in installing the wrong file
/usr/include/gstreamer-1.0/gst/gl/gl.h:51:43: fatal error:
    gst/gl/gstgloverlaycompositor.h: No such file or directory
2017-12-09 19:32:06 +00:00
Lubosz Sarnecki 4d010efea1 gloverlaycompositor: Add GstGLOverlayCompositor class
Manages the GstGLCompositionOverlay objects,
caches already uploaded overlays and draws them.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Lubosz Sarnecki 279c2b07b4 glcompositionoverlay: Add class for managing GstVideoOverlayCompositionOverlay buffers
Add a class to store and manage the OpenGL texture,
vertex buffer and GstVideoOverlayRectangle.
Transforms overlay coordinate space to vertex buffer space with aspect ratios in mind.

= Example Pipelines =

Simple pipeline

gst-launch-1.0 videotestsrc ! \
  textoverlay text="Hello World" font-desc="sans bold 30" ! \
  glimagesink

Display 3 static overlays at different positions

gst-launch-1.0 videotestsrc ! \
  textoverlay text="text1" valignment="top" font-desc="sans bold 30" ! \
  textoverlay text="text2" halignment="right" font-desc="sans bold 30" ! \
  textoverlay text="text3" halignment="left" font-desc="sans bold 30" ! \
  glimagesink

Display subtitle file over testsrc

gst-launch-1.0 videotestsrc ! \
  textoverlay name=foo filesrc location=foo.srt ! subparse ! queue ! foo. foo. ! \
  glimagesink

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:05 +00:00
Julien Isorce e29e67fa6e Revert "gl: add GstGLContextGPUProcess backend"
This reverts commit b377112ee3.
2017-12-09 19:32:04 +00:00
Jan Schmidt 7b583526e9 gl libs: Add glviewconvert helper object
Add API for a helper object that can convert between different
stereoscopic video representations, and later do filtering
of multiple view streams.

https://bugzilla.gnome.org/show_bug.cgi?id=611157
2017-12-09 19:32:04 +00:00
Matthew Waters 1e87053475 gl: new glbasebuffer GstMemory object
Provides generic handling of GL buffer objects accessible using
the GL bind points (GL_ARRAY_BUFFER, GL_PIXEL_*_BUFFER).

Implementation based off the current GstGLMemory.
2017-12-09 19:32:04 +00:00
Julien Isorce 238edceda4 gl: add GstGLContextGPUProcess backend
It builds its GL vtable from a proc address provided
by the application.
2017-12-09 19:32:02 +00:00
Edward Hervey 0f4c79099e introspection: Don't use g-ir-scanner cache at compile time
It pollutes user directories and we don't need to cache it

https://bugzilla.gnome.org/show_bug.cgi?id=747095
2017-12-09 19:31:58 +00:00
Matthew Waters 2ead0d97ed gl: add a new glbasefilter class below glfilter
It deals with propagating the gl display/contexts throughout the
application/pipeline
2017-12-09 19:31:56 +00:00
Matthew Waters 6bb113f685 gl: add a sync meta for synchronizing across GL contexts
A context can create a GLsync object that can be waited on in order
to ensure that GL resources created in one context are able to be
used in another shared context without any chance of reading invalid
data.

This meta would be placed on buffers that are known to cross from
one context to another.  The receiving element would then wait
on the sync object to ensure that the data to be used is complete.
2017-12-09 19:31:51 +00:00
Sebastian Dröge 90022c451c gstglconfig: Put gstglconfig.h into $(libdir)/gstreamer-1.0/include
It's architecture dependent and should not be placed into the include
directory as the assumption is that all those headers are architecture
independent.

https://bugzilla.gnome.org/show_bug.cgi?id=739767
2017-12-09 19:31:49 +00:00
Lubosz Sarnecki 30591d664c gstopengl: add introspection support
https://bugzilla.gnome.org/show_bug.cgi?id=734482
2017-12-09 19:31:45 +00:00
Sebastian Dröge b02a6a98b2 gl: Link to all required libraries but not more 2017-12-09 19:31:44 +00:00
Sebastian Dröge ab7a152cd4 gl: Move GstGLMixer to the plugin for now
It depends on GstAggregator and we don't want to install headers
for that yet.

https://bugzilla.gnome.org/show_bug.cgi?id=732207
2017-12-09 19:31:44 +00:00
Matthew Waters 1f8c784131 gl: move gles2 compat header to glprototypes 2017-12-09 19:31:43 +00:00
Thibault Saunier 30a9ef3768 gl: Port glmixer to the GstVideoAggregator baseclass
https://bugzilla.gnome.org/show_bug.cgi?id=731921
2017-12-09 19:31:43 +00:00
Matthew Waters 32343333aa gl/upload: add GstGLUploadMeta object
That simply deals with the provider aspect of GstVideoGLTextureUploadMeta.
2017-12-09 19:31:41 +00:00
Sebastian Dröge 3770d2a406 gl: Add support for iOS EAGL platform
https://bugzilla.gnome.org/show_bug.cgi?id=703341
2017-12-09 19:31:36 +00:00
Matthew Waters fba49c3463 gl: add colorconvert object that converts between color spaces/formats
Currently used by both upload and download objects separately.
2017-12-09 19:31:36 +00:00
Rico Tzschichholz 34a4eef1ec build: Fix make dist 2017-12-09 19:31:35 +00:00
Julien Isorce cb9521ab05 gl: deploy egl headers in gst/gl/egl instead of gst/gl
https://bugzilla.gnome.org/show_bug.cgi?id=703343
2017-12-09 19:31:35 +00:00
Gwenole Beauchesne 14521a89cb gl: fix out-of-source builds.
Always use the locally generated <gst/gl/gstglconfig.h> file.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2017-12-09 19:31:35 +00:00
Matthew Waters 4a28b62d5a gl: add GModule libs for win32 2017-12-09 19:31:34 +00:00
Matthew Waters 9b5a5a3c37 gl: only link against gstegl if we are using egl
Assuming if we are building egl that the egl library is built
2017-12-09 19:31:34 +00:00
Matthew Waters f98fee49c2 gl: add path of the gstegl library
Temporary until we merge the two libraries
2017-12-09 19:31:34 +00:00
Matthew Waters 891f7e2ce8 Revert "gl: add dep on gstegl"
It was already in _LIBADD

This reverts commit b10a353080.
2017-12-09 19:31:34 +00:00
Matthew Waters 95e7f50355 gl: add dep on gstegl
Temporary until we merge the two libraries
2017-12-09 19:31:34 +00:00
Matthew Waters 894035f0d7 gl: Add EGLDisplay display subclass 2017-12-09 19:31:34 +00:00
Matthew Waters 10f18a151e [879/906] build: don't add X_CFLAGS to CFLAGS
It should already be included if needed inside GL_CFLAGS
2017-12-09 19:31:33 +00:00
Tim-Philipp Müller b0999fbc03 [842/906] Fix gstglconfig.h-related 'make distcheck' issues
Fix srcdir vs. builddir issue in docs and 'files left after
disclean' issue for gstglconfig.h
2017-12-09 19:31:32 +00:00
Julien Isorce dd679dee25 [803/906] raspberrypi: add support for dispmanx
See https://bugzilla.gnome.org/show_bug.cgi?id=703342
2017-12-09 19:31:31 +00:00
Matthew Waters b8b9fced19 [796/906] move egl into its own directory 2017-12-09 19:31:31 +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
Sebastian Dröge 192b37980f [735/906] gl: Add support for Android
https://bugzilla.gnome.org/show_bug.cgi?id=703340
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
Julien Isorce d17a4381b1 [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
2017-12-09 19:31:29 +00:00
Sebastian Dröge 92c66f55bc [727/906] egl: Refactor EGL logic into a helper object 2017-12-09 19:31:29 +00:00
Matthew Waters 1c84c0fb96 [714/906] Add GstGLFramebuffer to replace _display_gen_fbo and friends
This version is simply API compatible with _display_gen_fbo.
The next version will likely revamp the API
2017-12-09 19:31:28 +00:00
Matthew Waters 9c633e658a [700/906] display: move most of the code into utils for sorting later
This contains a hack that essentially requires one GstGLDisplay
per process.
2017-12-09 19:31:28 +00:00
Matthew Waters a87b070abb [640/906] build: add missing file to built sources 2017-12-09 19:31:26 +00:00
Matthew Waters 1ec4ffc824 [630/906] display: add gl api checking
i.e. check for cases where the window wants a different API than
what the library was compiled with
2017-12-09 19:31:26 +00:00
Matthew Waters 344253e860 [624/906] OPENGL_ES2 => HAVE_GLES2 and add HAVE_OPENGL
use GstGLAPI to determine which code paths to execute.
perform some cleanups
2017-12-09 19:31:26 +00:00