Hello!
On Sat, Aug 02, 2003 at 02:05:07PM +0100, Matt Brocklehurst wrote:
> Hi,
> Yes im doing streaming (well attempting to!!!), the streamon /
> dqbuf - are those v4l 2 commands? Cos im using v4l one atm...
In v4l1 it is similar. Look at the
/usr/src/linux-2.4.21/Documentation/videdo4linux/API.html
Little snippet from there:
----------------------------------------------------
/* setup everything */
VIDIOCMCAPTURE(0)
while (whatever) {
VIDIOCMCAPTURE(1)
VIDIOCSYNC(0)
/* process frame 0 while the hardware captures frame 1 */
VIDIOCMCAPTURE(0)
VIDIOCSYNC(1)
/* process frame 1 while the hardware captures frame 0 */
}
----------------------------------------------------
Of course, you can use more then two buffers:
for (i = 0; i < n; i++) {
VIDIOCMCAPTURE(i);
}
i=0; while (...) {
VIDIOCSYNC(i);
Do what you want with i-th buffer
VIDIOCMCAPTURE(i);
i++; if (i >= n) i = 0;
}
--
Andrey Vasilyev
--
video4linux-list mailing list
Unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/video4linux-list