Re: v4l2 + select() + read()

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



>  I´ve looked at the V4L2 API description about this capturing; looks good,
>  but I´m missing one detail: what happens when program can´t dequeue fast
>  enough (or deliberately throttles the framerate). More specifically: when
>  the queue is full, do you drop the last frame captured, or the oldest?

bttv never ever throws away a captured frame.  If there is no free buffer
to put data in, bttv stops capture (i.e. it keeps the old data).

>  I ask
>  because originally in my webcam driver I simply dropped the last frame;
>  however, this quickly leads to stale data in the buffer (I used a few
>  internal buffers to queue data);

Well, bttv has no internal buffers but uses only the ones queued by the
application...

>  be nice to write a few words about it. Or turn it into an option. Sometimes,
>  all an application is interested in is the latest frame, and don´t care
>  about queueing, or dropping a few frames (maybe using only one buffer
>  will do the trick?).

That's the way to go IMHO.  If the app don't need queued frames, it
simply should'nt use multiple buffers.

  Gerd

-- 
Gerd Knorr <kraxel@xxxxxxxxxxx>  --  SuSE Labs, Außenstelle Berlin





[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