Commit graph

181 commits

Author SHA1 Message Date
Julien Isorce c441afdc6b glfilter: only warn when other_context attribute is set
Fix false positive
2017-12-09 19:31:38 +00:00
Matthew Waters 30c6efc432 gl/mem: allocate the memory per plane
This patch provides the basic infrastructure required for this.
Upload and Download has been ported to this.

Has the nice effect of allowing GstGLMemory to be our
refcounted texture object for any texture type (not just RGBA).

Should not lose any features/video formats.
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
Matthew Waters a20a5d36e2 gl: pass video info's by reference 2017-12-09 19:31:35 +00:00
Matthew Waters 71548893bf gl: avoid adding a NULL pool to propose allocation 2017-12-09 19:31:35 +00:00
Julien Isorce 0233939eaa gl: only set CAPS_FEATURE_MEMORY_EGL_IMAGE on egl platform 2017-12-09 19:31:35 +00:00
Julien Isorce 6614df6478 gl: let the user includes itself our egl headers if needed
Forgot to address this change.

https://bugzilla.gnome.org/show_bug.cgi?id=703343
2017-12-09 19:31:35 +00:00
Julien Isorce c2471aec81 gl: add EGLImage support
* picked from old libgstegl:
  - GstEGLImageMemory
  - GstEGLImageAllocator
  - last_buffer management from removed GstEGLImageBufferPool

* add-ons:
  - GstEGLImageMemory now old a reference on GstGLContext
    so that it can delete the EGLImage and its gltexture source
    while having the associated gl context being current.
  - add EGLImage support for GstVideoGLTextureUploadMeta which
    mainly call EGLImageTargetTexture2D
  - GstGLBufferPool now supports GstEGLImageAllocator
  - glimagesink / glfilters / etc.. now propose GstEGLImageAllocator
    to upstream

https://bugzilla.gnome.org/show_bug.cgi?id=703343
2017-12-09 19:31:35 +00:00
Matthew Waters a9070713a2 gl: silence a critical if upstream does not provide us with meta params 2017-12-09 19:31:35 +00:00
Matthew Waters 4a18aa4b70 [906/906] filter: warn about trying to share with multiple contexts at once 2017-12-09 19:31:34 +00:00
Matthew Waters 3f5b68b072 [905/906] Add GL context sharing support for non-gstgl elements 2017-12-09 19:31:34 +00:00
Matthew Waters 3c9f5e6e5e [886/906] fixup a memory leak of the context in the GLTextureUploadMeta path
gst_structure_get returns a reference to the object and we asked
for another with gst_object_replace.

https://bugzilla.gnome.org/show_bug.cgi?id=724816
2017-12-09 19:31:33 +00:00
Matthew Waters c2e1e6a2d1 [885/906] filter: free our data
plugs some memory leaks

https://bugzilla.gnome.org/show_bug.cgi?id=724816
2017-12-09 19:31:33 +00:00
Matthew Waters f292e785ce [884/906] filter: return the pad template caps in transform_caps
We can transform from any input in our caps to any output.
With the following pipeline snippet:

  ... ! vaapidecode ! glcolorscale ! xvimagesink

GstVideoGLTextureUploadMeta was being used on both src and sink
pads causing linking to fail.  This allows the usage of the meta
on either pad without affecting whether the meta is chosen on the
other pad.
2017-12-09 19:31:33 +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 2eb7938db9 [873/906] upload: use GstVideoInfo for choosing the format 2017-12-09 19:31:33 +00:00
Matthew Waters 1e02438715 [855/906] upload: add support for GstVideoGLTextureUploadMeta 2017-12-09 19:31:32 +00:00
Matthew Waters 2623734d19 [854/906] use the allocation query to propogate GstGLContext
uses the GstVideoGLTextureUploadMeta api type for the query
2017-12-09 19:31:32 +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 689e722dfa [848/906] filter: a little code cleanup 2017-12-09 19:31:32 +00:00
Matthew Waters 4b8019b12c [845/906] filter: handle capsfeatures properly 2017-12-09 19:31:32 +00:00
Matthew Waters efa22442a9 [838/906] gl: Use GL_TEXTURE_2D instead of GL_TEXTURE_RECTANGLE
We create our textures (in Desktop GL) with GL_TEXTURE_RECTANGLE,
vaapi attempts to bind our texture to GL_TEXTURE_2D which throws a
GL_INVALID_OPERATION error and as thus, no video.

Also, by moving exclusively to GL_TEXTURE_2D and the npot extension
we also remove a difference between the Desktop GL and GLES2 code.

