Commit graph

40 commits

Author SHA1 Message Date
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
Matthew Waters 3200e2f00d gl/docs: correctly name our objects in the documentation GstGl -> GstGL 2017-12-09 19:32:29 +00:00
Sebastian Dröge a9a05c01a9 gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-12-09 19:32:28 +00:00
Thibault Saunier 95ac4d5175 docs: Port all docstring to gtk-doc markdown 2017-12-09 19:32:27 +00:00
Matthew Waters 31b38a5f54 gl: add necessary get_type() functions for allocation params structures
All using the existing GstGLAllocationParams infrastructure
2017-12-09 19:32:26 +00:00
Guillaume Desmottes b23a008ab6 gst-libs: gl, video: use MAY_BE_LEAKED flag
https://bugzilla.gnome.org/show_bug.cgi?id=767162
2017-12-09 19:32:20 +00:00
Matthew Waters 18a812a30f gl*memory: document new functionality and objects 2017-12-09 19:32:17 +00:00
Matthew Waters a51eccc734 glbuffer: add a name to the allocator 2017-12-09 19:32:13 +00:00
Matthew Waters 09c8c23842 gl*memory*: reverse the parameter order of user_data and destroy notify
The convention is to have the destroy notify last after any user data
2017-12-09 19:32:13 +00:00
Matthew Waters c870a9cdd5 glbuffer: remove unneeded gst_gl_buffer_alloc()
Replaced by gst_gl_base_memory_alloc()
2017-12-09 19:32:13 +00:00
Matthew Waters 9d862cb83f glbuffer: implements GstGLBaseMemory::alloc
Create GstGLBufferAllocationParams which is subclass of GstGLAllocationParams
2017-12-09 19:32:12 +00:00
Matthew Waters 4cb42d34c6 Revert "glbuffer: Don't pass allocation params"
This reverts commit 052f41e5c2.

