I think I'll need to update the as3 wrapper too...
I'll try to do it on the weekend.
Cheers!
JC
> Yes, it is far from perfect...
> However, by no means the current implementation is definitive! It is
> actually pretty awful hehehe.
>
> Having to deal with libusb-0.1 behind the scenes introduces some tricky
> issues: the main one is the need for a time-critical thread per stream to
> get it to work soundly, otherwise there will be a bunch of "sequence lost".
> The same thing holds true for the original zephod's win32 code (if you have
> it, try commenting out the SetThreadPriority lines).
> It seems that libusb-win32 was not designed to poll more than one stream at
> a time.
Can't you call libusb people directly for some help? Is there anything
blocking a proper _native_ port of libusb-1.0 to win32/win64?
The emu layer has a lot of sense as a temporary solution indeed, but on
the long run fixing libusb —if possible— should be the goal, don't you
think?
> I am currently investigating different strategies of probing the stream data
> in a reliable way so that overhead can be alleviated.
>
> Marcos
Keep up the good work.
Regards,
Antonio
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
The guide is available here:
http://www.as3kinect.org/guides/openkinect-win32-wrapper-guide/
Please feel free to copy/modify it to the OpenKinect wiki if you want.
Hope it helps.
Set LIBUSB_1_LIBRARY to point to the pthreadVC2.lib file inside the uncompressed freenect_win_deps. (freenect_win_deps/lib/pthreadVC2.lib)
I fixed the error in the guide.
Greetings,
JC
This is a zip with glview and as3-server binaries, you wont need it to
compile the source
>
> freenect_win_deps.zip ?
This zip has the libs and headers that are dependencies of OpenKinect
(glut, phtrheads, libusb)
>
> Any fork of yours ?
>
> What needs to change in your guide for use with
change
git clone git://github.com/imekinox/openkinect.git
to
git clone git://github.com/OpenKinect/libfreenect.git
then cd to libfreenect instead of openkinect
Everything else is the same... You can skeep this step
Check BUILD_AS3_SERVER
> https://github.com/OpenKinect/libfreenect/tree/unstable ?
Actually, std::vector does guarantee contiguous storage; see ISO 14882
2nd ed, 23.2.4 [lib.vector].
> for (int I = 0; I < vDevices.size(); I++)
> {
> (*list)[I] = (libusb_device*)vDevices[I];
> }
>
> This seems to have fixed the problem. Can any one else confirm?
>
> Cheers.
I'd guess the real issue is that vDevices[0] isn't valid with 0
devices in the vector, so when using a range-checked vector (which you
seem to have), that'll fail an assert, even though the memcpy would
wind up copying zero bytes (which would be completely safe). My
solution would look something like:
if(vDevices.size() > 0)
memcpy(*list, &vDevices[0], vDevices.size()*sizeof(struct usb_device*));
Your solution looks sane too. :)
-Drew
> Interesting indeed...
>
What's interesting? Can we please limit top-posting when possible
and trim the messages removing old/unrelated parts? By doing so even a
casual reader can follow the currently interesting part of the thread
from a subset of it.
> Do you happen to have Linux available as well?
> Would be interesting to check if it performs bad there too.
>
> I am quite clueless on what could be the reason behind this behavior.
> A last thing you can try, besides Linux, is to stream only one thing, say
> video-only or depth-only.
>
Thanks,
Antonio
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?