-
Notifications
You must be signed in to change notification settings - Fork 748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes missing subpackets in OS X #435
Conversation
Overall if this improves packet loss on Mac OSX, I'd say it's good to merge.
|
That's why I changed it only for OS X, no idea how it works for the rest of the platforms but it works fine on mine and libfreenect 1 works fine too so I figured we could use the same config. I tried to keep PKTS_PER_XFER* NUM_XFERS around the same, it's |
|
kIOReturnIsoTooOld comes from this pseudo stack trace:
UIMCreateIsochTransfer() is the only place that generates kIOReturnIsoTooOld. kIOReturnIsoTooOld is returned immediately for the async read when Not sure what this means yet. There are some more things you can try. I see a lot of The second thing is this kIOReturnIsoTooOld seems to be generated by some static conditions. Maybe explore how
and maybe certain conditions really make |
I'm increasing it to 136, that should cover it. |
It's been around 2 hours and no errors so far, it looks like this fixed the issue. |
|
I don't understand what's the problem with the latency... I mean, the only problem is the time it takes to retrieve the extra data for the next frame, I don't think that extra time is that big compared to all the processing it's doing. In any case I'll reduce it to fix a single depth image in the transmission. |
|
Ok, I reduced it to 64 that's around 1 depth image and it looks to be working. |
Can you try libusb with this change (with 8 packets per transfer setup):
I looked at AppleUSBXHCI, and |
I'll check it out, in any case keep it mind that the errors are totally gone with this PR using homebrewed libusb 1.0.20, tested in 10.10 and 10.11. |
Ok, just tested. I'm not getting the kIOReturnIsoTooOld errors anymore but I still get all the rest. |
OK, let's go with this for Mac users for now with increased latency. It's still a mystery why 60 concurrent transfers are giving MacOSX a hard time though. |
One more note, when receiving two depth images together the depth processor will not be ready for the next one, resulting in "skipping depth packet" for every other depth image. I tested 128 packets per transfer on Linux and got that. |
Uhm, I think the only way to solve that is to add some buffering in between. Any other ideas? |
Sorry, there was an error in my calculation. It's 352x424 shorts, not 352x424 bytes. Therefore for each depth images, there are |
…SB_ERROR_OTHER errors for OS X
Back to 128. I'm getting skipped packets warnings but not more than before. |
I think I'm suffering this problem in OSX 10.11 but with libfreenect, The device just stop working with glview. Tested the Kinect 360 with another Mac with 10.10 and it works well so I thinks it's related to the libusb 1.0.20 Relevant logs https://gist.github.com/victorcoder/cb259ce2eb3b04682134 |
@Victorcoder I think you should report the issue with https://github.com/OpenKinect/libfreenect/issues. |
Had some issues in OS X with libusb missing some subpackets for no good reason and some other weird errors as noted in => #390
Looking at libfreenect 1.x code I found that https://github.com/OpenKinect/libfreenect/blob/master/src/usb_libusb10.h#L33 uses different parameters for OS X, just ported that from there.