AnsweredAssumed Answered

IMX6DQ and gstremer-1.0 video pipeline issue: imxv4l2src Capabilities are Empty

Question asked by Adam Schafer on Jun 1, 2017
Latest reply on Jun 5, 2017 by Adam Schafer

Greetings,

 

We have a custom board with an adv7282 video decoder feeding into IPU1/CSI0 and an out through an adv7391 encoder connected to IPU1/DISP2.  We've managed to bring up these chips/interfaces and have successfully tested them with the utilities in the /unit_tests directory -- the following script will record ~1 second of video from the decoder, save it to a file, and then push it out through the encoder:

 

WIDTH=720
HEIGHT=480

 

echo "Capturing video from input\n"
/unit_tests/mxc_v4l2_capture.out -iw $WIDTH -ih $HEIGHT -ow $WIDTH -oh $HEIGHT -d /dev/video0 -m tmp

 

echo "Pushing video to output"
/unit_tests/mxc_v4l2_output.out -iw $WIDTH -ih $HEIGHT tmp

 

However, we're running into an issue when trying to pipe the decoded input video to the output encoder using gstreamer:

 

root@imx6dqscm-1gb-hub-11x:~# gst-launch-1.0 imxv4l2src device=/dev/video0 ! imxv4l2sink
====== IMXV4L2SRC: 4.0.9 build on May 16 2017 20:39:59. ======
====== IMXV4L2SINK: 4.0.9 build on May 16 2017 20:39:59. ======
WARNING: erroneous pipeline: could not link imxv4l2src0 to imxv4l2sink0

 

Being new to gstreamer I've been pretty lost trying to find a solution to this issue.  After digging through some debug steps, I think that the issue is related to the src and sink capabilities, as shown in the bolded sections below:

 

root@imx6dqscm-1gb-hub-11x:~# gst-launch-1.0 imxv4l2src device=/dev/video0 ! imxv4l2sink --gst-debug=GST_CAPS:6
====== IMXV4L2SRC: 4.0.9 build on May 16 2017 20:39:59. ======
====== IMXV4L2SINK: 4.0.9 build on May 16 2017 20:39:59. ======
0:00:01.043703334 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:2838:gst_pad_query_caps:<imxv4l2src0:src> get pad caps with filter (NULL)
0:00:01.044001334 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:2845:gst_pad_query_caps:<imxv4l2src0:src> query returned EMPTY
0:00:01.044082000 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:2838:gst_pad_query_caps:<imxv4l2sink0:sink> get pad caps with filter (NULL)
0:00:01.044308667 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:2845:gst_pad_query_caps:<imxv4l2sink0:sink> query returned video/x-raw, format=(string){ RGB16, BGR, RGB, RGBx, BGRx, NV12, UYVY, YUY2, Y42B, I420, YV12, TNVP, TNVF, Y444 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:01.044481000 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:2838:gst_pad_query_caps:<imxv4l2src0:src> get pad caps with filter (NULL)
0:00:01.044571667 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:2845:gst_pad_query_caps:<imxv4l2src0:src> query returned EMPTY
0:00:01.044724334 647 0x34b1a0 LOG GST_CAPS gstutils.c:809:gst_element_get_compatible_pad_template: checking pad template sink
0:00:01.044794667 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:814:gst_element_get_compatible_pad_template: compatible direction: found sink pad template "sink"
0:00:01.044860334 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:817:gst_element_get_compatible_pad_template: intersecting EMPTY
0:00:01.044918667 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:819:gst_element_get_compatible_pad_template: ..and video/x-raw, format=(string){ RGB16, BGR, RGB, RGBx, BGRx, NV12, UYVY, YUY2, Y42B, I420, YV12, TNVP, TNVF, Y444 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition), format=(string){ RGB16, BGR, RGB, RGBx, BGRx, NV12, UYVY, YUY2, Y42B, I420, YV12, TNVP, TNVF, Y444 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:01.045093667 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:825:gst_element_get_compatible_pad_template: caps are not compatible
0:00:01.045246667 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:2838:gst_pad_query_caps:<imxv4l2sink0:sink> get pad caps with filter (NULL)
0:00:01.045431334 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:2845:gst_pad_query_caps:<imxv4l2sink0:sink> query returned video/x-raw, format=(string){ RGB16, BGR, RGB, RGBx, BGRx, NV12, UYVY, YUY2, Y42B, I420, YV12, TNVP, TNVF, Y444 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:01.045568334 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:2838:gst_pad_query_caps:<imxv4l2src0:src> get pad caps with filter (NULL)
0:00:01.045653667 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:2845:gst_pad_query_caps:<imxv4l2src0:src> query returned EMPTY
0:00:01.045744334 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:2838:gst_pad_query_caps:<imxv4l2sink0:sink> get pad caps with filter (NULL)
0:00:01.045912667 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:2845:gst_pad_query_caps:<imxv4l2sink0:sink> query returned video/x-raw, format=(string){ RGB16, BGR, RGB, RGBx, BGRx, NV12, UYVY, YUY2, Y42B, I420, YV12, TNVP, TNVF, Y444 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:01.378598000 647 0x34b1a0 LOG GST_CAPS gstutils.c:809:gst_element_get_compatible_pad_template: checking pad template src
0:00:01.378672334 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:814:gst_element_get_compatible_pad_template: compatible direction: found src pad template "src"
0:00:01.378739667 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:817:gst_element_get_compatible_pad_template: intersecting video/x-raw, format=(string){ RGB16, BGR, RGB, RGBx, BGRx, NV12, UYVY, YUY2, Y42B, I420, YV12, TNVP, TNVF, Y444 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:01.378869334 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:819:gst_element_get_compatible_pad_template: ..and EMPTY
0:00:01.378929000 647 0x34b1a0 DEBUG GST_CAPS gstutils.c:825:gst_element_get_compatible_pad_template: caps are not compatible
WARNING: erroneous pipeline: could not link imxv4l2src0 to imxv4l2sink0

 

Does anyone have an idea why imxv4l2src would return an empty set of capabilities?  Is there a way I can define the capabilities of imxv4l2src via the gstreamer commandline?

 

Thank you for your time.  Please let me know if I can provide any more helpful information.

 

Regards,

-Adam

Outcomes