This is incorrect and will affect any other glbuffer user that needs/wants to
perform data alignment.
2017-12-09 19:32:12 +00:00
Nicolas Dufresne 81cb10aa05 glbuffer: Don't pass allocation params
The imported memory has already been allocated, passing allocation
parameters with alignment confuses the memory which endup with a
size different from maxsize and lead to overrun when the memory
is being copied.
2017-12-09 19:32:12 +00:00
Matthew Waters 4fc012af19 glbuffer: bind/unbind on map/unmap for GL mappings
Bind the handle to the GL target on map/unmap to save the caller from
handling this themselves.
2017-12-09 19:32:12 +00:00
Matthew Waters ab75223594 glbuffer: remove buffer specific transfer flags
Instead rely on GstGLBaseMemory's transfer handling
2017-12-09 19:32:12 +00:00
Matthew Waters 5ab3a38973 gl: add a GL buffer based GstMemory
Heavily based on GstGLBaseBuffer that is a subclass of GstGLBaseMemory.
Provides GPU and CPU accessible GL buffer objects by GL handle or by
sysmem data pointer.
2017-12-09 19:32:12 +00:00
Matthew Waters eb362969f1 [513/906] Remove GstGLBuffer (to be replaced by GstGLMeta) 2017-12-09 19:31:24 +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 ec8aa615e5 [229/906] update authors from the CVS repository 2017-12-09 19:31:19 +00:00
Julien Isorce 1a7a34b5c0 [150/906] glTexImage2D(w, h, NULL) is now called only one time (mem alloc) 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 f5f2e51a31 [088/906] fix some caps negociations those pipelines works fine : gst-launch-0.10 -v videotestsrc ! video/x-raw-yuv, width=320, height=240 ! glgraphicmaker ! video/x-raw-gl, width=720 , height=576 ! glfiltercube ! glimagesink and gst-launch-0.10 -v videotestsrc ! video/x-raw-yuv, width=320, height=240 ! glgraphicmaker ! video/x-raw-gl, width=720 , height=576 ! glimagesink
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@500 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce 1e2ca1dfde [087/906] glfilter can accept to have an input size different than the out put size : video/x-raw-gl, width=w1, height=w1 ! glfilter ! video/x-raw-gl, width=w2, height=w2 ! (fix every examples)
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@499 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce dc4119eafe [083/906] finish to implement the glfilter: example : gst-launch-0.10 videotestsrc num_buffers = 100 ! glgraphicmaker ! glfiltercube ! glimagesink
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@495 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce d01ae3ed0b [081/906] start to add a glfilter
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@493 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce ee488f6e6f [069/906] add gstreamer license
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@435 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce f0e8c70845 [062/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@421 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:16 +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
Tim-Philipp Müller 01d6f2818c [060/906] * gst-libs/gst/gl/gstglbuffer.c: (gst_gl_buffer_format_from_video_format): Fix compiler warning if there are video format enums gstglbuffer doesn't know about yet. * gst-libs/gst/gl/gstgldisplay.c: (gst_gl_display_upload_texture_rectangle), (gst_gl_display_draw_texture): Fix printf format for 64-bit integers. 2017-12-09 19:31:16 +00:00
David Schleef 6fd801ba2a [049/906] * configure.ac: * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstglconvert.c: * sys/glsink/gstgldisplay.c: * sys/glsink/gstgldisplay.h: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglfilter.h: * sys/glsink/gstglfilterexample.c: * sys/glsink/gstgltestsrc.c: * sys/glsink/gstglupload.c: Major cleanup of code. Convert glupload to BaseTransform. Handle caps negotiation mostly correctly. Reenable in build. 2017-12-09 19:31:16 +00:00
David Schleef 2a6bf50ba7 [047/906] * sys/glsink/gltestsrc.c: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglfilterexample.c: * sys/glsink/gstgltestsrc.c: * sys/glsink/gstglupload.c: Convert gldownload to BaseTransform. Make glfilterexample visually interesting. Add support for various formats to downloading. Fix a few places where we leak GL state to other elements (bad, but hard to prevent). 2017-12-09 19:31:15 +00:00
David Schleef 5e620c9673 [046/906] * sys/glsink/BUGS: * sys/glsink/Makefile.am: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstglconvert.c: * sys/glsink/gstgldisplay.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglfilter.h: * sys/glsink/gstglfilterexample.c: * sys/glsink/gstgltestsrc.c: * sys/glsink/gstglupload.c: * sys/glsink/gstopengl.c: Remove code that handles non-texture buffers. Add a GstGLBufferFormat type that corresponds to how to use the texture, not the original video format. Convert gstflfilter.c into a base class, add glfilterexample and glconvert elements. * sys/glsink/color_matrix.c: Minor ramblings about color conversion matrices. 2017-12-09 19:31:15 +00:00
David Schleef f19f6cc1ab [044/906] * sys/glsink/gstglbuffer.c: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: Clean up code. Fix a few leaks. 2017-12-09 19:31:15 +00:00
David Schleef de7967f306 [043/906] * sys/glsink/Makefile.am: * sys/glsink/glimagesink.h: * sys/glsink/glvideo.c: * sys/glsink/glvideo.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldisplay.c: * sys/glsink/gstgldisplay.h: Rename glvideo.[ch] to gstgldisplay.[ch]. 2017-12-09 19:31:15 +00:00
David Schleef 7e42503811 [042/906] * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/glvideo.c: * sys/glsink/glvideo.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglupload.c: Rewrite a bunch of code to use textures as the intermediate instead of renderbuffers. upload, download, filtering all work. 2017-12-09 19:31:15 +00:00
David Schleef c4a58e40e1 [041/906] * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glvideo.c: * sys/glsink/glvideo.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstgldownload.c: * sys/glsink/gstglupload.c: A careful read of the documentation reveals that I can't use renderbuffers as textures. Duh. Checkpoint because I'm about to rewrite a bunch of code. 2017-12-09 19:31:15 +00:00
David Schleef 4c892cb683 [040/906] * sys/glsink/Makefile.am: * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/glvideo.c: * sys/glsink/glvideo.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglupload.c: * sys/glsink/gstopengl.c: Switch to using framebuffer_objects instead of GLXPixmaps, because that's what my driver supports. Remove GLDrawable, since GstGLDisplay now has a default drawable and context. 2017-12-09 19:31:15 +00:00