Re: little program, big problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hey,

On Fri, 2003-03-28 at 17:57, Ottavio Campana wrote:
> On Fri, Mar 28, 2003 at 09:46:12AM +0100, Ronald Bultje wrote:
> > 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");

Go read /usr/src/linux/Documentation/video4linux/API.html

1) the driver fills in the values on VIDIOCGMBUF, you don't need to set
anything before calling VIDIOCGMBUF
2) it's VIDIOCG_M_BUF, not VIDIOCG_F_BUF (f = framebuffer, for overlay,
m = memory, for memory/DMA capture).

Ronald

-- 
Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx>





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux