gst-launch pipeline VIDIOC_DQBUF failed, but yavta and mxc_v4l2_capture.out working.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

gst-launch pipeline VIDIOC_DQBUF failed, but yavta and mxc_v4l2_capture.out working.

ソリューションへジャンプ
3,544件の閲覧回数
nayanpatel
Contributor II

Hi Team,

I have been working with ov10635 image sensor and created a v4l2 capture driver inside linux. With current setup, I can able to capture frames from image sensor as yavta and mxc-v4l2-capture.out is working.

yavta /dev/video1 -c30 -n4 -s640x480 -fYUYV -Ftest.raw // Working

./mxc_v4l2_capture.out -iw 640 -ih 480 -ow 640 -oh 480 -m 0 -r 0 -c 1 -fr 30 -d /dev/video1 test.yuv // Working

 but we are getting VIDIOC_DQBUF error with Gstreamer pipeline. Using following gstreamer pipeline.

gst-launch-1.0  --gst-debug=4 imxv4l2videosrc device=/dev/video1 imx-capture-mode=3 num-additional-buffers=50 ! videoparse width=640 height=480 framerate=30/1 format=7 ! videoconvert ! autovideosink  window-width="640" window-height="480" borderless-window="true" force-aspect-ratio="false"

ラベル(4)
1 解決策
2,695件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Nayan

one can try with nxp gst1.0-plugins using attached Linux Guide sect.7.3 Multimedia use cases

from documentation on

https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/i.mx-6ser...

for issues with gstreamer-imx (which is used in the case) one can post on its github page
https://github.com/Freescale/gstreamer-imx/issues

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
6 返答(返信)
2,695件の閲覧回数
nayanpatel
Contributor II

There is no issue with the any of the plugin. Updated gstreamer pipeline as per IPU register configuration.

gst-launch-1.0 imxv4l2videosrc device=/dev/video1 input=0 imx-capture-mode=0 fps-n=30 ! imxipuvideotransform  ! imxeglvivsink  

With above pipeline we had live streaming working.

Thanks for sharing your views igorpadykov‌ & @marco

0 件の賞賛
2,696件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Nayan

one can try with nxp gst1.0-plugins using attached Linux Guide sect.7.3 Multimedia use cases

from documentation on

https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/i.mx-6ser...

for issues with gstreamer-imx (which is used in the case) one can post on its github page
https://github.com/Freescale/gstreamer-imx/issues

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
2,695件の閲覧回数
nayanpatel
Contributor II

Thank you very much for the reply igorpadykov

I have debug this issue further after long time. I have found there is some mismatch in the ipu logs where gstremer pipeline is requesting on other dma channel. Kindly help, is there anything related to DMA channel, as with gstreamer pipeline there are not interrupts on the IPU? 

__________________________________________________________________________________________________

./mxc_v4l2_capture.out -iw 640 -ih 480 -ow 640 -oh 480 -m 3 -r 0 -c 30 -fr 15 -d /dev/video1 test.yuv

or

yavta -fUYVY /dev/video1 -c30 -n4 -s640x480 -Ftest.yuv

imx-ipuv3 2800000.ipu: init channel = 19
imx-ipuv3 2800000.ipu: ipu busfreq high requst.
imx-ipuv3 2800000.ipu: initializing idma ch 20 @ c0960500
imx-ipuv3 2800000.ipu: ch 20 word 0 - 00000000 25800000 000BB800 E0000000 00077C4F
imx-ipuv3 2800000.ipu: ch 20 word 1 - 08920000 01124000 2043C000 00009EC0 0000003F
imx-ipuv3 2800000.ipu: PFS 0x2,
imx-ipuv3 2800000.ipu: BPP 0x0,
imx-ipuv3 2800000.ipu: NPB 0xf
imx-ipuv3 2800000.ipu: FW 639,
imx-ipuv3 2800000.ipu: FH 479,
imx-ipuv3 2800000.ipu: EBA0 0x44900000
imx-ipuv3 2800000.ipu: EBA1 0x44900000
imx-ipuv3 2800000.ipu: Stride 635
imx-ipuv3 2800000.ipu: scan_order 0
imx-ipuv3 2800000.ipu: uv_stride 63
imx-ipuv3 2800000.ipu: u_offset 0x4b000
imx-ipuv3 2800000.ipu: v_offset 0x5dc00
imx-ipuv3 2800000.ipu: Width0 0+1,
imx-ipuv3 2800000.ipu: Width1 0+1,
imx-ipuv3 2800000.ipu: Width2 0+1,
imx-ipuv3 2800000.ipu: Width3 0+1,
imx-ipuv3 2800000.ipu: Offset0 31,
imx-ipuv3 2800000.ipu: Offset1 1,
imx-ipuv3 2800000.ipu: Offset2 0,
imx-ipuv3 2800000.ipu: Offset3 0
imx-ipuv3 2800000.ipu: ipu busfreq high release.

