1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
.TH TV 3
.SH NAME
tv \- Hauppage TV device
.SH SYNOPSIS
.B
bind -b #V /dev
.PP
.B /dev/tv
.br
.B /dev/tvctl
.SH DESCRIPTION
The
.I tv
device serves two files giving access to a Hauppage television card
in NTSC mode (only).
.PP
The control device
.B tvctl
accepts the following commands to control
tuning and image processing:
.TP
.B init
Reset the device to the default settings.
.TP
.BI window " minx miny maxx maxy"
Set the display window size (default: none).
.TP
.BI colorkey " rl rh gl gh bl bh"
Set the key limits for chromakey display to
the given `low' and `high' values for
each of red, green and blue
(default: 15 63 255 15 15 63), and enable
use of the colour key.
The value 255 for a lower limit disables the limit.
.TP
.BI capture " minx miny maxx maxy"
Set the capture window (default: none);
see the description of reading the
.B tv
file, below.
.TP
.BI capbrightness " n"
Set the brightness of a captured frame to
.IR n ,
on a scale from 0 to 100
(default: 13).
.TP
.BI capcontrast " n"
Set the contrast of a captured frame to
.IR n ,
on a scale from 0 to 100
(default: 57).
.TP
.BI capsaturation " n"
Set the saturation of a captured frame to
.IR n ,
on a scale from 0 to 100
(default: 51).
.TP
.BI caphue " n"
Set the hue of a captured frame to
.IR n ,
on a scale from 0 to 100
(default: 0).
.TP
.BI capbw " n"
Capture colour
.RI ( n=0 )
or monochrome
.RI ( n=1 );
(default: 0).
.TP
.BI brightness " n"
Set the image brightness to
.IR n ,
on a scale from 0 to 100
(default: 0)
.TP
.BI contrast " n"
Set the image contrast to
.IR n ,
on a scale from 0 to 100
(default: 54)
.TP
.BI saturation " n"
Set image saturation to
.IR n ,
on a scale from 0 to 100
(default: 54)
.TP
.BI source " n"
Set the input source to
.I n
(default: video input 0).
.TP
.BI svideo " n"
If
.I n
is non-zero, set the input capture format to
S-Video.
.TP
.BI format " n"
Set the input format to
.I n
(0, NTSC-M; 1, NTSC-443; 2, external control).
Default: 0.
.TP
.BI channel " c f"
Sets the right frequency for HRC CATV channel
.IR c ,
with fine tuning by signed offset
.I f
(in MHz).
.TP
.BI volume " m" [ " n " ]
Set the volume of left and right channels to
.I m
and
.IR n ,
on a scale from 0 to 100
(default: 80).
If only
.I m
is given, set both left and right volumes to
.IR m .
.TP
.BI bass " n"
Set the bass to
.IR n ,
on a scale from 0 to 100 (default: 50).
.TP
.BI treble " n"
Set the treble to
.IR n ,
on a scale from 0 to 100 (default: 50).
.TP
.BI freeze " n"
If
.I n
is non-zero, freeze the current frame;
if
.I n
is zero, unfreeze the video.
.PP
The data file
.B tv
is read-only.
Reading is valid only after a capture window has been set
(see
.B capture
above).
Each read at file offset 0 causes the contents of the input video image
within the previously-set capture window to be
captured.
The frame data is successively returned
in this and subsequent reads until a short read signals that
all frame data has been transferred.
The data is returned in Plan 9
.I picfile
format, with a two line textual header followed by an empty
line, followed by the image data in binary format.
The header has the form:
.IP
.B "TYPE=ccir601"
.br
.BI "WINDOW=" "minx miny maxx maxy"
.PP
The
.B WINDOW
coordinates are those of the capture window.
The image data is organised as interleaved scan lines from top to bottom of the window,
with UY0 and VY1 values alternating, with two bytes per value, stored high-order byte
first, encoded according to the IEEE digital component video standard.
.SH SOURCE
.B /os/port/devtv.c
.br
.B /os/pc/tv.h
.SH SEE ALSO
.IR audio (3)
|