gldownloadelement: fix downloading of 'RGBA' EGLImages

NXP has broken basic standard use like
source ! glupload ! glcolorconvert ! gldownload ! video/x-raw,format=RGBA ! sink
in their fork. In this pipeline, if source produces dmabufs, the
pipeline output is always just black. That's because the dmabuf wrapped
EGLImage marked as RGBA is never drawn. glcolorconvert will pass through
of same RGBA caps but the buffer isn't RGBA in traditional GStreamer
sense, it can simply just be sampled as a RGBA texture by hardware when
drawing.

Detect this situation and force drawing to an actual RGBA texture that
can be efficiently downloaded. This restores standard GStreamer
behavior.

BUG: 148157331

Change-Id: I229efde22f49d9540c85b38923dbea4d4eb257bc
2 files changed