Sebastian Dröge
631278270f
glupload: Fix assertion after API changes
2017-12-09 19:31:42 +00:00
Matthew Waters
5009338a50
gl/colorconvert: keep our private pointer
...
again, avoid to much trigger
2017-12-09 19:31:42 +00:00
Matthew Waters
04b2144ff1
gl/colorconvert: use GstObject's lock instead of our own
2017-12-09 19:31:42 +00:00
Matthew Waters
1544f66f26
gl/colorconvert: remove unnecassary pointer inderection
2017-12-09 19:31:42 +00:00
Matthew Waters
a22cb227a9
gl/upload: re add the upload meta to the private struct
...
try and avoid being to trigger happy
2017-12-09 19:31:42 +00:00
Matthew Waters
8b50888179
gl/upload: small code cleanup and gst-indent
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
a147b2258b
gl/upload: use GstObject's lock instead of our own
2017-12-09 19:31:42 +00:00
Matthew Waters
30a9843c02
gl/filter: also remove the width/height in transform_caps
...
allows scaling in the filters
2017-12-09 19:31:42 +00:00
Matthew Waters
8cf3a3a4f4
gl/colorconvert: optimise the same format case
...
simply return the input buffer unchanged
2017-12-09 19:31:41 +00:00
Matthew Waters
4fe67d48be
gl/colorconvert: fix YUY2/UYVY download for RG/LA textures
2017-12-09 19:31:41 +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
738ebcaaba
gl/upload: fix incorrect type in macros
2017-12-09 19:31:41 +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
Matthew Waters
1f6fceafa4
gl/win32: make send_message reentrant
...
I could not find a comparable win32API function so keep the running
thread pointer to compare against.
https://bugzilla.gnome.org/show_bug.cgi?id=730782
2017-12-09 19:31:41 +00:00
Tim-Philipp Müller
06351d4d9b
glcolorconvert: fix compiler warning
...
gstglcolorconvert.c:1133:11: error: 'j' may be used uninitialized in this function
Was used uninitialized when jumping to out label
in error case.
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
Julien Isorce
67c18fee19
gl: add missing cgl and eagl context type
...
https://bugzilla.gnome.org/show_bug.cgi?id=729245
2017-12-09 19:31:41 +00:00
Julien Isorce
b84a2eaf9f
gl: rename platform cocoa to cgl
...
Before:
GST_GL_PLATFORM=cocoa GST_GL_WINDOW=cocoa
gst-launch-1.0 videotestsrc ! glimagesink
After:
GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa
gst-launch-1.0 videotestsrc ! glimagesink
but still pass --enable-cocoa to configure script
because currently it can only be used with cocoa API.
We could later have cgl/gstglcontext_cgl.h that manages
a CGLContextObj directly and cocoa/gstglcontext_cocoa.h
would just wrap it.
So that it could be used with other Apple's window APIs.
https://bugzilla.gnome.org/show_bug.cgi?id=729245
2017-12-09 19:31:41 +00:00
Matthew Waters
9349d39023
gl/mixer: don't segfault when we don't have a buffer
...
https://bugzilla.gnome.org/show_bug.cgi?id=729257
2017-12-09 19:31:41 +00:00
Matthew Waters
e502311ce4
gl/window_x11: avoid BadDrawable error on shutdown
2017-12-09 19:31:41 +00:00
Matthew Waters
f2bf233ce4
gl/context_egl: pass the vars in the right order to DestroySurface
...
https://bugzilla.gnome.org/show_bug.cgi?id=728514
2017-12-09 19:31:41 +00:00
Nicolas Dufresne
d85c344204
glfilter: Remove format information to allow color convert again
...
We also need to remove the format information, as glfilter can do
color convertion. This code was imported from videoconvert.
https://bugzilla.gnome.org/show_bug.cgi?id=729861
2017-12-09 19:31:41 +00:00
Matthew Waters
ee04a6e6eb
gl/memory: allocate the correct memory size
...
and avoid wasting resources we will never need
https://bugzilla.gnome.org/show_bug.cgi?id=730703
2017-12-09 19:31:41 +00:00
Nicolas Dufresne
73c73470a0
glcolorconvert: Fix YUY2 and UYVY support with luminance_alpha
...
https://bugzilla.gnome.org/show_bug.cgi?id=730666
2017-12-09 19:31:41 +00:00
Matthew Waters
146c666ba2
gl/memory: provide compatability defines
...
fixes build on android/OS X
2017-12-09 19:31:41 +00:00
Matthew Waters
2279713aa0
gl/colorconvert: remove scratch texture for YUY2/UYVY
...
We can get all our data from the one RG/LA texture with some shader magic.
https://bugzilla.gnome.org/show_bug.cgi?id=728890
2017-12-09 19:31:41 +00:00
Matthew Waters
b3d9563d6b
gl/memory: RGBA/UNSIGNED_BYTE only format supported by ReadPixels GLES2
...
Error out in case we attempt to read with any other invalid format.
2017-12-09 19:31:41 +00:00
Matthew Waters
b3df031908
gl/memory: generate textures with a sized internal format
...
Required in order to generate RG and RED textured with GLES3.
2017-12-09 19:31:41 +00:00
Matthew Waters
132a233f7b
gl/memory: implement GL_EXT_texture_rg support
...
Which is used by default over the Luminance formats due to it
being color renderable with fbos (and deprecation/removal with
GL 3.x).
https://bugzilla.gnome.org/show_bug.cgi?id=729750
https://bugzilla.gnome.org/show_bug.cgi?id=704222
https://bugzilla.gnome.org/show_bug.cgi?id=728890
2017-12-09 19:31:41 +00:00
Matthew Waters
4435c1c289
gl/context: add gl extension checking to check_feature()
...
Useful for extensions that do not define any new GL API entrypoints
but can still modify behaviour when used.
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
9cfd5e5d04
gl/filter: fixup passthrough bufferpool
...
In a pipeline like so:
videotestsrc ! gleffects ! videoconvert ! sink
gleffects was simply passing the videoconvert bufferpool to videotestsrc
and not creating a glbufferpool. videobufferpool would then fail
to allocate from the glallocator.
2017-12-09 19:31:41 +00:00
Matthew Waters
313dfbb500
gl/upload: switch the 'master' texture for YUY2, UYVY
...
From d4bcef3204
on, using a RGBA
texture to hold the data causes the glmemory to have half width
and a scaling of [2, 1]. Using a LA texture solves this problem
however cannot be attached to the framebuffer for copying into
a RGBA texture. Which will be solved by moving to EXT_texture_rg.
https://bugzilla.gnome.org/show_bug.cgi?id=728890
2017-12-09 19:31:41 +00:00
Matthew Waters
51fdeef98b
gl/eglimage: add eglimage context feature
...
Allows us to selectively use EGLImages only when available
https://bugzilla.gnome.org/show_bug.cgi?id=728234
2017-12-09 19:31:41 +00:00
Matthew Waters
166d7b505c
gl/context: add generic feature checking
...
At the moment it simply delegates to the subclass.
2017-12-09 19:31:40 +00:00
Sebastian Dröge
9fd7e34fee
glcontext: Add more assertions to make sure that everything sets the GError during context creation if something fails
2017-12-09 19:31:40 +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
5efb69304a
gl/colorconvert: fix up alpha clobbering
...
Previously it would only work if the alpha value was in the last
component (RGBx, BGRx). Now it works wherever the alpha value may
be (xRGB, xBGR, etc).
2017-12-09 19:31:40 +00:00
Nicolas Dufresne
b4a0a26ddd
glfilter: Fix building without EGL support
...
This fixes the OSX build and any builds with --disable-egl. That issue
was introduced in "glfilter: rewrite transform_caps to preserve caps fields".
https://bugzilla.gnome.org/show_bug.cgi?id=729861
2017-12-09 19:31:40 +00:00
Julien Isorce
a7156df9f4
glfilter: rewrite transform_caps to preserve caps fields
...
https://bugzilla.gnome.org/show_bug.cgi?id=729861
2017-12-09 19:31:40 +00:00
Matthew Waters
07b6bfeaa7
gl/colorconvert: use the texture scaling from the gl memory
...
The colorconvert values were not being used at all.
https://bugzilla.gnome.org/show_bug.cgi?id=729896
2017-12-09 19:31:40 +00:00
Nicolas Dufresne
157607989a
glmemory: Fix handling of stride with alignement larger then 8
...
Setting a scaled factor for X coordinate is not enough as the indexer
will still think stride is shorter and will not fully skip it. Instead,
update width, so the lines are as expected. Combined with the scale, it
will hide the cropped portion.
https://bugzilla.gnome.org/show_bug.cgi?id=729896
2017-12-09 19:31:40 +00:00
Nicolas Dufresne
030fc8b7d0
glupload: Ensure we still have a texture after upload_set_format()
...
gst_gl_upload_set_format() resets the upload, hence the texture.
So we need to ensure we have a texture after this call when
uploading.
2017-12-09 19:31:40 +00:00
Nicolas Dufresne
b70edbff15
glupload: Correctly update the video info from video meta
...
Using gst_video_info_set_format() isn't complete when updating
a video info from video meta.
2017-12-09 19:31:40 +00:00
Nicolas Dufresne
2f705ac9ca
glupload: Correctly update video info in upload fallback
...
When the upload accelerated method fails, we fallback to an upload,
but the video info was not correctly updated.
2017-12-09 19:31:40 +00:00
Julien Isorce
c16ab9e66b
gl/upload: set out_tex after reset, not before
...
Fix a regression introduced recently with the lazy init.
It was happening when calling gst_video_gl_texture_upload_meta_upload
from an aplication. So not using gst_gl_upload_perform_with_buffer.
2017-12-09 19:31:40 +00:00
Matthew Waters
5cdfd51172
gl/upload: update the video info on mapping a video frame
...
The buffer should contain the most specific data on how the data is
formatted. We should use this information.
https://bugzilla.gnome.org/show_bug.cgi?id=729896
2017-12-09 19:31:40 +00:00
Matthew Waters
480784e368
gl/convert: clobber alpha channel when needed
...
Needed in the conversion from padded RGB formats to formats with an
alpha channel. e.g. BGRx -> ABGR, etc
https://bugzilla.gnome.org/show_bug.cgi?id=729742
2017-12-09 19:31:40 +00:00
Matthew Waters
59c388abca
gl/upload: avoid performing color conversion when there is no need
...
One such example is when the buffer contains GstGLMemory in the
RGBA format
https://bugzilla.gnome.org/show_bug.cgi?id=729278
2017-12-09 19:31:40 +00:00