On Fri, Mar 28, 2003 at 09:46:12AM +0100, Ronald Bultje wrote:
> On Fri, 2003-03-28 at 07:57, Ottavio Campana wrote:
> > When I run it I get "mmap: Invalid argument" and then segfault. What is
> > invalid for mmap?
>
> As far as I could see, you're not running VIDIOCGMBUF before mmap()'ing.
> You need to allocate/request the buffers (that's what VIDIOCGMBUF does)
> before using them.
I'm having a little progress. It doesn't die any more, but I don't have
got the data anyway.
I've added:
struct video_mbuf b;
...
b.size = v.width*v.height*3;
b.frames = 1;
...
if(ioctl(fd, VIDIOCGFBUF, &b)<0) perror("VIDIOCGFBUF");
and then
map= (void*) mmap(0, b.size, PROT_READ|PROT_READ, MAP_SHARED,
fd, 0);
but mmap returns pointer to 0x0
I'm looking for an example to study, but I haven't find anything. Can
you please tell me a good link or adjust my buggy source?
--
Non c'� pi� forza nella normalit�, c'� solo monotonia.
--
video4linux-list mailing list
Unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/video4linux-list