This is required to make OpenKinect transfer data at 30 fps. This
change was originally made by Theo Watson, and Thomas improved on it.
The commit came via OpenKinect into libusb thanks to Kyle Machulis and
Hector Martin. Fixes #66.
}
/* schedule for a frame a little in the future */
- frame += 2;
+ frame += 4;
+
+ if (cInterface->frames[transfer->endpoint] && frame < cInterface->frames[transfer->endpoint])
+ frame = cInterface->frames[transfer->endpoint];
/* submit the request */
if (is_read)
transfer->num_iso_packets, tpriv->isoc_framelist, darwin_async_io_callback,
itransfer);
+ cInterface->frames[transfer->endpoint] = frame + transfer->num_iso_packets / 8;
+
if (kresult != kIOReturnSuccess) {
usbi_err (TRANSFER_CTX (transfer), "isochronous transfer failed (dir: %s): %s", is_read ? "In" : "Out",
darwin_error_str(kresult));
usb_interface_t **interface;
uint8_t num_endpoints;
CFRunLoopSourceRef cfSource;
+ uint64_t frames[256];
uint8_t endpoint_addrs[USB_MAXENDPOINTS];
} interfaces[USB_MAXINTERFACES];
};