GNOME Bugzilla – Bug 769210
GLMemory created by avfvideosrc and vtdec on iOS (EAGL/gles3) can't be mapped
Last modified: 2016-08-26 10:28:26 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.
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
This seems too risky to backport to 1.8, do we need it in 1.8 really?
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.