Hi All,
I am trying to get our custom TW6865 capture card running on above platform. This is intended to run on kernel 4.1.15.1 with Ubuntu Xenial, and the mainline driver tw686x loaded. I've verified the hardware connection, can see pci link up and the device registration during the boot. Here is my kernel log :
In lsmod and lspci, I can see the driver loading and detection of the capture card respectively :
#lspci
gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,width=720,height=480,pixelformat=UYVY ! queue ! pngenc ! multifilesink location="/home/ubuntu/Pissu/frame%d.png"
The pipeline message can be seen here :
[Bash] pipeline_message - Pastebin.com
Tried with imxv4l2videosrc too, but no luck ! Is there any additional insight/direction that I can try?
Thanks in Advance
Hi Anuradha
for low level debug/testing one can try unit tests, imx-test/..mxc_v4l2_test
www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-test-5.7.tar.gz
please also check attached Linux Manual Chapter 9
Video for Linux Two (V4L2) Driver, sect.9.6 Unit Test
For gstreamer-imx one can post on meta-fsl-arm mailing list, so that someone
familiar with it could try to assist you.
https://lists.yoctoproject.org/listinfo/meta-freescale
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
gary_bisson, can you also give us an insight to this, specifically can you confirm that the gstreamer-1.0 does not need an additional patch to support dma_allocation ? I use this driver on one of the BD's ubuntu prebuilt images.
Thanks
Hi,
No GStreamer doesn't need another patch and works well for us. However note that you can't use the regular v4l2src but instead need to use the imx version:
$ gst-launch-1.0 imxv4l2videosrc device=/dev/video0 ! imxeglvivsink
In order to change the resolution, you need to pass a imx-capture-mode parameter.
Regards,
Gary
Hello Gary,
I think this imxv4l2videosrc doesn't work on Ubuntu prebuilt images. I rebuilt the gstreamer with all required plugins. Now it seems like imxv4l2videosrc is usable (after that, v4l2src cannot be used any longer in a gst pipeline), but the eglvivsink window turns Green and crashes the system. Can you give me some hints to get this work !
Atleast the capturing works before building gstreamer ! But only with v4l2src and the capturing speed is too slow !
Thanks
Hi,
No the imxv4l2videosrc has been tested with ov5640 cameras using our prebuilt images and is known to work.
As for your issue, I'm sorry but I won't be able to help you further since you use a custom device we don't have. I think you've reached a point where you can debug both the driver and the plugin if needed.
Regards,
Gary
Hi thanks for your confirmation Gary..... !
Hi Gary, got the issue resolved by disabling the pci interrupts from the kernel. But the pipeline only seems to work with v4l2src, not imxv4l2videosrc (With this I am getting the same error as shown above). That's why I came to think whether gstreamer would require an additional patch. Moreover with eglvivsink, video capturing is pretty slow.
Further adding to the observations,
By using newer kernel and tw686x driver (latest changes on Jan 13) :
above error disappeared for imx-capture-mode =0, but leaving a black vivsink window. For other formats, same error pops up. In any occasion, the video is not visible !
Further digging to this, by adding debug codes to pipeline, following error messages observed :
> With imxv4l2videosrc as the source
Setting pipeline to PAUSED ...
0:00:00.485079247 4148 0x2131f00 ERROR imxv4l2videosrc v4l2src.c:217:gst_imx_v4l2src_capture_setup:<imxv4l2videosrc0> VIDIOC_ENUM_FRAMESIZES failed: Inappropriate ioctl for device
0:00:00.485479242 4148 0x2131f00 ERROR imxv4l2videosrc v4l2src.c:284:gst_imx_v4l2src_start:<imxv4l2videosrc0> capture_setup failed
0:00:00.485666240 4148 0x2131f00 WARN basesrc gstbasesrc.c:3354:gst_base_src_start:<imxv4l2videosrc0> error: Failed to start
0:00:00.486115234 4148 0x2131f00 WARN basesrc gstbasesrc.c:3725:gst_base_src_activate_push:<imxv4l2videosrc0> Failed to start in push mode
0:00:00.486303232 4148 0x2131f00 WARN GST_PADS gstpad.c:1104:gst_pad_set_active:<imxv4l2videosrc0:src> Failed to activate pad
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
gstbasesrc.c(3354): gst_base_src_start (): /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0:
Failed to start
Setting pipeline to NULL ...
Freeing pipeline ...
> With v4l2src as the source
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.988085604 2825 0x20069b0 WARN v4l2bufferpool gstv4l2bufferpool.c:748:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold
In this case only the black window appears !
Just asking to confirm, is following patch already added to the gstreamer on prebuilt image (20160802-nitrogen-4.1.15_1.2.0_ga-xenial-en_US-mate_armhf) or patching no longer required ? Im using following pipelines :
$ gst-launch-1.0 imxv4l2videosrc device=/dev/video0 ! video/x-raw,width=720,height=480,pixelformat=UYVY ! imxipuvideotransform ! imxeglvivsink
$ gst-launch-1.0 imxv4l2videosrc imx-capture-mode=0 device=/dev/video0 ! imxipuvideotransform ! imxeglvivsink