Re: gphoto2 output

From: Dennis Noordsij <dennis.noordsij_at_wiral.com>
Date: Tue, 10 Sep 2002 15:26:23 +0300
> > It still sounds like something that should be possible, but I guess maybe
> > it's not. A shame though! :)
>
> I mean, we will figure it out.
>
> I would like to implement video4linux anyway.
>
> Assoon as I find some time, I will start hacking the protocoll...
>
> Can't be that difficult... I mean, we hacked the picture one!! :-)

I don't know if you can have a v4l driver in userspace, because I'd rather not 
crash any people's kernels if the driver has to live in kernel space :-) 
Also, I don't know what the USB API is for kernel stuff since you obviously 
can't use libusb. It might be a dirty low-level thing :)

Anyway, my first trace consists of a few dozen usb control messages, before it 
starts to receive data.

Our problem will probably not be the commands themselves, but figuring out in 
what format the camera is streaming the video!!

Although most likely it will use the same as it uses inside the JPEG, and for 
the thumbnails, YCbCr 4:2:2.

2 bytes per pixel,

For every 4 bytes you have 2 pixels:
Y1 Y2 Cb1 Cr1

Then convert:
Y1 Cb1 Cr1 to the first RGB pixel, and
Y2 Cb1 Cr1 to the second RGB pixel.

v4l accepts YUV 4:2:2 format no problem, although I am not sure wether it 
likes 
Y1 Y2 Cr1 Cb1 (alternatively Y1 Y2 U1 V1)
or
Y1 Cr1 Y2 Cb1 (alternatively Y1 U1 Y2 V1)

Then all we need is to find out how to change the settings (looks like there 
are only 2, 640x480_at_20fps and something lower @ 30fps), and what the marker 
looks like inbetween frames.

This v4l interface will be for v4l apps, but for gphoto we can add the same 
stuff to the driver to grab an image using the gphoto commands.

Dennis :)

PS - Our next project, we all buy the WinTV DigiTV receiver (USB version!!), 
since USB appears to be easier to reverse-engineer than the PCI bus! :-)
Received on Tue Sep 10 2002 - 14:48:54 CEST

This archive was generated by hypermail 2.2.0 : Tue Oct 20 2009 - 17:33:20 CEST