FS#44091 - [zbar] zbarcam fails on uvcvideo V4L2 driver
Attached to Project:
Community Packages
Opened by point (mpoint) - Saturday, 07 March 2015, 19:20 GMT
Last edited by Morten Linderud (Foxboron) - Saturday, 06 June 2020, 14:52 GMT
Opened by point (mpoint) - Saturday, 07 March 2015, 19:20 GMT
Last edited by Morten Linderud (Foxboron) - Saturday, 06 June 2020, 14:52 GMT
|
Details
Description:
ZBar processor uses VIDIOC_REQBUFS ioctl while probing for supported I/O modes. Then it uses VIDIOC_S_FMT, which fails probably because the driver is already prepared to capture in another format. The solution is to release video buffers after probing and request them again when needed. I think this is the same bug as already reported upstream: http://sourceforge.net/p/zbar/bugs/81/ Sorry for posting it here, SourceForge doesn't let me post there. Additional info: zbar 0.10-5 linux 3.18.6-1 Steps to reproduce: Try to use zbarcam with a UVC camera. zbarcam --verbose=8 --nodisplay _zbar_video_open: opened camera device /dev/video0 (fd=5) _zbar_v4l2_probe: HD WebCam on usb-0000:00:14.0-3 driver uvcvideo (version 3.18.6) _zbar_v4l2_probe: capabilities: CAPTURE STREAMING v4l2_reset_crop: crop bounds: 640 x 480 @ (0, 0) v4l2_reset_crop: current crop win: 640 x 480 @ (0, 0) aspect 1 / 1 ERROR: zbar video in v4l2_reset_crop(): system error: setting default crop window (VIDIOC_S_CROP): Inappropriate ioctl for device (25) v4l2_probe_formats: enumerating supported formats: v4l2_probe_formats: [0] YUYV : YUV 4:2:2 (YUYV) v4l2_probe_formats: [1] MJPG : MJPEG COMPRESSED v4l2_probe_formats: current format: YUYV(56595559) 640 x 480 (line=0x500 size=0x96000) _zbar_v4l2_probe: using I/O mode: USERPTR proc_input_thread: spawned input thread _zbar_best_format: from YUYV(56595559) to Y800(30303859)=24 zbar_negotiate_format: YUYV(56595559) -> Y800(30303859) (24) _zbar_best_format: from MJPG(47504a4d) to Y800(30303859)=96 zbar_negotiate_format: MJPG(47504a4d) -> Y800(30303859) (96) zbar_negotiate_format: setting best format YUYV(56595559) (24) v4l2_set_format: VIDIOC_S_FMT returned -1(16), trying interlaced... ERROR: zbar video in v4l2_set_format(): system error: setting format 56595559 (VIDIOC_S_FMT): Device or resource busy (16) zbar_processor_init: ERROR: no compatible video input format ERROR: zbar processor in zbar_processor_init(): unsupported request: no compatible image format ERROR: zbar processor in zbar_processor_init(): unsupported request: no compatible image format |
This task depends upon
Closed by Morten Linderud (Foxboron)
Saturday, 06 June 2020, 14:52 GMT
Reason for closing: Not a bug
Saturday, 06 June 2020, 14:52 GMT
Reason for closing: Not a bug
I vote for including the patch in the package, as upstream does not seem to care about it and this problem has been around for years now.
But unfortunately, I still get the problem: No video output with my Webcam, although barcode recognition works.
[Update] I figured out that my webcam driver doesn't support user pointer IO. So MMAP is used and that patch wouldn't help me...