Commit graph

63 commits

Author SHA1 Message Date
Edward Hervey 22c9e5f7c1 libs: Documentation cleanup
* Fix wrong naming, wrong types and typos
* Add missing sections
* Add missing documentation for entries
* Explicitely mark private structure entries
* Remove items that never existed
2018-04-02 08:53:28 +02:00
Tim-Philipp Müller c5b5ef16d3 gl: GST_EXPORT -> GST_GL_API
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 12:10:29 +00:00
Jan Schmidt f15f60a062 glfilter: Support non-2D texture targets
Allow for sub-classes to change pad templates to
support other texture targets, and bind input textures
accordingly.

When setting the caps, also store the texture target.

By default, glfilter only reports 2D texture targets
in the default caps, but sub-classes can change that
and it would be nice if they could easily find out
which texture targets were negotiated.

This adds 2 fields to the public struct, but since
it's unreleased -base API, it's not an ABI break.
2018-03-01 02:14:07 +11:00
Julien Isorce 4952fdd956 gl: do not include GL headers in public gstgl headers
Except for gst/gl/gstglfuncs.h

It is up to the client app to include these headers.
It is coherent with the fact that gstreamer-gl.pc does not
require any egl.pc/gles.pc. I.e. it is the responsability
of the app to search these headers within its build setup.

For example gstreamer-vaapi includes explicitly EGL/egl.h
and search for it in its configure.ac.

For example with this patch, if an app includes the headers
  gst/gl/egl/gstglcontext_egl.h
  gst/gl/egl/gstgldisplay_egl.h
  gst/gl/egl/gstglmemoryegl.h
it will *no longer* automatically include EGL/egl.h and GLES2/gl2.h.
Which is good because the app might want to use the gstgl api only
without the need to bother about gl headers.

Also added a test: cd tests/check && make libs/gstglheaders.check

https://bugzilla.gnome.org/show_bug.cgi?id=784779
2017-12-09 19:32:29 +00:00
Jan Schmidt 76bf415a96 glfilter: Remove hard-coded pad templates
Add a function to install the default RGBA pad templates,
but don't make them required so that there can be
GstGLFilter sub-classes with different input/output
caps if they want. Remove the hard-coded RGBA restriction in
the set_caps_features call, as it will be taken care
of by intersecting with the pad templates.

Update all the sub-classes to match
2017-12-09 19:32:29 +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 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
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
Matthew Waters 1e8c7e0f31 gl: add necessary padding bytes to all public structs 2017-12-09 19:32:22 +00:00
Matthew Waters b3d8e09839 glfilter: rewrite subclasses for filter_texture() occuring on GL thread
There's no need for the jump to an extra thread in most cases, especially
when relying solely on a shader to render.  We can use the provided
render_to_target() functions to simplify filter writing.
2017-12-09 19:32:21 +00:00
Matthew Waters 4bbda2b626 glframebuffer: rewrite for a more consistent API
Facilities are given to create fbo's and attach GL memory (renderbuffers
or textures).  It also keeps track of the renderable size for use with
effective use with glViewport().
2017-12-09 19:32:21 +00:00
Matthew Waters 7f10822de4 gl: use GLMemory for accessing textures everywhere
This simplifies and consolidates a lot of duplicated code creating
and modifying textures.
2017-12-09 19:32:21 +00:00
Matthew Waters c7dd43f21a glfilter: rename draw_texture to draw_fullscreen_quad
And remove unused arguments.
2017-12-09 19:32:21 +00:00
Matthew Waters 632cc16767 glfilter: remove unused class fields in/out_tex_id
The functionality is not used by any subclass nor are the values set anywhere.
2017-12-09 19:32:20 +00:00
Matthew Waters 4406730633 glfilter: retrieve the shader attributes from the GL thread
Otherwise we will receive bogus values

https://bugzilla.gnome.org/show_bug.cgi?id=763365
2017-12-09 19:32:17 +00:00
Nicolas Dufresne 79d5bbdc35 glfilter: Don't cache buffer pool
Caching and sharing to multiple element the same pool prevents
renegotiation from passthrough to not passthrough.
2017-12-09 19:32:05 +00:00
Jan Schmidt 5007311198 glfilter: Add transform_internal_caps() vfunc
Add a vfunc that is called by glfilter before it sets
caps features and intersects with the peer caps, and
move removing the size from caps into its default
implementation. Allows sub-classes to do more
sophisticated management of the size fields in case they
don't support arbitrary resizing or have distinct
preferences.
2017-12-09 19:32:03 +00:00
Matthew Waters 65c57b77ff gl: element buffers are part of vao state
Use them as such.  They are also required for GL3 core profile support
with glDrawElements on OS X.
2017-12-09 19:32:01 +00:00
Sebastian Dröge 51d3a0a059 Revert "gl: readd glupload/download onto element pads"
This reverts commit 87d8270f30.
2017-12-09 19:32:00 +00:00
Matthew Waters 343947f383 gl: readd glupload/download onto element pads
Allows insertion of gl elements into non-gl pipelines without converter
(upload/download) elements.

