i.mx8mm camera(ov5640) problem -- ioctl VIDIOC_STREAMON return No buffer space available

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.mx8mm camera(ov5640) problem -- ioctl VIDIOC_STREAMON return No buffer space available

1,126 Views
banner
Contributor I

hello everyone

Hope someone can give me an answer

I am doing a simple camera test using  i.MX 8M Mini LPDDR4 EVKB, But encountered some problems.

when i use

/**********************************************************************

" root@imx8mmevk:~# gst-launch-1.0 -v v4l2src device= /dev/video0 num-buffers=1 ! videoconvert ! video/x-raw,format=GRAY8,height=720,width=1280,framerate=30/1 ! filesink location=/tmp/test.bmp[ 2333.147062] audit: type=1006 audit(1590514201.808:4): pid=729 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=3 res=1 "

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, height=(int)720, width=(int)1280, framerate=(fraction)30/1, format=(string)YUY2, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, height=(int)720, width=(int)1280, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, format=(string)GRAY8
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, height=(int)720, width=(int)1280, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, format=(string)GRAY8
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-raw, height=(int)720, width=(int)1280, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, format=(string)GRAY8
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, height=(int)720, width=(int)1280, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, format=(string)GRAY8
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, height=(int)720, width=(int)1280, framerate=(fraction)30/1, format=(string)YUY2, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
[ 2334.258189] ov5640_mipi 2-003c: s_stream: 1
Got EOS from element "pipeline0".[ 2334.489449] ov5640_mipi 2-003c: s_stream: 0

Execution ended after 0:00:00.977879875
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root@imx8mmevk:~#

*************************************************/    it seems normal

but ,when i use  this case , it will have some problems (This case can run normally on my ubuntu virtual machine)

https://gist.github.com/jayrambhia/5866483

It's error message

/*************************************

root@imx8mmevk:/tmp# ./main64.o
Driver Caps:
Driver: "mx6s-csi"
Card: "i.MX6S_CSI"
Bus: "platform:32e20000.csi1_bridge"
Version: 1.0
Capabilities: 84200001
Camera Cropping:
Bounds: 0x0+0+0
Default: 0x0+0+0
Aspect: 1/1
FMT : CE Desc
--------------------
YUYV: YUYV 4:2:2
Selected Camera Mode:
Width: 1280
Height: 800
PixFmt: BA81
Field: 1
buf.length is 1024000
buffer is 0xffffa0c5a000
Length: 1024000
Address: 0xffffa0c5a000
Image Length: 0
Start Capture: No buffer space available
root@imx8mmevk:/tmp#

*****************************/

 thanks

 

 

 

 

0 Kudos
Reply
4 Replies

940 Views
Cappelletto
Contributor I

Hi @banner ,

Did you manage to diagnose the issue with your settings? In my case I had a similar issue when running my own OpenCV application in exactly the same board (imx8mmlpddr4evk). The error message was "VIDIOC_STREAMON: No buffer space available" which was a bit misleading.

After testing the v4l2 pipeline I received the following error:

/*************************************************

root@imx8mmlpddr4evk ~> gst-launch-1.0 -v v4l2src device= /dev/video0 num-buffers=1 ! videoconvert ! video/x-raw,format=GRAY8,height=720,width=1280,framerate=30/1 ! filesink location=/tmp/test.bmp
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ..

ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.

*************************************************/

In my case, the culprit was a loose connection with the camera board itself. After re-plugging it and a power cycling, voila, problem fixed.

0 Kudos
Reply

893 Views
banner
Contributor I

It's been too long.seem to be need setting FPS

0 Kudos
Reply

1,114 Views
banner
Contributor I

Oh

0 Kudos
Reply