Web lists-archives.com

Re: [Spca50x-devs] mmap failure with libv4l2..

> I've just discovered libv4l2, and it's exactly what I need right now
> (new webcam only does JPEG, my own library only does YUV420). However..
> when I run my software with the wrapper (tried 0.5.3, 0.5.8 and
> 0.6.0-test), I get this:
> [0] $ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so ./distort
> V4LImageSource: reserved 2 buffers for mmap.
> mmap: Invalid argument

Here's a short followup: in part, this may be due to the driver
(gspca_zc3xx). When I turn on debugging in libv4l, I get this in the

  count: 1 type: 1 memory: 1
result == 0
result == 0
libv4l2: Passing mmap((nil), 460800, ..., abcdef00, through to the

The offset value in particular looks rather fishy to me..? Also, libv4l
seems to be requesting a mmap buffer with the size of the uncompressed
image? The syslog shows:

VIDIOC_REQBUFS count=1, type=vid-cap, memory=mmap
VIDIOC_QUERYBUF 00:00:00.00000000 index=0, type=vid-cap, bytesused=0,
flags=0x00000000, field=1, sequence=0, memory=mmap,
offset/userptr=0x00000000, length=118784

Here, this seems to be the compressed size?

Yours, Florian

Spca50x-devs mailing list