Re: [libdc] Reducing latency with a packet ring buffer?
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: Damien D. <dd...@do...> - 2008-12-07 13:23:55
|
On Sat, 2008-12-06 at 17:15 -0800, David Moore wrote: > Yes, this would certainly be possible, at least on Juju and Mac OS. > > In fact, in some sense we are already using a packet ring buffer on > those platforms. The data is put into the framebuffer by the DMA > program and will be visible prior to dequeue_frame() being called. So the only thing we need is to know exactly how many valid bytes we have? > We could add some new APIs that exist in addition to the existing APIs > that would be for "advanced users only" and would let you "peek" at the > contents of the buffer prior to it being filled completely. > > The main tradeoff is that additional interrupts would be generated. > Right now, there is only one interrupt per frame, which is very > efficient from the kernel's point of view. If we added additional > interrupts, that would consume additional CPU. Of course, that might be > enabled at run-time only if a user needs it. Do we necessarily get extra interrupts if we just have to update a counter? If the interrupts are a problem we could maybe finetune their frequency (e.g. update the valid byte counter every X packets) Yes, I don't know much about the kernel ;) -- Damien 高原 Douxchamps http://damien.douxchamps.net/ |