Hello,
I am trying to understand the usage of format in the caps - video/x-raw. I have the following pipeline : v4l2src -> queue -> video/x-raw -> h264parse -> avdec_h264 -> gltransformation -> glimagesink #root@linux-GP60-2PE:~# GST_DEBUG=3 gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! queue ! video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! avdec_h264 ! gltransformation ! glimagesink However, the above fails with the following error: 0:00:00.070642932 13328 0x558be86e3a10 ERROR GST_PIPELINE grammar.y:740:gst_parse_perform_link: could not link avdec_h264-0 to gltransformation0 WARNING: erroneous pipeline: could not link avdec_h264-0 to gltransformation0 I also tried setting the caps, after avdec_h264(not sure if it is the right thing to do) #root@linux-GP60-2PE:~# GST_DEBUG=3 gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! queue ! video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! avdec_h264 ! video/x-raw,width=640,height=480,framerate=30/1,format=RGBA ! gltransformation ! glimagesink #0:00:00.065133323 13359 0x55b36ce37720 ERROR GST_PIPELINE grammar.y:726:gst_parse_perform_link: could not link avdec_h264-0 to gltransformation0, gltransformation0 can't handle caps video/x-raw, width=(int)640, height=(int)480, framerate=(fraction)30/1, format=(string)RGBA WARNING: erroneous pipeline: could not link avdec_h264-0 to gltransformation0, gltransformation0 can't handle caps video/x-raw, width=(int)640, height=(int)480, framerate=(fraction)30/1, format=(string)RGBA Now the source and sink pads for gltransformation and avdec_h264 supports 'video/x-raw, format=RGBA'. I am trying to understand how the 'format' affects the behaviour in the above command. The below line works perfectly fine : #root@linux-GP60-2PE:~# GST_DEBUG=3 gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! queue ! video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! avdec_h264 ! glimagesink Can anyone explain the behaviour here? -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
gltransformation takes RGBA as an input from GLMemory. The
memory:GLMemory part of the caps are significant and will cause a negotiation failure if they do not match between the elements. avdec_h264 is most likely producing a YUV variant. Therefore you need two steps to 1. upload the data and then 2. convert it to RGBA. These are the elements glupload and glcolorconvert respectively. The reason glimagesink works is that glimagesink is actually a bin of glupload ! glcolorconvert ! actual-sink-element. Cheers -Matt On 08/08/18 23:46, vk_gst wrote: > Hello, > > I am trying to understand the usage of format in the caps - video/x-raw. > I have the following pipeline : > v4l2src -> queue -> video/x-raw -> h264parse -> avdec_h264 -> > gltransformation -> glimagesink > > #root@linux-GP60-2PE:~# GST_DEBUG=3 gst-launch-1.0 -v -e v4l2src > device=/dev/video0 ! queue ! > video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! avdec_h264 ! > gltransformation ! glimagesink > > However, the above fails with the following error: > > 0:00:00.070642932 13328 0x558be86e3a10 ERROR GST_PIPELINE > grammar.y:740:gst_parse_perform_link: could not link avdec_h264-0 to > gltransformation0 > WARNING: erroneous pipeline: could not link avdec_h264-0 to > gltransformation0 > > I also tried setting the caps, after avdec_h264(not sure if it is the right > thing to do) > > #root@linux-GP60-2PE:~# GST_DEBUG=3 gst-launch-1.0 -v -e v4l2src > device=/dev/video0 ! queue ! > video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! avdec_h264 ! > video/x-raw,width=640,height=480,framerate=30/1,format=RGBA ! > gltransformation ! glimagesink > > #0:00:00.065133323 13359 0x55b36ce37720 ERROR GST_PIPELINE > grammar.y:726:gst_parse_perform_link: could not link avdec_h264-0 to > gltransformation0, gltransformation0 can't handle caps video/x-raw, > width=(int)640, height=(int)480, framerate=(fraction)30/1, > format=(string)RGBA > WARNING: erroneous pipeline: could not link avdec_h264-0 to > gltransformation0, gltransformation0 can't handle caps video/x-raw, > width=(int)640, height=(int)480, framerate=(fraction)30/1, > format=(string)RGBA > > Now the source and sink pads for gltransformation and avdec_h264 supports > 'video/x-raw, format=RGBA'. > > I am trying to understand how the 'format' affects the behaviour in the > above command. The below line works perfectly fine : > > #root@linux-GP60-2PE:~# GST_DEBUG=3 gst-launch-1.0 -v -e v4l2src > device=/dev/video0 ! queue ! > video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! avdec_h264 > ! glimagesink > > Can anyone explain the behaviour here? _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (499 bytes) Download Attachment |
Free forum by Nabble | Edit this page |