Re: ioctl parameters

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



On Thursday 14 February 2002 03:31 pm, Alan Cox wrote:
> Its a ring buffer. When you start capturing the kernel starts filling
> all the available buffers one per frame. As you finish with each frame
> in the shared buffer you tell the kernel via the ioctl and it becomes
> eligible for reuse.
>
> The driver runs round and round the ring chasing after you. If the driver
> catches up with you in the ring it will start dropping frames

What if I get ahead of the kernel?  If I'm ready for frame #2, but it hasn't 
finished streaming off the usb port yet, how does the kernel indicate to me 
that frame #2 doesn't contain good data yet?  (or in my case, how does my 
driver tell a calling program "not yet"?)  Do I need to call VIDIOCMCAPTURE 
once per frame?

If it is a ring buffer, what is the function of the video_mmap.frame ?  Does 
it indicate which of the available frames the first one should be spooled to?

And did I get the expected calling sequence right?  (VIDIOCGMBUF, allocate 
mmap in userspace, call mmap file op, VIDIOCMCAPTURE, VIDIOCSYNC)





[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