Quoting keatch <[EMAIL PROTECTED]>:

> Hello, I'm working on a driver for the WebCam Go/Go Plus under Linux.
> This driver use usbvideo to manage all the usb and v4l stuff's.
> 
> I need some info's about this driver. Are there some docs about it?

No. I tried to put together some, but it never happened...

> I've some problem to detect when iso packet of null lenght are received.
> I need this info because the camera sends one or more zero length iso
> packet as a frame marker.

usbvideo_IsocIrq() is called to handle the URB completion. It has this:

        if (urb->actual_length <= 0)
                goto urb_done_with;

Add some flag (and maybe callback) to deal with zero length packets.
I would define a minidriver hook (callback) and if it is not zero
it will be called.

Alternatively, you may want to insert some special data into the queue.

Alternatively, you may want to use a message queue instead of ring queue.
The difference is that the message queue holds "packets" of data together
with the packet length, in an ordered list. But you want to automatically
discard the "extra" packets if the queue overflows, this will happen if
the reader process (which is your v4l client) does not read all the data
that the producer puts into the queue. This must be smooth and with as few
mutexes as possible.

I think the last approach is the most useful one because it is always nice
to have all Isoc transfers neatly queued for you instead of being lumped
together. If you have a moment to add this to usbvideo it would be great.

> I'm working with kernel 2.4.16. The driver was at the first time written
> for the kernel 2.4.4 . The usbvideo seems to be changed a lot from this
> version of the kernel and some structure are'nt yet present.

"some"? It would be helpful to know which ones :-) I don't think usbvideo
was changed, especially because it was not in the kernel until 2.4.12 :-)

Dmitri

-- 
"For thousands more years the mighty ships tore across the empty
wastes of space and finally dived screaming onto the first planet
they came across -- which happened to be the Earth -- where due to
a terribble miscalculation of scale the entire battle fleet was
accidentally swallowed by a small dog."

Attachment: msg03396/pgp00000.pgp
Description: PGP signature

Reply via email to