Re: Device or resource busy

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



Hello!

On Sat, Aug 02, 2003 at 01:25:37PM +0100, Matt Brocklehurst wrote:
> Hi,
>      Im wanting to perform continuous capture in a loop, but after ive
> done my first batch of frame captures (capturing, waiting for sync x 4),
> and go back to the start of the loop again where i send the capture
> command i just get device or resource busy. Do i need to send another
> ioctl signal to the v4l device to say 'get ready im coming round again'
> (its a bttv card).

Does you performing streaming capture?

In that case, right sequence is like this:

- Initiate capture (perform any initializations, allocate buffers and then 
  ioctl (STREAMON))
- ioctl (QBUF) multiple times for all of allocated buffers
- Continuously:
   - ioctl (DQBUF) to dequeue the buffer filled with frame
   - Perform with this buffer any proceessing you want
   - ioctl (QBUF) with this frame to allow the driver to fill it with a
     new frame

-- 
Andrey Vasilyev




[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