Rev 170 | Blame | Compare with Previous | Last modification | View Log | RSS feed
Project: S.Ha.R.K.
Frame Grabber support from BTTV linux driver
Coordinators:
Giorgio Buttazzo <giorgio@sssup.it>
Paolo Gai <pj@gandalf.sssup.it>
Authors:
Giacomo Guidi <giacomo@gandalf.sssup.it>
This is the first version of BTTV driver under shark.
It's a strongly hacked driver for all the frame grabbers
with bt848/878 actually supported by linux.
The audio sub-device is not supported.
New features (related with the old PXC driver):
- No more DOS external init
- Color grabbing (bpp 8,16,24)
- Changing resolution and grabbing period (periodic hard task... see fg.c)
- BTTV linux-like driver interface (bttv_open, bttv_ioctl, ecc)
For a fast use of this driver (GRAY8 mode):
makefile symbol: __BTTV__
#include <drivers/fg.h>
FG_init(<grabbing period>,<grabbing wcet>,<grabbing width>,<grabbing height>); //Initialize FG
fgptr = FG_getbuffer(); //Get the image pointer
Now fgptr is a pointer to the grabbed image (GRAY8 type);
But to elaborate an image is better to define a function like
elaborate_image(void *imageptr);
and with
FG_set_hook(elaborate_image);
this function will be periodically called when a grabbed
image is ready. A Double Buffer is implemented so the elaborated
image is always complete and consistent. See fg.c for the code details.
FG_close(); //Close the FG