annotate stream/tv.h @ 23930:282a634da284

Extend OpenGL configure test to also check for glx/wgl and proper linking.
author reimar
date Mon, 30 Jul 2007 19:02:45 +0000
parents b5cc28c45d73
children dc135842ac89
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
1 #ifndef TV_H
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
2 #define TV_H
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
3
17012
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 14607
diff changeset
4 //#include "libao2/afmt.h"
19431
ac69ba536915 Explicitly include libmpcodecs/img_format.h and libvo/fastmemcpy.h.
diego
parents: 19271
diff changeset
5 //#include "libmpcodecs/img_format.h"
2830
596a6ba3520f never include files from public headers...
arpi
parents: 2819
diff changeset
6 //#include "mp_msg.h"
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
7
23882
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
8 typedef struct tv_param_s {
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
9 char *freq;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
10 char *channel;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
11 char *chanlist;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
12 char *norm;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
13 int automute;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
14 #ifdef HAVE_TV_V4L2
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
15 int normid;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
16 #endif
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
17 char *device;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
18 char *driver;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
19 int width;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
20 int height;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
21 int input;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
22 int outfmt;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
23 float fps;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
24 char **channels;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
25 int noaudio;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
26 int immediate;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
27 int audiorate;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
28 int audio_id;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
29 #if defined(HAVE_TV_V4L)
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
30 int amode;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
31 int volume;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
32 int bass;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
33 int treble;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
34 int balance;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
35 int forcechan;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
36 int force_audio;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
37 int buffer_size;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
38 int mjpeg;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
39 int decimation;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
40 int quality;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
41 #if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X)
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
42 int alsa;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
43 #endif
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
44 char* adevice;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
45 #endif
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
46 int brightness;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
47 int contrast;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
48 int hue;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
49 int saturation;
23900
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
50 char *tdevice; ///< teletext device
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
51 int tformat; ///< teletext display format
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
52 int tpage; ///< start teletext page
23882
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
53 } tv_param_t;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
54
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
55 extern tv_param_t stream_tv_defaults;
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
56
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
57 typedef struct tvi_info_s
98769cea155c added tv subsystem
alex
parents:
diff changeset
58 {
23883
d65439444b75 Removing global variables from tv://
voroshil
parents: 23882
diff changeset
59 struct tvi_handle_s * (*tvi_init)(tv_param_t* tv_param);
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
60 const char *name;
98769cea155c added tv subsystem
alex
parents:
diff changeset
61 const char *short_name;
98769cea155c added tv subsystem
alex
parents:
diff changeset
62 const char *author;
98769cea155c added tv subsystem
alex
parents:
diff changeset
63 const char *comment;
98769cea155c added tv subsystem
alex
parents:
diff changeset
64 } tvi_info_t;
98769cea155c added tv subsystem
alex
parents:
diff changeset
65
98769cea155c added tv subsystem
alex
parents:
diff changeset
66 typedef struct tvi_functions_s
98769cea155c added tv subsystem
alex
parents:
diff changeset
67 {
98769cea155c added tv subsystem
alex
parents:
diff changeset
68 int (*init)();
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
69 int (*uninit)();
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
70 int (*control)();
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
71 int (*start)();
5572
8cd761968f35 BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents: 5098
diff changeset
72 double (*grab_video_frame)();
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
73 int (*get_video_framesize)();
5572
8cd761968f35 BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents: 5098
diff changeset
74 double (*grab_audio_frame)();
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
75 int (*get_audio_framesize)();
98769cea155c added tv subsystem
alex
parents:
diff changeset
76 } tvi_functions_t;
98769cea155c added tv subsystem
alex
parents:
diff changeset
77
98769cea155c added tv subsystem
alex
parents:
diff changeset
78 typedef struct tvi_handle_s {
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
79 tvi_functions_t *functions;
09d5c9834580 tv update
alex
parents: 2790
diff changeset
80 void *priv;
09d5c9834580 tv update
alex
parents: 2790
diff changeset
81 int seq;
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
82
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
83 /* specific */
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
84 int norm;
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
85 int chanlist;
18032
de6740c3ab2a 10l: huge amount of constant crap in data segment
rfelker
parents: 17012
diff changeset
86 const struct CHANLIST *chanlist_s;
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
87 int channel;
23882
d5be90343fac Removing global variables from tv://
voroshil
parents: 23881
diff changeset
88 tv_param_t * tv_param;
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
89 } tvi_handle_t;
98769cea155c added tv subsystem
alex
parents:
diff changeset
90
8627
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
91 typedef struct tv_channels_s {
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
92 int index;
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
93 char number[5];
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
94 char name[20];
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
95 int freq;
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
96 struct tv_channels_s *next;
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
97 struct tv_channels_s *prev;
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
98 } tv_channels_t;
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
99
14607
7a80c6ac5058 several sets of headers declare global variables in them, which causes multiple definition errors with gcc 4.x
iive
parents: 13978
diff changeset
100 extern tv_channels_t *tv_channel_list;
7a80c6ac5058 several sets of headers declare global variables in them, which causes multiple definition errors with gcc 4.x
iive
parents: 13978
diff changeset
101 extern tv_channels_t *tv_channel_current, *tv_channel_last;
7a80c6ac5058 several sets of headers declare global variables in them, which causes multiple definition errors with gcc 4.x
iive
parents: 13978
diff changeset
102 extern char *tv_channel_last_real;
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
103
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
104 #define TVI_CONTROL_FALSE 0
98769cea155c added tv subsystem
alex
parents:
diff changeset
105 #define TVI_CONTROL_TRUE 1
98769cea155c added tv subsystem
alex
parents:
diff changeset
106 #define TVI_CONTROL_NA -1
98769cea155c added tv subsystem
alex
parents:
diff changeset
107 #define TVI_CONTROL_UNKNOWN -2
98769cea155c added tv subsystem
alex
parents:
diff changeset
108
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
109 /* ======================== CONTROLS =========================== */
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
110
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
111 /* GENERIC controls */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
112 #define TVI_CONTROL_IS_AUDIO 0x1
09d5c9834580 tv update
alex
parents: 2790
diff changeset
113 #define TVI_CONTROL_IS_VIDEO 0x2
09d5c9834580 tv update
alex
parents: 2790
diff changeset
114 #define TVI_CONTROL_IS_TUNER 0x3
7058
2e5c07262861 new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents: 5572
diff changeset
115 #define TVI_CONTROL_IMMEDIATE 0x4
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
116
09d5c9834580 tv update
alex
parents: 2790
diff changeset
117 /* VIDEO controls */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
118 #define TVI_CONTROL_VID_GET_FPS 0x101
09d5c9834580 tv update
alex
parents: 2790
diff changeset
119 #define TVI_CONTROL_VID_GET_PLANES 0x102
09d5c9834580 tv update
alex
parents: 2790
diff changeset
120 #define TVI_CONTROL_VID_GET_BITS 0x103
09d5c9834580 tv update
alex
parents: 2790
diff changeset
121 #define TVI_CONTROL_VID_CHK_BITS 0x104
09d5c9834580 tv update
alex
parents: 2790
diff changeset
122 #define TVI_CONTROL_VID_SET_BITS 0x105
09d5c9834580 tv update
alex
parents: 2790
diff changeset
123 #define TVI_CONTROL_VID_GET_FORMAT 0x106
09d5c9834580 tv update
alex
parents: 2790
diff changeset
124 #define TVI_CONTROL_VID_CHK_FORMAT 0x107
09d5c9834580 tv update
alex
parents: 2790
diff changeset
125 #define TVI_CONTROL_VID_SET_FORMAT 0x108
09d5c9834580 tv update
alex
parents: 2790
diff changeset
126 #define TVI_CONTROL_VID_GET_WIDTH 0x109
09d5c9834580 tv update
alex
parents: 2790
diff changeset
127 #define TVI_CONTROL_VID_CHK_WIDTH 0x110
09d5c9834580 tv update
alex
parents: 2790
diff changeset
128 #define TVI_CONTROL_VID_SET_WIDTH 0x111
09d5c9834580 tv update
alex
parents: 2790
diff changeset
129 #define TVI_CONTROL_VID_GET_HEIGHT 0x112
09d5c9834580 tv update
alex
parents: 2790
diff changeset
130 #define TVI_CONTROL_VID_CHK_HEIGHT 0x113
09d5c9834580 tv update
alex
parents: 2790
diff changeset
131 #define TVI_CONTROL_VID_SET_HEIGHT 0x114
2937
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
132 #define TVI_CONTROL_VID_GET_BRIGHTNESS 0x115
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
133 #define TVI_CONTROL_VID_SET_BRIGHTNESS 0x116
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
134 #define TVI_CONTROL_VID_GET_HUE 0x117
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
135 #define TVI_CONTROL_VID_SET_HUE 0x118
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
136 #define TVI_CONTROL_VID_GET_SATURATION 0x119
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
137 #define TVI_CONTROL_VID_SET_SATURATION 0x11a
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
138 #define TVI_CONTROL_VID_GET_CONTRAST 0x11b
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
139 #define TVI_CONTROL_VID_SET_CONTRAST 0x11c
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
140 #define TVI_CONTROL_VID_GET_PICTURE 0x11d
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
141 #define TVI_CONTROL_VID_SET_PICTURE 0x11e
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
142
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
143 /* TUNER controls */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
144 #define TVI_CONTROL_TUN_GET_FREQ 0x201
09d5c9834580 tv update
alex
parents: 2790
diff changeset
145 #define TVI_CONTROL_TUN_SET_FREQ 0x202
09d5c9834580 tv update
alex
parents: 2790
diff changeset
146 #define TVI_CONTROL_TUN_GET_TUNER 0x203 /* update priv->tuner struct for used input */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
147 #define TVI_CONTROL_TUN_SET_TUNER 0x204 /* update priv->tuner struct for used input */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
148 #define TVI_CONTROL_TUN_GET_NORM 0x205
09d5c9834580 tv update
alex
parents: 2790
diff changeset
149 #define TVI_CONTROL_TUN_SET_NORM 0x206
09d5c9834580 tv update
alex
parents: 2790
diff changeset
150
09d5c9834580 tv update
alex
parents: 2790
diff changeset
151 /* AUDIO controls */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
152 #define TVI_CONTROL_AUD_GET_FORMAT 0x301
09d5c9834580 tv update
alex
parents: 2790
diff changeset
153 #define TVI_CONTROL_AUD_GET_SAMPLERATE 0x302
09d5c9834580 tv update
alex
parents: 2790
diff changeset
154 #define TVI_CONTROL_AUD_GET_SAMPLESIZE 0x303
09d5c9834580 tv update
alex
parents: 2790
diff changeset
155 #define TVI_CONTROL_AUD_GET_CHANNELS 0x304
5572
8cd761968f35 BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents: 5098
diff changeset
156 #define TVI_CONTROL_AUD_SET_SAMPLERATE 0x305
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
157
09d5c9834580 tv update
alex
parents: 2790
diff changeset
158 /* SPECIFIC controls */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
159 #define TVI_CONTROL_SPC_GET_INPUT 0x401 /* set input channel (tv,s-video,composite..) */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
160 #define TVI_CONTROL_SPC_SET_INPUT 0x402 /* set input channel (tv,s-video,composite..) */
13978
2a9afbfc79d7 setting the norm using text ID instead of numeric
henry
parents: 11775
diff changeset
161 #define TVI_CONTROL_SPC_GET_NORMID 0x403 /* get normid from norm name */
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
162
23900
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
163 //tvi_* ioctl (not tvi_vbi.c !!!)
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
164 #define TVI_CONTROL_VBI_INIT 0x501 ///< vbi init
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
165
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
166 /*
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
167 TELETEXT controls (through tv_teletext_control() )
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
168 NOTE:
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
169 _SET_ should be _GET_ +1
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
170 _STEP_ should be _GET_ +2
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
171 */
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
172 #define TV_VBI_CONTROL_GET_MODE 0x510 ///< get current mode teletext
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
173 #define TV_VBI_CONTROL_SET_MODE 0x511 ///< on/off grab teletext
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
174
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
175 #define TV_VBI_CONTROL_GET_PAGE 0x513 ///< get grabbed teletext page
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
176 #define TV_VBI_CONTROL_SET_PAGE 0x514 ///< set grab teletext page number
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
177 #define TV_VBI_CONTROL_STEP_PAGE 0x515 ///< step grab teletext page number
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
178
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
179 #define TV_VBI_CONTROL_GET_SUBPAGE 0x516 ///< get grabbed teletext page
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
180 #define TV_VBI_CONTROL_SET_SUBPAGE 0x517 ///< set grab teletext page number
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
181
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
182 #define TV_VBI_CONTROL_GET_FORMAT 0x519 ///< get eletext format
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
183 #define TV_VBI_CONTROL_SET_FORMAT 0x51a ///< set teletext format
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
184
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
185 #define TV_VBI_CONTROL_GET_HALF_PAGE 0x51c ///< get current half page
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
186 #define TV_VBI_CONTROL_SET_HALF_PAGE 0x51d ///< switch half page
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
187
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
188 #define TV_VBI_CONTROL_ADD_DEC 0x550 ///< add page number with dec
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
189 #define TV_VBI_CONTROL_GO_LINK 0x551 ///< go link (1..6) NYI
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
190 #define TV_VBI_CONTROL_GET_VBIPAGE 0x552 ///< get vbi_image for grabbed teletext page
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
191 #define TV_VBI_CONTROL_RESET 0x553 ///< vbi reset
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
192 #define TV_VBI_CONTROL_START 0x554 ///< vbi start
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
193 #define TV_VBI_CONTROL_STOP 0x555 ///< vbi stop
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
194 #define TV_VBI_CONTROL_DECODE_PAGE 0x556 ///< decode vbi page
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
195
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
196 int tv_set_color_options(tvi_handle_t *tvh, int opt, int val);
18172
90b62d7c0fca Implement tv_get_color_options() and make tv_set_color_options() return
albeu
parents: 18032
diff changeset
197 int tv_get_color_options(tvi_handle_t *tvh, int opt, int* val);
2937
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
198 #define TV_COLOR_BRIGHTNESS 1
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
199 #define TV_COLOR_HUE 2
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
200 #define TV_COLOR_SATURATION 3
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
201 #define TV_COLOR_CONTRAST 4
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
202
8627
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
203 int tv_step_channel_real(tvi_handle_t *tvh, int direction);
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
204 int tv_step_channel(tvi_handle_t *tvh, int direction);
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
205 #define TV_CHANNEL_LOWER 1
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
206 #define TV_CHANNEL_HIGHER 2
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
207
8627
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
208 int tv_last_channel(tvi_handle_t *tvh);
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
209
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
210 int tv_set_channel_real(tvi_handle_t *tvh, char *channel);
8494
47cf94058137 add a TV_SET_CNANNEL command
henry
parents: 8477
diff changeset
211 int tv_set_channel(tvi_handle_t *tvh, char *channel);
47cf94058137 add a TV_SET_CNANNEL command
henry
parents: 8477
diff changeset
212
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
213 int tv_step_norm(tvi_handle_t *tvh);
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
214 int tv_step_chanlist(tvi_handle_t *tvh);
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
215
10521
141141fdd250 I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents: 9663
diff changeset
216 int tv_set_freq(tvi_handle_t *tvh, unsigned long freq);
141141fdd250 I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents: 9663
diff changeset
217 int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq);
22667
e1859558b37d New slave command: tv_step_freq <offset in MHz>
voroshil
parents: 22381
diff changeset
218 int tv_step_freq(tvi_handle_t *tvh, float step_interval);
10521
141141fdd250 I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents: 9663
diff changeset
219
141141fdd250 I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents: 9663
diff changeset
220 int tv_set_norm(tvi_handle_t *tvh, char* norm);
141141fdd250 I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents: 9663
diff changeset
221
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
222 #define TV_NORM_PAL 1
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
223 #define TV_NORM_NTSC 2
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
224 #define TV_NORM_SECAM 3
8477
b5dce4fa1c48 support for exotic norms
henry
parents: 7905
diff changeset
225 #define TV_NORM_PALNC 4
b5dce4fa1c48 support for exotic norms
henry
parents: 7905
diff changeset
226 #define TV_NORM_PALM 5
b5dce4fa1c48 support for exotic norms
henry
parents: 7905
diff changeset
227 #define TV_NORM_PALN 6
b5dce4fa1c48 support for exotic norms
henry
parents: 7905
diff changeset
228 #define TV_NORM_NTSCJP 7
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
229
23900
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
230 #define VBI_TFORMAT_TEXT 0 ///< text mode
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
231 #define VBI_TFORMAT_BW 1 ///< back&white mode
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
232 #define VBI_TFORMAT_GRAY 2 ///< grayscale mode
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
233 #define VBI_TFORMAT_COLOR 3 ///< color mode (require color_spu patch!)
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
234
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
235 #define VBI_MAX_PAGES 0x800 ///< max sub pages number
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
236 #define VBI_MAX_SUBPAGES 64 ///< max sub pages number
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
237
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
238 #define VBI_ROWS 24 ///< teletext page width in chars
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
239 #define VBI_COLUMNS 40 ///< teletext page height in chars
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
240 #define VBI_TIME_LINEPOS 26 ///< time line pos in page header
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
241
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
242 typedef
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
243 enum{
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
244 TT_FORMAT_OPAQUE=0, ///< opaque
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
245 TT_FORMAT_TRANSPARENT, ///< translarent
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
246 TT_FORMAT_OPAQUE_INV, ///< opaque with inverted colors
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
247 TT_FORMAT_TRANSPARENT_INV ///< translarent with inverted colors
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
248 } teletext_format;
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
249
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
250 typedef
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
251 enum{
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
252 TT_ZOOM_NORMAL=0,
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
253 TT_ZOOM_TOP_HALF,
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
254 TT_ZOOM_BOTTOM_HALF
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
255 } teletext_zoom;
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
256
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
257 typedef struct tt_char_s{
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
258 unsigned int unicode; ///< unicode (utf8) character
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
259 unsigned char fg; ///< foreground color
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
260 unsigned char bg; ///< background color
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
261 unsigned char gfx; ///< 0-no gfx, 1-solid gfx, 2-separated gfx
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
262 unsigned char ctl; ///< control character
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
263 unsigned char lng; ///< lang: 0-lating,1-national
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
264 unsigned char raw; ///< raw character (as received from device)
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
265 } tt_char;
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
266
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
267 typedef struct tt_page_s{
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
268 int pagenum; ///< page number
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
269 int subpagenum; ///< subpage number
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
270 unsigned char lang; ///< language code
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
271 unsigned char active; ///< page is complete and ready for rendering
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
272 unsigned char flags; ///< page flags, not used
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
273 unsigned char raw[VBI_ROWS*VBI_COLUMNS]; ///< page data
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
274 struct tt_page_s* next_subpage;
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
275 } tt_page;
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
276
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
277 typedef struct tt_stream_props_s{
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
278 int sampling_rate;
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
279 int samples_per_line;
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
280 int offset;
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
281 int count[2]; ///< number of lines in first and second fields
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
282 int interlaced; ///< vbi data are interlaced
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
283 int bufsize; ///< required buffer size
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
284 } tt_stream_props;
b5cc28c45d73 Teletext support.
voroshil
parents: 23889
diff changeset
285
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
286 #endif /* TV_H */