Subversion Repositories shark

Rev

Rev 170 | Rev 177 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
170 giacomo 1
Project:	S.Ha.R.K.
2
 
3
		Frame Grabber support from BTTV linux driver
4
 
5
Coordinators:
6
 
7
	Giorgio Buttazzo	<giorgio@sssup.it>
8
	Paolo Gai		<pj@gandalf.sssup.it>
9
 
10
Authors:
11
 
12
	Giacomo Guidi 	<giacomo@gandalf.sssup.it>
13
 
14
This is the first version of BTTV driver under shark.
15
It's a strongly hacked driver for all the frame grabbers
174 giacomo 16
with bt848/878 actually supported by linux.
17
The audio sub-device is not supported.
170 giacomo 18
 
174 giacomo 19
New features (related with the old PXC driver):
170 giacomo 20
 
21
- No more DOS external init
22
 
23
- Color grabbing (bpp 8,16,24)
24
 
25
- Changing resolution and grabbing period (periodic hard task... see fg.c)
26
 
27
- BTTV linux-like driver interface (bttv_open, bttv_ioctl, ecc)
28
 
174 giacomo 29
For a fast use of this driver (GRAY8 mode):
170 giacomo 30
 
31
makefile symbol: __BTTV__
32
 
33
#include <drivers/fg.h>
34
 
35
FG_init(<grabbing period>,<grabbing wcet>,<grabbing width>,<grabbing height>); //Initialize FG
36
 
37
fgptr = FG_getbuffer(); //Get the image pointer
38
 
174 giacomo 39
Now fgptr is a pointer to the grabbed image (GRAY8 type);
170 giacomo 40
 
174 giacomo 41
But to elaborate an image is better to define a function like
170 giacomo 42
 
174 giacomo 43
elaborate_image(void *imageptr);
44
 
45
and with
46
 
47
FG_set_hook(elaborate_image);
48
 
49
this function will be periodically called when a grabbed
50
image is ready. A Double Buffer is implemented so the elaborated
51
image is always complete and consistent. See fg.c for the code details.
52
 
170 giacomo 53
FG_close(); //Close the FG
54