jason talley

UVC Camera

Discussion created by jason talley on Oct 28, 2011
Latest reply on Nov 2, 2011 by Kan Hu

When trying to display a simply camera image from gstreamer, isink is unable to allocate memory on the 68th frame (regardless of resolution):

W=320H=240
gst-launch -vvv v4l2src queue-size=4 device=/dev/video0 always-copy=0 ! "video/x-raw-yuv,format=(fourcc)YUY2,width=${W},height=${H}" ! identity ! mfw_isink axis-top=0 axis-left=0 disp-height=${H} disp-width=${W} sync=false rotation=0 fps-notify=1

 

 

# gst-launch -vvv v4l2src queue-size=4 device=/dev/video0 always-copy=0 ! \> "video/x-raw-yuv,format=(fourcc)YUY2,width=${W},height=${H}" ! \> identity ! \> mfw_isink axis-top=0 axis-left=0 disp-height=${H} disp-width=${W} sync=false rotation=0 fps-notify=1MFW_GST_ISINK_PLUGIN 2.0.2 build on Oct 28 2011 13:22:05.Setting pipeline to PAUSED ...                                                                                                                                                                                      /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)YUY2, width=(int)640, height=(int)480, interlaced=(boolean)false, framerate=(fraction)30/1, width_align=(int)64, height_align=(int)64Pipeline is live and does not need PREROLL ...Setting pipeline to PLAYING ...New clock: GstSystemClock

...

 

/GstPipeline:pipeline0/GstIdentity:identity0: last-message = "chain   ******* (identity0:sink)i (614400 bytes, timestamp: 0:00:02.295924040, duration: 0:00:00.033333333, offset: 66, offset_end:  67, flags: 0) 0xe8950"/GstPipeline:pipeline0/GstIdentity:identity0: last-message = "chain   ******* (identity0:sink)i (614400 bytes, timestamp: 0:00:02.328636415, duration: 0:00:00.033333333, offset: 67, offset_end:  68, flags: 0) 0xe89f8"hwbuffer_allocator.c:256 ioctl error, return -1hwbuffer_allocator.c:256 ioctl error, return -1can not create hwbuf for size 6144000:00:03.142481000  4418    0xcb758 ERROR                default mfw_gst_isink.c:862:mfw_gst_isink_buffer_alloc: >>I_SINK: Could not allocate hardware buffer0:00:03.142832250  4418    0xcb758 ERROR                default mfw_gst_isink.c:1276:mfw_gst_isink_show_frame: Can not allocate ibuf for non-dma buffer, ret=-5/GstPipeline:pipeline0/GstIdentity:identity0: last-message = "chain   ******* (identity0:sink)i (614400 bytes, timestamp: 0:00:02.885061417, duration: 0:00:00.033333333, offset: 68, offset_end:  69, flags: 32) 0xe8800"

 

However, if I use videotestsrc ! mfw_isink, it will run all day.  Likewise, if I use fakesink, it will run all day.  What makes mfw_isink and v4l2src incompatible?  

 

The only way to get this to reliably work is to pipe it thru an encode/decode loopback.  

gst-launch -vvv v4l2src queue-size=4 device=/dev/video0 always-copy=1 ! "video/x-raw-yuv,format=(fourcc)YUY2,width=${W},height=${H},framerate=(fraction)30/1" ! mfw_ipucsc ! mfw_vpuencoder codec-type=std_avc width=${W} height=${H} loopback=true ! \mfw_vpudecoder parser=false loopback=true ! mfw_isink axis-top=0 axis-left=0 disp-height=${H} disp-width=${W} sync=false rotation=0 fps-notify=1

 

I've tried a variety of options as well as adding my own (fps-notify).  I've also updated to the latest git version of gstreamer (0.10.35) as well as the plugins.  

 

I'm poking around the hwbuffer_allocator now.  

 

Mx53 w/ 11.05 BSP.

Outcomes