Subversion Repositories shark

Rev

Rev 177 | 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
 
177 giacomo 29
For a fast use of this driver:
170 giacomo 30
 
31
makefile symbol: __BTTV__
32
 
33
#include <drivers/fg.h>
34
 
182 giacomo 35
FG_init(<grabbing period>,<grabbing wcet>,<grabbing width>,
36
		<grabbing height>,<color mode>,<channel>); //Initialize FG
170 giacomo 37
 
177 giacomo 38
<color mode> could be FG_MONO or FG_RGB24
39
 
182 giacomo 40
<channel> usually 0
41
 
170 giacomo 42
fgptr = FG_getbuffer(); //Get the image pointer
43
 
177 giacomo 44
Now fgptr is a pointer to the grabbed image, but to elaborate an
45
image is better to define a function like
170 giacomo 46
 
174 giacomo 47
elaborate_image(void *imageptr);
48
 
49
and with
50
 
51
FG_set_hook(elaborate_image);
52
 
53
this function will be periodically called when a grabbed
54
image is ready. A Double Buffer is implemented so the elaborated
55
image is always complete and consistent. See fg.c for the code details.
56
 
177 giacomo 57
FG_start_grabbing(); to start the frame grabber
170 giacomo 58
 
177 giacomo 59
FG_close(); To close the FG
60
 
61
For an example see BTTVDEMO
62