Continuously filled buffers?
- From: Michel Bardiaux <mbardiaux (at) mediaxim.be>
- Date: Wed, 08 Mar 2006 13:59:06 +0100
Ralph Majer wrote:
Hi all,
I'm currently writing an application which captures from an bttv grabber
using userptr's (V4L2).
Now I have this problem: When I enqueue three buffers and turn on
streaming they will be filled with the next three frames. But when I not
dequeue them and enqueue empty ones continously, these three frames
could be very old.
Is it possible to set a flag or something else, that the bttv grabber is
always filling up these buffers with the latest frames until I dequeue
them?
The only possible way I actually see is using an thread which
continuously grabs images in the background. But I want to avoid threads
if possible.
In my experience it is not practically possible to program a robust
grabber without some form of threading. I found the pthread API somewhat
unpalatable, what with the fact that linux threads are not supposed to
be exactly POSIX threads, and the 'new' threads (NTL?). So I went for
multiple, forked processes, and shared memory.
How do you ensure always getting the latest frames only?
Best regards
Ralph Majer
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux (at) mediaxim.be
Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request (at) redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list