Since I never coded with USB, I started with some perl script to try to get the JPEG frames.
If I can't do this, I won't do anything anyway...
So instead of programming the USB interface, the perl script is working on the sniff files from step 2.
What I want to do is to build a usable JPEG file using the binary values in the sniff.
I get some informations about the JPEG header here :
http://www.obrador.com/essentialjpeg/headerinfo.htm
Some headers are easy to build but some others can't be guessed (Huffman table and quantization tables).
Looking at others JPEG images and reading the previous page, I can see the "quantization tables" are 2 x 64 bytes... and the first 128 bytes of each frame sniffed look different (incremental values like in other JPEG files, with many repetitions).
It's easy to see it's different since it is not compressed (not "random" values like the compressed data).
So now I have my quantization tables !
But the Huffman table is still missing... I guess it must be static since it is not sent with each frame like the quantization tables... So I have to find it in the windows driver...
I spent a *long* time looking for this ;-)
Here again, looking at other JPEG files, we can see the huffman table is often made of incremental values... So "often" you'll find alphabet portions in it like "cdefghijstuvwxyz".
I used the "grep" tool on all the Windows driver files and I found the magical sequence in files called "CoachTw.ds", "CoachVc.sys" and "jpegcode.dll".
So now I have all the needed header parts...
After some (long) time mixing all this together and switching back to "good indian", I get my first image !!!