__________________________________________________________________________________________________

gst-launch-1.0 --gst-debug=2 imxv4l2videosrc device=/dev/video1 imx-capture-mode=3 fps-n=15 queue-size=4 ! queue ! "video/x-raw, width=640, height=480, format=I420, framerate=1/1" ! rawvideoparse use-sink-caps=true ! videoconvert ! fbdevsink

imx-ipuv3 2800000.ipu: init channel = 16
imx-ipuv3 2800000.ipu: ipu busfreq high requst.
imx-ipuv3 2800000.ipu: initializing idma ch 1 @ c0960040
imx-ipuv3 2800000.ipu: ch 1 word 0 - 00000000 25800000 000BB800 E0000000 00077C4F
imx-ipuv3 2800000.ipu: ch 1 word 1 - 08930000 01126000 0047C000 00009EC0 0000003F
imx-ipuv3 2800000.ipu: PFS 0x2,
imx-ipuv3 2800000.ipu: BPP 0x0,
imx-ipuv3 2800000.ipu: NPB 0x1f
imx-ipuv3 2800000.ipu: FW 639,
imx-ipuv3 2800000.ipu: FH 479,
imx-ipuv3 2800000.ipu: EBA0 0x44980000
imx-ipuv3 2800000.ipu: EBA1 0x44980000
imx-ipuv3 2800000.ipu: Stride 635
imx-ipuv3 2800000.ipu: scan_order 0
imx-ipuv3 2800000.ipu: uv_stride 63
imx-ipuv3 2800000.ipu: u_offset 0x4b000
imx-ipuv3 2800000.ipu: v_offset 0x5dc00
imx-ipuv3 2800000.ipu: Width0 0+1,
imx-ipuv3 2800000.ipu: Width1 0+1,
imx-ipuv3 2800000.ipu: Width2 0+1,
imx-ipuv3 2800000.ipu: Width3 0+1,
imx-ipuv3 2800000.ipu: Offset0 31,
imx-ipuv3 2800000.ipu: Offset1 1,
imx-ipuv3 2800000.ipu: Offset2 0,
imx-ipuv3 2800000.ipu: Offset3 0
ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
imx-ipuv3 2800000.ipu: ipu busfreq high release.

0 件の賞賛
2,695件の閲覧回数
marcomadrigal
Contributor III

Hi Nayan,

Could you provide the Gstreamer log with level 3, please? Also, there are some thoughts that might be worth to review:

1. Does the capture-mode you are using match the driver mode? It should match the driver mode and not the info on the gst-inspect output.

2. Are you getting something just right after the capture stage? Something like this:

GST_DEBUG=3 gst-launch-1.0 imxv4l2videosrc device=/dev/video1 imx-capture-mode=3 ! queue ! fakesink silent=false -v

Best Regards,

-Marco

http://www.ridgerun.com

2,695件の閲覧回数
nayanpatel
Contributor II

Thank you very much for the quick reply.

1. Does the capture-mode you are using match the driver mode? It should match the driver mode and not the info on the gst-inspect output.

Yes, Capture mode is matching at the driver mode. To confirm this, i have added logs while changing the mode. and I am getting same logs when a gsteamer pipeline or a V4L2 utility runs.

###  Change Mode Direct FR = 0 MODE = 3  /* this is like 15 fps and 640x480 capture mode.

2. Are you getting something just right after the capture stage? Something like this:

