DirectViv texture upload method is broken
Submitted by Jan Schmidt
If the DirectVIV texture upload method is available, it adds caps transformations to the glupload negotiated caps set, but might not be able to perform them when buffers arrive if the buffers don't contain GstMemory from a physical memory allocator.
That means that this use case no longer works:
gst-launch-1.0 videotestsrc ! glupload ! glimagesink
glupload will negotiate to transform I420 to RGBA, but fail to do it. Instead, the raw memory upload will output buffers that contain I420 GstVideoMeta, with RGBA caps and result in:
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"(GstGLDisplayX11)\ gldisplayx11-0";
** (gst-launch-1.0:9095): CRITICAL **: gst_video_frame_map_id: assertion 'info->finfo->format == meta->format' failed
0:00:00.722662716 9095 0x8c1bb0 ERROR glimagesink gstglimagesink.c:1610:prepare_next_buffer: Failed to map video frame.
ERROR: from element /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLImageSink:sink: Failed to convert multiview video buffer
Additional debug info:
gstglimagesink.c(1720): gst_glimage_sink_prepare (): /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLImageSink:sink
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
The DirectVIV method really needs a Caps Feature on the received caps to confirm that the buffers it will be receiving are going to work.