Subversion Repositories shark

Rev

Rev 182 | 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
 
274 giacomo 19
-------------------------------------------------------
20
 
21
IMPORTANT: TO USE A BT878 FRAME GRABBER YOU HAVE TO
22
CHANGE THE LINE 2035 INSIDE bttv-driver.c TO
23
 
24
btv->id = 878;
25
 
26
-------------------------------------------------------
27
 
174 giacomo 28
New features (related with the old PXC driver):
170 giacomo 29
 
30
- No more DOS external init
31
 
32
- Color grabbing (bpp 8,16,24)
33
 
34
- Changing resolution and grabbing period (periodic hard task... see fg.c)
35
 
36
- BTTV linux-like driver interface (bttv_open, bttv_ioctl, ecc)
37
 
177 giacomo 38
For a fast use of this driver:
170 giacomo 39
 
40
makefile symbol: __BTTV__
41
 
42
#include <drivers/fg.h>
43
 
182 giacomo 44
FG_init(<grabbing period>,<grabbing wcet>,<grabbing width>,
45
		<grabbing height>,<color mode>,<channel>); //Initialize FG
170 giacomo 46
 
177 giacomo 47
<color mode> could be FG_MONO or FG_RGB24
48
 
182 giacomo 49
<channel> usually 0
50
 
170 giacomo 51
fgptr = FG_getbuffer(); //Get the image pointer
52
 
177 giacomo 53
Now fgptr is a pointer to the grabbed image, but to elaborate an
54
image is better to define a function like
170 giacomo 55
 
174 giacomo 56
elaborate_image(void *imageptr);
57
 
58
and with
59
 
60
FG_set_hook(elaborate_image);
61
 
62
this function will be periodically called when a grabbed
63
image is ready. A Double Buffer is implemented so the elaborated
64
image is always complete and consistent. See fg.c for the code details.
65
 
177 giacomo 66
FG_start_grabbing(); to start the frame grabber
170 giacomo 67
 
177 giacomo 68
FG_close(); To close the FG
69
 
70
For an example see BTTVDEMO
71