There are some logs inside the driver to figure out the right configuration sequence which help me to figure out the correct capture mode. and we are getting same capture mode settings as well.

I am also getting some suspicious things about PAL and NTSC, even though we have been using external VSYNC. 

________________________________________________________________________________________

GST_DEBUG=3 gst-launch-1.0 imxv4l2videosrc device=/dev/video1 imx-capture-mode=3 fps-n=15 ! queue ! fakesink silent=false -v
Setting pipeline to PAUSED ...###  IOCTL g_ifparm  ###

###  clock_curr=mclk=24000000  ###
###  IOCTL g_fmt_cap  ###
###  IOCTL s_power  ###
###  PowerDown  ###
###  IOCTL init  ###
###  IOCTL dev_init  ###
###  Init Mode  ###
###  Soft Reset  ###
ERROR: unrecognized std! 0 (PAL=ff, NTSC=b000m  0x1fce580 WARN  

###  IOCTL enum_framesize  ###
###  IOCTL g_parm  ###
###  IOCTL s_parm  ###
imxv4l2videosrc v4l2src.c:124:gst_imx_v4l2src_is_tvin:<imxv4l2videosrc0> VIDIOC_QUERYSTD failed: Invalid argument

###  PowerDown  ###
###  Change Mode  ###
###  Change Mode Direct FR = 0 MODE = 3
###  Turn ON AE AG  ###
###  Set Banding Filter  ###
###  Set AE Tager  ###
###  Set Night Mode  ###
###  IOCTL g_ifparm  ###
###  clock_curr=mclk=24000000  ###
###  IOCTL g_fmt_cap  ###
ERROR: v4l2 capture: unsupported ioctrl!
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event   ******* (fakesink0:sink) E (type: stream-start (10254), GstEventStreamStart, stream-id=(string)332997a2563370a3222e75b77dbc127240a22ac26fb6de863b895d052af47c2e, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)0;) 0x1e572a0
/GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0.GstPad:src: caps = video/x-raw, format=(string)UYVY, width=(int)640, height=(int)480, interlace-mode=(string)progressive, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-raw, format=(string)UYVY, width=(int)640, height=(int)480, interlace-mode=(string)progressive, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event   ******* (fakesink0:sink) E (type: caps (12814), GstEventCaps, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)UYVY\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)15/1\,\ pixel-aspect-ratio\=\(fraction\)1/1";) 0x1e572e8
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw, format=(string)UYVY, width=(int)640, height=(int)480, interlace-mode=(string)progressive, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)UYVY, width=(int)640, height=(int)480, interlace-mode=(string)progressive, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
0:00:14.266771668   483  0x1fd70f0 ERROR      imxv4l2bufferpool v4l2_buffer_pool.c:275:gst_imx_v4l2_buffer_pool_acquire_buffer:<imxv4l2bufferpool0> VIDIOC_DQBUF failed: Timer expired
0:00:14.267037668   483  0x1fd70f0 WARN                 basesrc gstbasesrc.c:2939:gst_base_src_loop:<imxv4l2videosrc0> error: Internal data stream error.
0:00:14.267142001   483  0x1fd70f0 WARN                 basesrc gstbasesrc.c:2939:gst_base_src_loop:<imxv4l2videosrc0> error: streaming stopped, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: Internal data stream error.
Additional debug info:
../../../../gstreamer-1.12.4/libs/gst/base/gstbasesrc.c(2939): gst_base_src_loop (): /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0:
streaming stopped, reason error (-5)
Execution ended after 0:00:10.085868668
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
ERROR: v4l2 capture: unsupported ioctrl!
###  IOCTL s_power  ###
###  PowerDown  ###
Setting pipeline to NULL ...
Freeing pipeline ...

________________________________________________________________________________________

0 件の賞賛
2,695件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

imxv4l2videosrc is part of gstreamer-imx plugins which is not supported by nxp,

for issues with gstreamer-imx (which is used in the case) one can post on its github page
https://github.com/Freescale/gstreamer-imx/issues

more details about differencies can be found on

[meta-freescale] [meta-fsl-arm][PATCH 3/5] gst1.0-fsl-plugin: Add Freescale Gstreamer1.0 Plugin for ... 

Best regards
igor

0 件の賞賛