Subversion Repositories shark

Rev

Rev 182 | 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.

-------------------------------------------------------

IMPORTANT: TO USE A BT878 FRAME GRABBER YOU HAVE TO
CHANGE THE LINE 2035 INSIDE bttv-driver.c TO 

btv->id = 878;

-------------------------------------------------------

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:

makefile symbol: __BTTV__

#include <drivers/fg.h>

FG_init(<grabbing period>,<grabbing wcet>,<grabbing width>,
                <grabbing height>,<color mode>,<channel>); //Initialize FG

<color mode> could be FG_MONO or FG_RGB24

<channel> usually 0

fgptr = FG_getbuffer(); //Get the image pointer

Now fgptr is a pointer to the grabbed image, 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_start_grabbing(); to start the frame grabber

FG_close(); To close the FG

For an example see BTTVDEMO