Re: [libdc1394-devel] Question about Rc4 and policy
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: David M. <dcm@MIT.EDU> - 2006-12-05 00:53:10
|
On Mon, 2006-12-04 at 17:19 +0900, Damien Douxchamps wrote: > On Thu, 2006-11-30 at 09:20 +0100, Ren=C3=A9 Kooning wrote: > > What happened with the dc1394ring_buffer_policy_t in RC4?=20 > > Is the standard behaviour NEXT or LAST (since it cannot be specified)= ? >=20 > The standard behaviour is NEXT. If you want LAST you need to run the > capture in a loop to 'empty' the ring buffer. >=20 Note that this won't guarantee the newest frame if the DMA buffers all fill. The application has to keep up with the capturing to guarantee this. > I am personally wondering if this LAST/NEXT functionality should not be > brought back. It would be easier for the user and most importantly woul= d > for him to make a choice (and hence realise two approaches are > possible). >=20 The LAST functionality can never be fully handled by libdc1394 because if the DMA buffer fills, you will get stuck with stale frames no matter what you do. There's really only two ways to be guaranteed recent frames at all times: 1. Capture continuously and without latency (use a separate thread if necessary), picking off the latest frames as you need them, discarding the rest. 2. Use the camera's one-shot mode and turn it on and off whenever you need a new frame. Both of these options require cooperation from the application, and can not be handled transparently by libdc1394. -David |