On Saturday 07 February 2009 08:28:34 Brian Pin wrote: > Hi all, > > I am going to make a UVC gadget, and we would like to make some bulk > transferred video device first. > Reviewing the UVC spec 1.1, There is payload header added to each bulk > transfer, and there is only one payload header when I have a single bulk > transfer. (Please refer to spec Figure 2-10, 2-11) My question is how to > tell if this transfer is a single bulk xfer or a multiple bulk xfer?
Your device determines the maximum UVC payload size by setting the dwMaxPayloadTransferSize field in the video probe/commit control structure. You can either set dwMaxPayloadTransferSize to the size of your UVC frame (including the header), in which case you can send the frame in a single payload, or use a smaller size in which case you will cut your frame into chunks of (dwMaxPayloadTransferSize - sizeof(header)) at most and prepend each of them with a header. Don't forget to terminate each payload by a bulk transfer smaller than the bulk endpoint maximum packet size (possibly a zero packet if the payload size is a multiple of the maximum packet size). Best regards, Laurent Pinchart _______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
