GNOME Bugzilla – Bug 761454
v4l2src + compositor: can't negotiate caps after going from PLAYING->READY
Last modified: 2018-11-03 13:45:58 UTC
When using the compositor together with a v4l2src the pipeline will run fine the first time it changes from READY->PLAYING. But if the pipeline is put back to READY and then to PLAYING it will fail to negotiate the caps. I have encapsulated (using gst_parse_launch) the following pipelines in a simple GTK application which gives me 2 buttons: PLAY and STOP, which respectively set the state to PLAYING and to READY The following pipeline works all the time: (I can use the PLAY and STOP buttons as much as I want) "videotestsrc ! tee name=t1 ! queue ! videoconvert ! compositor name=mux ! videoconvert ! fakesink t1. ! queue ! videoconvert ! gtksink name=sink t1. ! queue ! videoconvert ! mux." If I then change the videotestsrc to a v4l2src. It will run fine the first time I click PLAY. But it fails (Internal data flow error) after clicking STOP and then trying PLAY again. "v4l2src ! tee name=t1 ! queue ! videoconvert ! compositor name=mux ! videoconvert ! fakesink t1. ! queue ! videoconvert ! gtksink name=sink t1. ! queue ! videoconvert ! mux." At first glance it only shows a Internal data flow error and reason not-negotiated (-4): Error received from element v4l2src0: Internal data flow error. Debugging information: /var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/bobcat_64-poky-linux/gstreamer1.0/git-r0/git/libs/gst/base/gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: streaming task paused, reason not-negotiated (-4) Error received from element queue0: Internal data flow error. Debugging information: /var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/bobcat_64-poky-linux/gstreamer1.0/git-r0/git/plugins/elements/gstqueue.c(968): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue0: streaming task paused, reason not-negotiated (-4) Error received from element queue2: Internal data flow error. Debugging information: /var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/bobcat_64-poky-linux/gstreamer1.0/git-r0/git/plugins/elements/gstqueue.c(968): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue2: streaming task paused, reason not-negotiated (-4) Then by setting the debug levels it seems it is something with caps being NULL on the videoaggregator: 0:00:09.029054344 16712 0x7faf40002050 ERROR videoaggregator gstvideoaggregator.c:856:gst_videoaggregator_pad_sink_setcaps:<mux:sink_0> got input caps video/x-raw, width=(int)320, height=(int)200, framerate=(fraction)100/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)interleaved, format=(string)RGBx, but current caps are (NULL) 0:00:09.029535582 16712 0x7faf40002050 ERROR videoaggregator gstvideoaggregator.c:856:gst_videoaggregator_pad_sink_setcaps:<mux:sink_0> got input caps video/x-raw, width=(int)320, height=(int)200, framerate=(fraction)100/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)interleaved, format=(string)RGBx, but current caps are (NULL) 0:00:09.029782526 16712 0x7faf40002050 WARN GST_PADS gstpad.c:3989:gst_pad_peer_query:<videoconvert0:src> could not send sticky events 0:00:09.030124577 16712 0x7faf3c001ed0 ERROR videoaggregator gstvideoaggregator.c:856:gst_videoaggregator_pad_sink_setcaps:<mux:sink_1> got input caps video/x-raw, width=(int)320, height=(int)200, framerate=(fraction)100/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)interleaved, format=(string)RGBx, but current caps are (NULL) 0:00:09.030581896 16712 0x7faf3c001ed0 ERROR videoaggregator gstvideoaggregator.c:856:gst_videoaggregator_pad_sink_setcaps:<mux:sink_1> got input caps video/x-raw, width=(int)320, height=(int)200, framerate=(fraction)100/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)interleaved, format=(string)RGBx, but current caps are (NULL) 0:00:09.030675138 16712 0x7faf3c001ed0 WARN GST_PADS gstpad.c:3989:gst_pad_peer_query:<videoconvert3:src> could not send sticky events 0:00:09.030266606 16712 0x7faf3c002230 WARN v4l2 gstv4l2object.c:3712:gst_v4l2_object_decide_allocation:<v4l2src0> decide allocation 0:00:09.031489911 16712 0x7faf3c002230 WARN v4l2bufferpool gstv4l2bufferpool.c:749:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold 0:00:09.056940651 16712 0x7faf40002050 ERROR videoaggregator gstvideoaggregator.c:856:gst_videoaggregator_pad_sink_setcaps:<mux:sink_0> got input caps video/x-raw, width=(int)320, height=(int)200, framerate=(fraction)100/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)interleaved, format=(string)RGBx, but current caps are (NULL) 0:00:09.057781339 16712 0x7faf3c001ed0 ERROR videoaggregator gstvideoaggregator.c:856:gst_videoaggregator_pad_sink_setcaps:<mux:sink_1> got input caps video/x-raw, width=(int)320, height=(int)200, framerate=(fraction)100/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)interleaved, format=(string)RGBx, but current caps are (NULL) 0:00:09.059067764 16712 0x7faf40002050 ERROR videoaggregator gstvideoaggregator.c:856:gst_videoaggregator_pad_sink_setcaps:<mux:sink_0> got input caps video/x-raw, width=(int)320, height=(int)200, framerate=(fraction)100/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)interleaved, format=(string)RGBx, but current caps are (NULL) 0:00:09.059970677 16712 0x7faf3c001ed0 ERROR videoaggregator gstvideoaggregator.c:856:gst_videoaggregator_pad_sink_setcaps:<mux:sink_1> got input caps video/x-raw, width=(int)320, height=(int)200, framerate=(fraction)100/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)interleaved, format=(string)RGBx, but current caps are (NULL) 0:00:09.065392758 16712 0x7faf3c002230 WARN basesrc gstbasesrc.c:2943:gst_base_src_loop:<v4l2src0> error: Internal data flow error. 0:00:09.065443831 16712 0x7faf3c002230 WARN basesrc gstbasesrc.c:2943:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason not-negotiated (-4) 0:00:09.065583363 16712 0x7faf3c002230 WARN queue gstqueue.c:968:gst_queue_handle_sink_event:<queue0> error: Internal data flow error. 0:00:09.065619824 16712 0x7faf3c002230 WARN queue gstqueue.c:968:gst_queue_handle_sink_event:<queue0> error: streaming task paused, reason not-negotiated (-4) 0:00:09.065687791 16712 0x7faf3c002230 WARN queue gstqueue.c:968:gst_queue_handle_sink_event:<queue2> error: Internal data flow error. 0:00:09.065706444 16712 0x7faf3c002230 WARN queue gstqueue.c:968:gst_queue_handle_sink_event:<queue2> error: streaming task paused, reason not-negotiated (-4) Error received from element v4l2src0: Internal data flow error. Debugging information: /var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/bobcat_64-poky-linux/gstreamer1.0/git-r0/git/libs/gst/base/gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: streaming task paused, reason not-negotiated (-4) Error received from element queue0: Internal data flow error. Debugging information: /var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/bobcat_64-poky-linux/gstreamer1.0/git-r0/git/plugins/elements/gstqueue.c(968): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue0: streaming task paused, reason not-negotiated (-4) Error received from element queue2: Internal data flow error. Debugging information: /var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/bobcat_64-poky-linux/gstreamer1.0/git-r0/git/plugins/elements/gstqueue.c(968): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue2: streaming task paused, reason not-negotiated (-4) Since it works with videotestsrc and it doesnt with v4l2src Im not sure if the issue is in the v4l2src or in the compositor
After further testing I can see that it doesn't fail all the time. It works maybe 50% of the time so I'm guessing ti could be some type of race condition...
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/346.