https://bugzilla.gnome.org/show_bug.cgi?id=712287
2017-12-09 19:31:32 +00:00
Matthew Waters 2a937dd96a [817/906] make the state change test pass 2017-12-09 19:31:31 +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
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
Tonu Jaansoo c304635ecf [787/906] gl: The GLSL rectangle resampler does not always work with int tex coords
Use floats instead.
2017-12-09 19:31:30 +00:00
Matthew Waters 7c4d51edf4 [780/906] up/download: check return values
So we fail properly
2017-12-09 19:31:30 +00:00
Mathieu Duponchelle 47b9fb1d49 [773/906] glfilters: Mark writable-only properties as readable as well
https://bugzilla.gnome.org/show_bug.cgi?id=704429
2017-12-09 19:31:30 +00:00
Sebastian Dröge 8efcecb98c [771/906] gl: Some less long/ulong/gulong usage 2017-12-09 19:31:30 +00:00
Matthew Waters 2c6f8de516 [764/906] filter: fix pad template caps
upload is for the sink template
download is form the src template
2017-12-09 19:31:30 +00:00
Sebastian Dröge 6c89d7e839 [721/906] glfilter: Use uint64 for the OpenGL context property
ulong/long properties are deprecated and should not be used anymore
for portability reasons.
2017-12-09 19:31:28 +00:00
Matthew Waters bdf5b5be0f [707/906] display: move error_message to utils 2017-12-09 19:31:28 +00:00
Matthew Waters 761bc0156a [704/906] Use gst_object_[un]ref so we can get refcounts in the log 2017-12-09 19:31:28 +00:00
Matthew Waters c6988cb064 [701/906] display: move context creation into window 2017-12-09 19:31:28 +00:00
Matthew Waters 38e0434d95 [699/906] display: remove list of upload and download objects
and only create an up/download object when needed.
2017-12-09 19:31:28 +00:00
Matthew Waters 01518880fa [685/906] filter: improve error handling 2017-12-09 19:31:27 +00:00
Matthew Waters 173467e48a [650/906] filter: fix _draw_texture()'s wrong vertices 2017-12-09 19:31:27 +00:00
Matthew Waters 6bee9b9c93 [647/906] remove dependecy on glew 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 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 c4332505a9 [563/906] readd support for hanging GL pipelines e.g. ... ! gleffects ! fakesink 2017-12-09 19:31:24 +00:00
Matthew Waters 9761f2cfa1 [555/906] Make the query for a GstGLDisplay a pad peer query
Allows the query to pass through bin boundaries and makes it possible for
arbitrary gl elements to be placed in bins.
2017-12-09 19:31:24 +00:00
Matthew Waters 56bf6e2fb3 [544/906] fix memory leaks from not g_free()ing string returned by gst_element_get_name 2017-12-09 19:31:24 +00:00
Matthew Waters 3f174671ec [532/906] GstGLFilter: implement allocation vfuncs 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
Matthew Waters f7bc5dcf83 [503/906] Rename GST_BOILERPLATE_* to G_DEFINE_TYPE_* and move _base_init into _class_init 2017-12-09 19:31:24 +00:00
Julien Isorce 67bc74ec3f [498/906] gldisplay: don't pass non-constant strings as printf format strings
Fixes 'format not a string literal and no format arguments' on darwin
2017-12-09 19:31:23 +00:00
Julien Isorce 96cce45c38 [483/906] glelements: do not leak parent when using gst_pad_get_parent 2017-12-09 19:31:23 +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
Stefan Kost df480f3530 [462/906] various: add missing G_PARAM_STATIC_STRINGS flags
Canonicalize property names as needed. Includes some gst-indent changes as well :/
2017-12-09 19:31:23 +00:00
Julien Isorce 769e43a2e0 [456/906] glfilter/glmixer/gltestsrc/glupload: throw an element error if no parent bin
Fixes bug #602153
2017-12-09 19:31:23 +00:00
Filippo Argiolas 306526a19f [443/906] sobel: move some highly duplicated code into glfilter
Add a new convenience function in GstGLFilter that just draws an input
texture to a target texture using a simple shader with just a "tex"
uniform sampler.
Move draw_texture from glfiltersobel to glfilter. Still need to update
other plugins to this.
2017-12-09 19:31:23 +00:00
Julien Isorce 32203f94ea [405/906] glfilter: add external-opengl-context property
It repairs the cluttershare and sdlshare example
2017-12-09 19:31:22 +00:00
Julien Isorce 525701cfca [388/906] just fix builds and indent 2017-12-09 19:31:22 +00:00
Julien Isorce b85ffef956 [387/906] glmixer: add a glmixer base element
glmixer can be seen as a glfilter except it handles N requested
sink pads.
Each sink pad and the src pad are video/x-raw-gl.
glmixer is responsible for managing different framerates from inputs.
It uses OpenGL context sharing. It means that each input is in its
own OpenGL context shared together and shared with the OpenGL context
of the ouput gl chain.
Also add a glmosaic which is an example of implementation of glmixer.
For now glmosaic is a cube but it will be fixed in the next commits.
For now the glmixer has some weird behaviours in some configurations
but it will be improved in the next commits.
The autotools builds is temporarly broken since those changes
have been made on win32.
2017-12-09 19:31:22 +00:00
Julien Isorce 8c33ba0ba6 [385/906] rewrite the way a gstgldisplay is transmited to the gl elements
Before, a gstgldisplay was instancied by the gl src in terms of gl chain.
And then the next element got it through the first gstglbuffer.
Now, this is done though queries.
All glelements get their ref on a gstgldisplay in READY state.
This rewrite is mainly a first step to be able to share OpenGL context hold
by the gstgldisplay using more complex glelements.
For example, with a glvideomixer. The associated gstgldisplay of each gl chain
of the sink pads will share their OpenGL context.
2017-12-09 19:31:22 +00:00
David Schleef 2e2213fbd7 [310/906] Global reindent
Indent parameters:
INDENT_PARAMETERS="--braces-on-if-line \
        --case-brace-indentation0 \
        --case-indentation2 \
        --braces-after-struct-decl-line \
        --line-length80 \
        --no-tabs \
        --cuddle-else \
        --dont-line-up-parentheses \
        --honour-newlines \
        --continuation-indentation4 \
        --tab-size8 \
        --indent-level2"
