autovideoconvert: check caps negotiation when selecting the element
requested to merge elliot_chen/gstreamer:autovideoconvert-cause-caps-negotiation-issue-when-selecting-glcolorconvert into main
- The issue can be reproduced with the below pipeline when selecting glcolorconvert combinations if video sink is waylandsink. Please refer to the attachemnt for the detailed log autovideoconvert_fail.log
gst-launch-1.0 filesrc location=JPEG_BL_1280X720_q84_444.jpg ! jpegdec ! imagefreeze ! autovideoconvert ! waylandsink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'glcolorconvertelement3': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"(GstGLDisplayWayland)\ gldisplaywayland0";
ERROR: from element /GstPipeline:pipeline0/GstImageFreeze:imagefreeze0: Internal data stream error.
Additional debug info:
/usr/src/debug/gstreamer1.0-plugins-good/1.24.0.imx/gst/imagefreeze/gstimagefreeze.c(1166): gst_image_freeze_src_loop (): /GstPipeline:pipeline0/GstImageFreeze:imagefreeze0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
-
Both glcolorconvert and waylandsink support dmabuf. But glupload and glcolorconvert only support dmabuf DMA_DRM passthrough. If the upstream is not dmabuf, glcolorconvert can't ouput dmabuf and can cause caps negotiation failure if it connects to waylandsink.
-
Need check caps negotiation when activating the element or checking to reuse the current element.
Edited by elliot chen