After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769210 - GLMemory created by avfvideosrc and vtdec on iOS (EAGL/gles3) can't be mapped
GLMemory created by avfvideosrc and vtdec on iOS (EAGL/gles3) can't be mapped
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Mac OS
: Normal blocker
: 1.9.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-27 06:44 UTC by Alessandro Decina
Modified: 2016-08-26 10:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alessandro Decina 2016-07-27 06:44:07 UTC
We recently switched gstgl to gles3 on iOS (5592a966). As part of this we also changed the textures we output from avfvideosrc and vtdec to L/LA from R/RG (9a325f4) since when using the gles3 driver R/RG is not supported anymore in AVF/VT, which makes little sense but it's how it is. 

One side effect of this is that when doing GLMemory, now buffers can't be mapped to main memory anymore. gst_gl_memory_read_pixels fails in glFramebufferTexture2D with GL_FRAMEBUFFER_UNSUPPORTED.

The long term solution to this is to use GstIOSurfaceMemory on ios as we do macos. IOSurface is still a private framework on iOS tho so we need an ad interim solution.
Comment 1 Alessandro Decina 2016-08-26 07:46:32 UTC
commit 7898bc581053b1716e9d7ecaeb148ec8d60d1c29
Author: Alessandro Decina <alessandro.d@gmail.com>
Date:   Fri Aug 26 17:37:54 2016 +1000

    applemedia: changes to make GL memory mappable on CPU on iOS

    This commit introduces IOSGLMemory which is a GLMemory that falls back to
    GstAppleCoreVideoMemory for CPU access. This is a temporary solution until
    IOSurface gets exposed as a public framework on iOS and so we can use
    IOSurfaceMemory on both MacOS and iOS.

    https://bugzilla.gnome.org/show_bug.cgi?id=769210
Comment 2 Sebastian Dröge (slomo) 2016-08-26 07:47:48 UTC
This seems too risky to backport to 1.8, do we need it in 1.8 really?
Comment 3 Alessandro Decina 2016-08-26 10:28:26 UTC
Yeah please don't backport. If we want to fix this in 1.8 the easiest is probably to make the GST_GL_API env var actually work on iOS so people can fallback to gles2 where mapping does work.