2017-12-09 19:31:21 +00:00
David Schleef f0b62d760f [298/906] Revert "Fix indention"
This reverts commit 96e4ab18c2cf9876f6c031b9aba6282d0bd45a93.

You should have asked first.  And you would have been told "no",
because it causes people on development branches to do a huge
amount of extra work.
2017-12-09 19:31:21 +00:00
Sebastian Dröge 809c2ec04c [295/906] Fix indention 2017-12-09 19:31:21 +00:00
Julien Isorce 3d54d22894 [242/906] Fix crash in filters when going to NULL with no display 2017-12-09 19:31:19 +00:00
Julien Isorce ec8aa615e5 [229/906] update authors from the CVS repository 2017-12-09 19:31:19 +00:00
Filippo Argiolas 4440a3cfed [171/906] import fxtest (little gtk app to easily test effects) from cvs branch, fixed rgbtocurve. 2017-12-09 19:31:18 +00:00
Julien Isorce 4629bf1bc5 [146/906] remove filteredge 2017-12-09 19:31:18 +00:00
Filippo Argiolas ce17f1a2db [143/906] Add init and reset callbacks in GstGLFilter to run arbitrary gl code at start and stop. Useful to init and cleanup custom gl resources. 2017-12-09 19:31:18 +00:00
Filippo Argiolas 4eb4c0beea [141/906] some steps towards simplification. added a convenience function to gstglfilter and some comment here and there 2017-12-09 19:31:18 +00:00
Julien Isorce d0e63e68ac [132/906] make the plugin properly shutdown when one of the check requirements failed 2017-12-09 19:31:18 +00:00
Julien Isorce a192d39638 [114/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@555 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce 49e944778e [108/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@540 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce 8685e547b4 [104/906] start to add a glfilteredge that proceeds edge detection using GLSL
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@517 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce e34a278e35 [094/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@506 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce bca92ed962 [091/906] start to revive the gltestsrc
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@503 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
David Schleef 98e2942fed [061/906] First SVN commit. This commit is a hack to make git-rebase work 2017-12-09 19:31:16 +00:00
David Schleef 894db7a964 [056/906] * configure.ac: Readd pre-pkgconfig OpenGL detection, since pkgconfig requires Mesa from git master. * gst/gl/glimagesink.c: * gst/gl/gstopengl.c: Move debug category initialization to element. * gst-libs/gst/gl/Makefile.am: * gst-libs/gst/gl/gstglfilter.c: * gst-libs/gst/gl/gstglfilter.h: * gst/gl/gstglfilter.c: * gst/gl/gstglfilter.h: Move glfilter to library. * pkgconfig/gstreamer-plugins-gl.pc.in: Add gstreamer-base-0.10 as a requirement. * po/en.po: Update. 2017-12-09 19:31:16 +00:00