annotate stream/tv.h @ 23510:a6c619ee9d30

Teletext support for tv:// (v4l and v4l2 only) modified patch from Otvos Attila oattila at chello dot hu Module uses zvbi library for all low-level VBI operations (like I/O with vbi device, converting vbi pages into usefull vbi_page stuctures, rendering them into RGB32 images). All teletext related stuff (except properties, slave commands and rendering osd in text mode or RGB32 rendered teletext pages in spu mode) is implemented in tvi_vbi.c New properties: teletext_page - switching between pages teletext_mode - switch between on/off/opaque/transparent modes teletext_format - (currently read-only) allows to get format info (black/white,gray,text) teletext_half_page - trivial zooming (displaying top/bottom half of teletext page) New slave commands: teletext_add_dec - user interface for jumping to any page by editing page number interactively teletext_go_link - goes though links, specified on current page
author voroshil
date Sun, 10 Jun 2007 00:06:12 +0000
parents f6b20f40a854
children 21c28c2645fe
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
98769cea155c added tv subsystem
alex
parents:
diff changeset
4 #ifdef USE_TV
17012
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 14607
diff changeset
5 //#include "libao2/afmt.h"
19431
ac69ba536915 Explicitly include libmpcodecs/img_format.h and libvo/fastmemcpy.h.
diego
parents: 19271
diff changeset
6 //#include "libmpcodecs/img_format.h"
2830
596a6ba3520f never include files from public headers...
arpi
parents: 2819
diff changeset
7 //#include "mp_msg.h"
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
8
2837
c63562f5f56f tuning worx (can set frequency)
alex
parents: 2830
diff changeset
9 extern char *tv_param_freq;
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
10 extern char *tv_param_channel;
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
11 extern char *tv_param_chanlist;
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
12 extern char *tv_param_norm;
23422
e7b4c913dc31 New "automute" tv:// option.
voroshil
parents: 23377
diff changeset
13 extern int tv_param_automute;
10537
31f12f99118b v4l2 support
henry
parents: 10521
diff changeset
14 #ifdef HAVE_TV_V4L2
31f12f99118b v4l2 support
henry
parents: 10521
diff changeset
15 extern int tv_param_normid;
31f12f99118b v4l2 support
henry
parents: 10521
diff changeset
16 #endif
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
17 extern char *tv_param_device;
98769cea155c added tv subsystem
alex
parents:
diff changeset
18 extern char *tv_param_driver;
98769cea155c added tv subsystem
alex
parents:
diff changeset
19 extern int tv_param_width;
98769cea155c added tv subsystem
alex
parents:
diff changeset
20 extern int tv_param_height;
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
21 extern int tv_param_input;
10598
2b88c28a3cfe Settled to CONF_TYPE_IMGFMT which simplified lot of things. Now there's no need to add new img formats to the source, instead you can try it out by providing it in hexa format, and if it isn't supported by the card, you get a nice error message. That's all.
alex
parents: 10537
diff changeset
22 extern int tv_param_outfmt;
3285
bd7bff4cb453 add tv fps support
alex
parents: 2941
diff changeset
23 extern float tv_param_fps;
8627
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
24 extern char **tv_param_channels;
5098
b884521bf7f9 0.1l ;)
alex
parents: 3815
diff changeset
25 extern int tv_param_noaudio;
5572
8cd761968f35 BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents: 5098
diff changeset
26 extern int tv_param_immediate;
8cd761968f35 BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents: 5098
diff changeset
27 extern int tv_param_audiorate;
10822
6377c7d0459e audio id setting support for bsdbt848 by Nikolay Nikolaev <nicknickolaev@yahoo.com>
alex
parents: 10598
diff changeset
28 extern int tv_param_audio_id;
19189
0506fc913c27 Introduce general V4L variable/define.
diego
parents: 19188
diff changeset
29 #if defined(HAVE_TV_V4L)
7163
a193df8b275b v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents: 7058
diff changeset
30 extern int tv_param_amode;
a193df8b275b v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents: 7058
diff changeset
31 extern int tv_param_volume;
a193df8b275b v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents: 7058
diff changeset
32 extern int tv_param_bass;
a193df8b275b v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents: 7058
diff changeset
33 extern int tv_param_treble;
a193df8b275b v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents: 7058
diff changeset
34 extern int tv_param_balance;
a193df8b275b v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents: 7058
diff changeset
35 extern int tv_param_forcechan;
7835
d489890c59d3 add an option to force audio recording when a tv card reports no audio sources
henry
parents: 7163
diff changeset
36 extern int tv_param_force_audio;
7905
b062996d9794 added an option for specifying the size of capture buffer
henry
parents: 7835
diff changeset
37 extern int tv_param_buffer_size;
9620
ce4cd85498f3 hardware mjpeg encoding using v4l by Iv«”n Sz«”nt«Ń <szivan@freemail.hu>
henry
parents: 8627
diff changeset
38 extern int tv_param_mjpeg;
ce4cd85498f3 hardware mjpeg encoding using v4l by Iv«”n Sz«”nt«Ń <szivan@freemail.hu>
henry
parents: 8627
diff changeset
39 extern int tv_param_decimation;
ce4cd85498f3 hardware mjpeg encoding using v4l by Iv«”n Sz«”nt«Ń <szivan@freemail.hu>
henry
parents: 8627
diff changeset
40 extern int tv_param_quality;
11775
66e491c35dc8 ALSA 1.x audio out driver
henry
parents: 10822
diff changeset
41 #if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X)
7058
2e5c07262861 new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents: 5572
diff changeset
42 extern int tv_param_alsa;
2e5c07262861 new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents: 5572
diff changeset
43 #endif
2e5c07262861 new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents: 5572
diff changeset
44 extern char* tv_param_adevice;
2e5c07262861 new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents: 5572
diff changeset
45 #endif
23510
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
46 #ifdef HAVE_TV_TELETEXT
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
47 extern char* tv_param_tdevice; ///< teletext vbi device
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
48 extern char* tv_param_tformat; ///< format: text,bw,gray,color
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
49 extern int tv_param_tpage; ///< page number
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
50 #endif
9663
596ad944a65e color equalizer for tv input
henry
parents: 9620
diff changeset
51 extern int tv_param_brightness;
596ad944a65e color equalizer for tv input
henry
parents: 9620
diff changeset
52 extern int tv_param_contrast;
596ad944a65e color equalizer for tv input
henry
parents: 9620
diff changeset
53 extern int tv_param_hue;
596ad944a65e color equalizer for tv input
henry
parents: 9620
diff changeset
54 extern int tv_param_saturation;
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
55
98769cea155c added tv subsystem
alex
parents:
diff changeset
56 typedef struct tvi_info_s
98769cea155c added tv subsystem
alex
parents:
diff changeset
57 {
22381
6cabac4d35b5 tv driver loading rework. As a side effect "-tv driver=help" option is
voroshil
parents: 19431
diff changeset
58 struct tvi_handle_s * (*tvi_init)(char *device,char *adevice);
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
59 const char *name;
98769cea155c added tv subsystem
alex
parents:
diff changeset
60 const char *short_name;
98769cea155c added tv subsystem
alex
parents:
diff changeset
61 const char *author;
98769cea155c added tv subsystem
alex
parents:
diff changeset
62 const char *comment;
98769cea155c added tv subsystem
alex
parents:
diff changeset
63 } tvi_info_t;
98769cea155c added tv subsystem
alex
parents:
diff changeset
64
98769cea155c added tv subsystem
alex
parents:
diff changeset
65 typedef struct tvi_functions_s
98769cea155c added tv subsystem
alex
parents:
diff changeset
66 {
98769cea155c added tv subsystem
alex
parents:
diff changeset
67 int (*init)();
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
68 int (*uninit)();
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
69 int (*control)();
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
70 int (*start)();
5572
8cd761968f35 BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents: 5098
diff changeset
71 double (*grab_video_frame)();
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
72 int (*get_video_framesize)();
5572
8cd761968f35 BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents: 5098
diff changeset
73 double (*grab_audio_frame)();
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
74 int (*get_audio_framesize)();
98769cea155c added tv subsystem
alex
parents:
diff changeset
75 } tvi_functions_t;
98769cea155c added tv subsystem
alex
parents:
diff changeset
76
98769cea155c added tv subsystem
alex
parents:
diff changeset
77 typedef struct tvi_handle_s {
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
78 tvi_functions_t *functions;
09d5c9834580 tv update
alex
parents: 2790
diff changeset
79 void *priv;
23510
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
80 #ifdef HAVE_TV_TELETEXT
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
81 void *priv_vbi;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
82 #endif
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
83 int seq;
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
84
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
85 /* specific */
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
86 int norm;
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
87 int chanlist;
18032
de6740c3ab2a 10l: huge amount of constant crap in data segment
rfelker
parents: 17012
diff changeset
88 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
89 int channel;
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
90 } tvi_handle_t;
98769cea155c added tv subsystem
alex
parents:
diff changeset
91
8627
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
92 typedef struct tv_channels_s {
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
93 int index;
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
94 char number[5];
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
95 char name[20];
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
96 int freq;
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
97 struct tv_channels_s *next;
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
98 struct tv_channels_s *prev;
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
99 } tv_channels_t;
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
100
23510
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
101 #ifdef HAVE_TV_TELETEXT
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
102 typedef struct tv_teletext_img_s {
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
103 void* canvas;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
104 int tformat;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
105 int columns;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
106 int rows;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
107 int height;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
108 int width;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
109 int half;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
110 } tv_teletext_img_t;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
111 #endif
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
112
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
113 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
114 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
115 extern char *tv_channel_last_real;
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
116
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
117 #define TVI_CONTROL_FALSE 0
98769cea155c added tv subsystem
alex
parents:
diff changeset
118 #define TVI_CONTROL_TRUE 1
98769cea155c added tv subsystem
alex
parents:
diff changeset
119 #define TVI_CONTROL_NA -1
98769cea155c added tv subsystem
alex
parents:
diff changeset
120 #define TVI_CONTROL_UNKNOWN -2
98769cea155c added tv subsystem
alex
parents:
diff changeset
121
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
122 /* ======================== CONTROLS =========================== */
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
123
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
124 /* GENERIC controls */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
125 #define TVI_CONTROL_IS_AUDIO 0x1
09d5c9834580 tv update
alex
parents: 2790
diff changeset
126 #define TVI_CONTROL_IS_VIDEO 0x2
09d5c9834580 tv update
alex
parents: 2790
diff changeset
127 #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
128 #define TVI_CONTROL_IMMEDIATE 0x4
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
129
09d5c9834580 tv update
alex
parents: 2790
diff changeset
130 /* VIDEO controls */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
131 #define TVI_CONTROL_VID_GET_FPS 0x101
09d5c9834580 tv update
alex
parents: 2790
diff changeset
132 #define TVI_CONTROL_VID_GET_PLANES 0x102
09d5c9834580 tv update
alex
parents: 2790
diff changeset
133 #define TVI_CONTROL_VID_GET_BITS 0x103
09d5c9834580 tv update
alex
parents: 2790
diff changeset
134 #define TVI_CONTROL_VID_CHK_BITS 0x104
09d5c9834580 tv update
alex
parents: 2790
diff changeset
135 #define TVI_CONTROL_VID_SET_BITS 0x105
09d5c9834580 tv update
alex
parents: 2790
diff changeset
136 #define TVI_CONTROL_VID_GET_FORMAT 0x106
09d5c9834580 tv update
alex
parents: 2790
diff changeset
137 #define TVI_CONTROL_VID_CHK_FORMAT 0x107
09d5c9834580 tv update
alex
parents: 2790
diff changeset
138 #define TVI_CONTROL_VID_SET_FORMAT 0x108
09d5c9834580 tv update
alex
parents: 2790
diff changeset
139 #define TVI_CONTROL_VID_GET_WIDTH 0x109
09d5c9834580 tv update
alex
parents: 2790
diff changeset
140 #define TVI_CONTROL_VID_CHK_WIDTH 0x110
09d5c9834580 tv update
alex
parents: 2790
diff changeset
141 #define TVI_CONTROL_VID_SET_WIDTH 0x111
09d5c9834580 tv update
alex
parents: 2790
diff changeset
142 #define TVI_CONTROL_VID_GET_HEIGHT 0x112
09d5c9834580 tv update
alex
parents: 2790
diff changeset
143 #define TVI_CONTROL_VID_CHK_HEIGHT 0x113
09d5c9834580 tv update
alex
parents: 2790
diff changeset
144 #define TVI_CONTROL_VID_SET_HEIGHT 0x114
2937
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
145 #define TVI_CONTROL_VID_GET_BRIGHTNESS 0x115
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
146 #define TVI_CONTROL_VID_SET_BRIGHTNESS 0x116
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
147 #define TVI_CONTROL_VID_GET_HUE 0x117
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
148 #define TVI_CONTROL_VID_SET_HUE 0x118
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
149 #define TVI_CONTROL_VID_GET_SATURATION 0x119
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
150 #define TVI_CONTROL_VID_SET_SATURATION 0x11a
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
151 #define TVI_CONTROL_VID_GET_CONTRAST 0x11b
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
152 #define TVI_CONTROL_VID_SET_CONTRAST 0x11c
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
153 #define TVI_CONTROL_VID_GET_PICTURE 0x11d
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
154 #define TVI_CONTROL_VID_SET_PICTURE 0x11e
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
155
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
156 /* TUNER controls */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
157 #define TVI_CONTROL_TUN_GET_FREQ 0x201
09d5c9834580 tv update
alex
parents: 2790
diff changeset
158 #define TVI_CONTROL_TUN_SET_FREQ 0x202
09d5c9834580 tv update
alex
parents: 2790
diff changeset
159 #define TVI_CONTROL_TUN_GET_TUNER 0x203 /* update priv->tuner struct for used input */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
160 #define TVI_CONTROL_TUN_SET_TUNER 0x204 /* update priv->tuner struct for used input */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
161 #define TVI_CONTROL_TUN_GET_NORM 0x205
09d5c9834580 tv update
alex
parents: 2790
diff changeset
162 #define TVI_CONTROL_TUN_SET_NORM 0x206
09d5c9834580 tv update
alex
parents: 2790
diff changeset
163
09d5c9834580 tv update
alex
parents: 2790
diff changeset
164 /* AUDIO controls */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
165 #define TVI_CONTROL_AUD_GET_FORMAT 0x301
09d5c9834580 tv update
alex
parents: 2790
diff changeset
166 #define TVI_CONTROL_AUD_GET_SAMPLERATE 0x302
09d5c9834580 tv update
alex
parents: 2790
diff changeset
167 #define TVI_CONTROL_AUD_GET_SAMPLESIZE 0x303
09d5c9834580 tv update
alex
parents: 2790
diff changeset
168 #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
169 #define TVI_CONTROL_AUD_SET_SAMPLERATE 0x305
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
170
09d5c9834580 tv update
alex
parents: 2790
diff changeset
171 /* SPECIFIC controls */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
172 #define TVI_CONTROL_SPC_GET_INPUT 0x401 /* set input channel (tv,s-video,composite..) */
09d5c9834580 tv update
alex
parents: 2790
diff changeset
173 #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
174 #define TVI_CONTROL_SPC_GET_NORMID 0x403 /* get normid from norm name */
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
175
23510
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
176 /* TELETEXT controls */
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
177 #define TVI_CONTROL_VBI_SET_MODE 0x501 ///< on/off grab teletext
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
178 #define TVI_CONTROL_VBI_GET_MODE 0x502 ///< get current mode teletext
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
179 #define TVI_CONTROL_VBI_STEP_MODE 0x503 ///< step teletext mode
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
180
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
181 #define TVI_CONTROL_VBI_SET_PAGE 0x504 ///< set grab teletext page number
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
182 #define TVI_CONTROL_VBI_STEP_PAGE 0x505 ///< step grab teletext page number
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
183 #define TVI_CONTROL_VBI_GET_PAGE 0x506 ///< get grabbed teletext page
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
184
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
185 #define TVI_CONTROL_VBI_SET_FORMAT 0x507 ///< set teletext format
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
186 #define TVI_CONTROL_VBI_STEP_FORMAT 0x508 ///< step teletext format
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
187 #define TVI_CONTROL_VBI_GET_FORMAT 0x509 ///< get eletext format
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
188
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
189 #define TVI_CONTROL_VBI_GET_HALF_PAGE 0x50a ///< get current half page
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
190 #define TVI_CONTROL_VBI_STEP_HALF_PAGE 0x50b ///< switch half page
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
191 #define TVI_CONTROL_VBI_SET_HALF_PAGE 0x50c ///< switch half page
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
192
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
193 #define TVI_CONTROL_VBI_ADD_DEC 0x50d ///< add page number with dec
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
194 #define TVI_CONTROL_VBI_GO_LINK 0x50e ///< go link (1..6)
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
195 #define TVI_CONTROL_VBI_GET_TXTPAGE 0x50f ///< get grabbed text teletext page
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
196 #define TVI_CONTROL_VBI_GET_IMGPAGE 0x510 ///< get grabbed image teletext page
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
197 #define TVI_CONTROL_VBI_GET_VBIPAGE 0x511 ///< get vbi_image for grabbed teletext page
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
198 #define TVI_CONTROL_VBI_RESET 0x512 ///< vbi reset
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
199 #define TVI_CONTROL_VBI_START 0x513 ///< vbi start
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
200
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
201 extern tvi_handle_t *tv_begin(void);
09d5c9834580 tv update
alex
parents: 2790
diff changeset
202 extern int tv_init(tvi_handle_t *tvh);
2931
bce9c945b29c tv interface update
alex
parents: 2837
diff changeset
203 extern int tv_uninit(tvi_handle_t *tvh);
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
204
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
205 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
206 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
207 #define TV_COLOR_BRIGHTNESS 1
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
208 #define TV_COLOR_HUE 2
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
209 #define TV_COLOR_SATURATION 3
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
210 #define TV_COLOR_CONTRAST 4
4307478ad922 added support for setting color values
alex
parents: 2931
diff changeset
211
8627
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
212 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
213 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
214 #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
215 #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
216
8627
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
217 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
218
14ab71b47a58 user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents: 8494
diff changeset
219 int tv_set_channel_real(tvi_handle_t *tvh, char *channel);
8494
47cf94058137 add a TV_SET_CNANNEL command
henry
parents: 8477
diff changeset
220 int tv_set_channel(tvi_handle_t *tvh, char *channel);
47cf94058137 add a TV_SET_CNANNEL command
henry
parents: 8477
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 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
223 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
224
10521
141141fdd250 I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents: 9663
diff changeset
225 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
226 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
227 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
228
141141fdd250 I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents: 9663
diff changeset
229 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
230
23510
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
231 #ifdef HAVE_TV_TELETEXT
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
232 int tv_teletext_control(tvi_handle_t* tvh, int control,void* arg);
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
233 /// add dec to pageno
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
234 int tv_teletext_add_dec(tvi_handle_t *tvh, char *dec);
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
235 /// go link
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
236 int tv_teletext_go_link(tvi_handle_t *tvh, int linkno);
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
237 /// get current vbi_page
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
238 void* tv_get_teletext_vbipage(tvi_handle_t *tvh);
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
239 /// get current page text
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
240 char* tv_get_teletext_txtpage(tvi_handle_t *tvh);
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
241 /// get current page image (RGB32_LB format)
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
242 tv_teletext_img_t* tv_get_teletext_imgpage(tvi_handle_t *tvh);
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
243 #endif
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents: 23485
diff changeset
244
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
245 #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
246 #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
247 #define TV_NORM_SECAM 3
8477
b5dce4fa1c48 support for exotic norms
henry
parents: 7905
diff changeset
248 #define TV_NORM_PALNC 4
b5dce4fa1c48 support for exotic norms
henry
parents: 7905
diff changeset
249 #define TV_NORM_PALM 5
b5dce4fa1c48 support for exotic norms
henry
parents: 7905
diff changeset
250 #define TV_NORM_PALN 6
b5dce4fa1c48 support for exotic norms
henry
parents: 7905
diff changeset
251 #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
252
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
253 #endif /* USE_TV */
2941
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
254
60c1b7c0ea21 added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents: 2937
diff changeset
255 #endif /* TV_H */