Sebastian Dröge
eeab6e881f
gldownload: Simplify caps feature setting code
2017-12-09 19:31:56 +00:00
Matthew Waters
530ae2cbb0
glupload/download/convert: provide transform_caps functions
...
Allows finer grain decisions about formats and features at each
stage of the pipeline.
Also provide propose_allocation for glupload besed on the supported
methods.
2017-12-09 19:31:54 +00:00
Alessandro Decina
966cad27d7
gl: initial support for texture targets other than GL_TEXTURE_2D
...
Make GstGLMemory hold the texture target (tex_target) the texture it represents
(tex_id) is bound to. Modify gst_gl_memory_wrapped_texture and
gst_gl_download_perform_with_data to take the texture target as an argument.
This change is needed to support wrapping textures created outside libgstgl,
which might be bound to a target other than GL_TEXTURE_2D. For example on OSX
textures coming from VideoToolbox have target GL_TEXTURE_RECTANGLE.
With this change we still keep (and sometimes imply) GL_TEXTURE_2D as the
target of textures created with libgstgl.
API: modify GstGLMemory
API: modify gst_gl_memory_wrapped_texture
API: gst_gl_download_perform_with_data
2017-12-09 19:31:53 +00:00
Matthew Waters
d8cc4cfc47
glmemory: use pbo's for download
...
In order to use pbo's efficiently, the transfer operation has to
be separated from the use of the downloaded data which requires some
rearchitecturing around glcolorconvert/gldownload and elements
2017-12-09 19:31:53 +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
Nicolas Dufresne
a1e02726ee
gl: Add support for GstVideoAlignment
...
This allow saving a copy with libav video decoders or decoders with
similar padding requirement.
https://bugzilla.gnome.org/show_bug.cgi?id=740900
2017-12-09 19:31:52 +00:00
Matthew Waters
c216799b20
glmemory: use GstVideoInfo everywhere
...
Simplifies a lot of the calling code
https://bugzilla.gnome.org/show_bug.cgi?id=733717
2017-12-09 19:31:45 +00:00
Matthew Waters
58fbcfdf1f
gldownload: plug a memory leak
2017-12-09 19:31:43 +00:00
Matthew Waters
4a8b31afd6
glfeature: remove GST_GL_API_GLES3
...
instead check the gl version using gst_gl_context_check_gl_version()
2017-12-09 19:31:42 +00:00
Matthew Waters
82910401c8
gl/download: use GstObject's lock instead of out own
2017-12-09 19:31:42 +00:00
Matthew Waters
8ac92cd90d
gl/colorconvert: allocate output buffers
...
Allows the nop optimisation by simply reffing the input buffer.
2017-12-09 19:31:41 +00:00
Matthew Waters
625efc1757
gl/colorconvert: operate on buffers instead of memories
2017-12-09 19:31:41 +00:00
Matthew Waters
63831b7dd2
gl/download: fixup YUY2/UYVY download
...
Regression from 2da979831e
as it did
not update the download code to reflect the change in texture format.
2017-12-09 19:31:41 +00:00
Matthew Waters
9172cb8839
gl/download: update to be similar to the glupload semantics
2017-12-09 19:31:40 +00:00
Matthew Waters
977c326c59
gl/colorconvert: implement lazy init
2017-12-09 19:31:40 +00:00
Matthew Waters
857200ff40
gl: make all GObjects inherit from GstObject
...
Aids memory leak debugging with GST_TRACE=mem-live
2017-12-09 19:31:39 +00:00
Matthew Waters
92c243be62
gl/color: pass large value by reference
...
Coverity 1199700
2017-12-09 19:31:36 +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
adebb3b7f8
gl/download: add support for the bt709 color matrix
2017-12-09 19:31:35 +00:00
Adrien SCH
d382eab15e
[888/906] correct error handling in gstgldownload.c
2017-12-09 19:31:33 +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
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
Sebastian Dröge
82eb297aba
[782/906] gldownload: Use strlen() instead of sizeof(char*)
...
gstgldownload.c:846:22: error: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
2017-12-09 19:31:30 +00:00
Matthew Waters
e32e8f45e0
[781/906] download: propogate errors from the GL thread
2017-12-09 19:31:30 +00:00
Matthew Waters
13d487741a
[779/906] download: remove _thread variants of the API
2017-12-09 19:31:30 +00:00
Matthew Waters
0df6a5e963
[776/906] download: fix compiler warning about missing string format
2017-12-09 19:31:30 +00:00
Sebastian Dröge
bb4414ac7f
[759/906] gldownload: #ifdef some GLES2 specific code to fix compilation
2017-12-09 19:31:30 +00:00
Sebastian Dröge
1de089fe81
[756/906] gldownload: Reset the viewport after download RGB via GLES2
2017-12-09 19:31:29 +00:00
Sebastian Dröge
85a4f1042b
[755/906] gldownload: Unbind framebuffer after downloading RGB with GLES2
2017-12-09 19:31:29 +00:00
Sebastian Dröge
f804d53a9c
[754/906] gldownload: Add support for RGB reordering when using GLES2
2017-12-09 19:31:29 +00:00
Sebastian Dröge
b28a1e943d
[748/906] glupload: GL_STENCIL_ATTACHMENT is needed for desktop GL, not GLES
2017-12-09 19:31:29 +00:00
Sebastian Dröge
6c5ce0ee99
[747/906] gl: Constify YUV conversion shaders
2017-12-09 19:31:29 +00:00
Sebastian Dröge
d0293d9f0c
[745/906] gl: Simplify and optimize YUV conversion shaders a bit
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
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
535074cc87
[655/906] download: remove erronous ReadBuffer call
...
- it was causing segfaults in mesa
- we didn't set the readbuffer so we shouldn't reset it
2017-12-09 19:31:27 +00:00
Matthew Waters
847e6540fb
[651/906] up/download: fix some typos when removing GLEW
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
7baddfbcbe
[599/906] GL|ES2: fix typos from recent changes and make downloading RGB formats work again
2017-12-09 19:31:25 +00:00
Matthew Waters
39866ea830
[590/906] up/download: fix scaling on transfer
...
i.e. uploading from a 10x10 video frame to a 20x20 texture into another 30x30 videoframe
2017-12-09 19:31:25 +00:00
Matthew Waters
9306c201f8
[579/906] download: fix YV12 format
...
same as I420 but plane 1+2 swapped
2017-12-09 19:31:25 +00:00
Matthew Waters
75734e663c
[578/906] {up,down}load: add variants that can be called in the gl thread
2017-12-09 19:31:25 +00:00
Matthew Waters
3ee54d3135
[573/906] add upload and download library objects
...
allows multiple upload pipelines that previously wasn't possible
(i.e. upload RGB and I420 and ... on the same GstGLDisplay)
2017-12-09 19:31:25 +00:00