https://bugzilla.gnome.org/show_bug.cgi?id=743974
2017-12-09 19:32:00 +00:00
Sebastian Dröge ee6bfe0127 glfilter: De-camelcase onInitFBO() vfunc 2017-12-09 19:31:59 +00:00
Sebastian Dröge 3613ecfd0a glfilter: Remove onStart/onStop vfuncs, and unused onReset()
onStart/onStop are just duplicates of the basetransform ones, onReset
was never called but was used everywhere when stop should've been used.
2017-12-09 19:31:59 +00:00
Matthew Waters 92f0aa9bd8 gl: get the context from basemixer/basefilter 2017-12-09 19:31:57 +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 1dfeae2c42 gl: split glcolorconvert usage from glupload
the separation allows the transfer operation to occur in a separate
thread/time which may increase performance in specific circumstances.
2017-12-09 19:31:52 +00:00
Matthew Waters 4bd62ebb03 gldisplay: implement runtime GL api filtering
Needed so that the pipeline/application can limit the choice of GL api
to what it supports
2017-12-09 19:31:51 +00:00
Matthew Waters 8e98591153 glfilter: add a gl3 code path using vao's and vbo's 2017-12-09 19:31:51 +00:00
Matthew Waters 00506bf183 glupload: rearchitecture for non GLMemory inputs/outputs
Allows other memory types to be implemented/returned/used by the caller.
2017-12-09 19:31:50 +00:00
Matthew Waters 6663967994 glfilter: add uploaded_buffer field 2017-12-09 19:31:48 +00:00
Matthew Waters ae919f4475 gl: download whenever we have sysmem capsfeatures
Otherwise we could pass on a RGBA formatted buffer and downstream would
misinterpret that as some other video format.

Fixes pipelines of the form

    gleffects ! tee ! xvimagesink
2017-12-09 19:31:46 +00:00
Matthew Waters 8daa7693cf [874/906] filter: implement draw_texture for GLES2
(taken from gleffects)
2017-12-09 19:31:33 +00:00
Matthew Waters 64fad7a6d2 [852/906] use GstContext for GstGLDisplay propogation
implements the hooks required in GstElement::set_context and the context query
2017-12-09 19:31:32 +00:00
Matthew Waters 711ad485b2 [812/906] move the GL vtable from GstGLDisplay to GstGLContext
Conflicts:
	tests/check/libs/gstglcontext.c
2017-12-09 19:31:31 +00:00
Matthew Waters 0f8fc0881a [805/906] glfilter: rename external-opengl-context prop to other-context
It now requires a GstGLContext instead of a handle
2017-12-09 19:31:31 +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 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
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 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
Matthew Waters 4c35d682c9 [603/906] update FSF address 2017-12-09 19:31:25 +00:00
Matthew Waters d55bbf7f55 [600/906] docs: add docs for new objects and expand on some existing ones 2017-12-09 19:31:25 +00:00
Matthew Waters 2a8de21658 [594/906] filter: update for up/download API changes and scaling fixes 2017-12-09 19:31:25 +00:00
Matthew Waters c7f49800e3 [583/906] deinterlace: change for new API
also allow elements to call the _filter_texture vfunc if they want
2017-12-09 19:31:25 +00:00
Matthew Waters eed7e15ed2 [581/906] filter: add seperate filter function for operating on textures instead of buffers 2017-12-09 19:31:25 +00:00
Matthew Waters 2de5a925c1 [575/906] filter: port to new upload/download 2017-12-09 19:31:25 +00:00
Matthew Waters 3f174671ec [532/906] GstGLFilter: implement allocation vfuncs 2017-12-09 19:31:24 +00:00
Matthew Waters eb362969f1 [513/906] Remove GstGLBuffer (to be replaced by GstGLMeta) 2017-12-09 19:31:24 +00:00
Matthew Waters 683c001f91 [504/906] GstGLFilter: update for 1.0
-fix up function definitions
-remove _prepare_output_buffer (functionality taken over by GstBufferPool).
2017-12-09 19:31:24 +00:00
Julien Isorce 7c79cc5c41 [481/906] feature checking: error out instead of doing nothing if an OpenGL feature is not present
Fix bug #572767
2017-12-09 19:31:23 +00:00
Antoni Silvestre 4ea2bf2087 [476/906] OpenGL ES 2.0: fix build and disable some examples
Fix bug #631019
2017-12-09 19:31:23 +00:00