00001 #ifndef __LINUX_VIDEODEV2_H
00002 #define __LINUX_VIDEODEV2_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #define v4l2_fourcc(a,b,c,d)\
00023 (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24))
00024
00025
00026
00027
00028 enum v4l2_field {
00029 V4L2_FIELD_ANY = 0,
00030
00031
00032
00033 V4L2_FIELD_NONE = 1,
00034 V4L2_FIELD_TOP = 2,
00035 V4L2_FIELD_BOTTOM = 3,
00036 V4L2_FIELD_INTERLACED = 4,
00037 V4L2_FIELD_SEQ_TB = 5,
00038
00039 V4L2_FIELD_SEQ_BT = 6,
00040 V4L2_FIELD_ALTERNATE = 7,
00041
00042 };
00043 #define V4L2_FIELD_HAS_TOP(field) \
00044 ((field) == V4L2_FIELD_TOP ||\
00045 (field) == V4L2_FIELD_INTERLACED ||\
00046 (field) == V4L2_FIELD_SEQ_TB ||\
00047 (field) == V4L2_FIELD_SEQ_BT)
00048 #define V4L2_FIELD_HAS_BOTTOM(field) \
00049 ((field) == V4L2_FIELD_BOTTOM ||\
00050 (field) == V4L2_FIELD_INTERLACED ||\
00051 (field) == V4L2_FIELD_SEQ_TB ||\
00052 (field) == V4L2_FIELD_SEQ_BT)
00053 #define V4L2_FIELD_HAS_BOTH(field) \
00054 ((field) == V4L2_FIELD_INTERLACED ||\
00055 (field) == V4L2_FIELD_SEQ_TB ||\
00056 (field) == V4L2_FIELD_SEQ_BT)
00057
00058 enum v4l2_buf_type {
00059 V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
00060 V4L2_BUF_TYPE_VIDEO_OUTPUT = 2,
00061 V4L2_BUF_TYPE_VIDEO_OVERLAY = 3,
00062 V4L2_BUF_TYPE_VBI_CAPTURE = 4,
00063 V4L2_BUF_TYPE_VBI_OUTPUT = 5,
00064 V4L2_BUF_TYPE_PRIVATE = 0x80,
00065 };
00066
00067 enum v4l2_ctrl_type {
00068 V4L2_CTRL_TYPE_INTEGER = 1,
00069 V4L2_CTRL_TYPE_BOOLEAN = 2,
00070 V4L2_CTRL_TYPE_MENU = 3,
00071 V4L2_CTRL_TYPE_BUTTON = 4,
00072 };
00073
00074 enum v4l2_tuner_type {
00075 V4L2_TUNER_RADIO = 1,
00076 V4L2_TUNER_ANALOG_TV = 2,
00077 };
00078
00079 enum v4l2_memory {
00080 V4L2_MEMORY_MMAP = 1,
00081 V4L2_MEMORY_USERPTR = 2,
00082 V4L2_MEMORY_OVERLAY = 3,
00083 };
00084
00085
00086 enum v4l2_colorspace {
00087
00088 V4L2_COLORSPACE_SMPTE170M = 1,
00089
00090
00091 V4L2_COLORSPACE_SMPTE240M = 2,
00092
00093
00094 V4L2_COLORSPACE_REC709 = 3,
00095
00096
00097 V4L2_COLORSPACE_BT878 = 4,
00098
00099
00100 V4L2_COLORSPACE_470_SYSTEM_M = 5,
00101 V4L2_COLORSPACE_470_SYSTEM_BG = 6,
00102
00103
00104
00105
00106
00107 V4L2_COLORSPACE_JPEG = 7,
00108
00109
00110 V4L2_COLORSPACE_SRGB = 8,
00111 };
00112
00113 struct v4l2_rect {
00114 __s32 left;
00115 __s32 top;
00116 __s32 width;
00117 __s32 height;
00118 };
00119
00120 struct v4l2_fract {
00121 __u32 numerator;
00122 __u32 denominator;
00123 };
00124
00125
00126
00127
00128 struct v4l2_capability
00129 {
00130 __u8 driver[16];
00131 __u8 card[32];
00132 __u8 bus_info[32];
00133 __u32 version;
00134 __u32 capabilities;
00135 __u32 reserved[4];
00136 };
00137
00138
00139 #define V4L2_CAP_VIDEO_CAPTURE 0x00000001
00140 #define V4L2_CAP_VIDEO_OUTPUT 0x00000002
00141 #define V4L2_CAP_VIDEO_OVERLAY 0x00000004
00142 #define V4L2_CAP_VBI_CAPTURE 0x00000010
00143 #define V4L2_CAP_VBI_OUTPUT 0x00000020
00144 #define V4L2_CAP_RDS_CAPTURE 0x00000100
00145
00146 #define V4L2_CAP_TUNER 0x00010000
00147 #define V4L2_CAP_AUDIO 0x00020000
00148
00149 #define V4L2_CAP_READWRITE 0x01000000
00150 #define V4L2_CAP_ASYNCIO 0x02000000
00151 #define V4L2_CAP_STREAMING 0x04000000
00152
00153
00154
00155
00156
00157 struct v4l2_pix_format
00158 {
00159 __u32 width;
00160 __u32 height;
00161 __u32 pixelformat;
00162 enum v4l2_field field;
00163 __u32 bytesperline;
00164 __u32 sizeimage;
00165 enum v4l2_colorspace colorspace;
00166 __u32 priv;
00167 };
00168
00169
00170 #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1')
00171 #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O')
00172 #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P')
00173 #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q')
00174 #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R','G','B','R')
00175 #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B','G','R','3')
00176 #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R','G','B','3')
00177 #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4')
00178 #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4')
00179 #define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y')
00180 #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9')
00181 #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2')
00182 #define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V')
00183 #define V4L2_PIX_FMT_UYVY v4l2_fourcc('U','Y','V','Y')
00184 #define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4','2','2','P')
00185 #define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4','1','1','P')
00186 #define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P')
00187
00188
00189 #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N','V','1','2')
00190 #define V4L2_PIX_FMT_NV21 v4l2_fourcc('N','V','2','1')
00191
00192
00193 #define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y','U','V','9')
00194 #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2')
00195 #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V')
00196 #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4')
00197
00198
00199 #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G')
00200 #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G')
00201 #define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d')
00202 #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G')
00203
00204
00205 #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A')
00206
00207
00208
00209
00210 struct v4l2_fmtdesc
00211 {
00212 __u32 index;
00213 enum v4l2_buf_type type;
00214 __u32 flags;
00215 __u8 description[32];
00216 __u32 pixelformat;
00217 __u32 reserved[4];
00218 };
00219
00220 #define V4L2_FMT_FLAG_COMPRESSED 0x0001
00221
00222
00223
00224
00225
00226 struct v4l2_timecode
00227 {
00228 __u32 type;
00229 __u32 flags;
00230 __u8 frames;
00231 __u8 seconds;
00232 __u8 minutes;
00233 __u8 hours;
00234 __u8 userbits[4];
00235 };
00236
00237
00238 #define V4L2_TC_TYPE_24FPS 1
00239 #define V4L2_TC_TYPE_25FPS 2
00240 #define V4L2_TC_TYPE_30FPS 3
00241 #define V4L2_TC_TYPE_50FPS 4
00242 #define V4L2_TC_TYPE_60FPS 5
00243
00244
00245 #define V4L2_TC_FLAG_DROPFRAME 0x0001
00246 #define V4L2_TC_FLAG_COLORFRAME 0x0002
00247 #define V4L2_TC_USERBITS_field 0x000C
00248 #define V4L2_TC_USERBITS_USERDEFINED 0x0000
00249 #define V4L2_TC_USERBITS_8BITCHARS 0x0008
00250
00251
00252
00253
00254
00255
00256 #if 0
00257
00258
00259
00260 struct v4l2_compression
00261 {
00262 __u32 quality;
00263 __u32 keyframerate;
00264 __u32 pframerate;
00265 __u32 reserved[5];
00266 };
00267 #endif
00268
00269 struct v4l2_jpegcompression
00270 {
00271 int quality;
00272
00273 int APPn;
00274
00275 int APP_len;
00276 char APP_data[60];
00277
00278 int COM_len;
00279 char COM_data[60];
00280
00281 __u32 jpeg_markers;
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291 #define V4L2_JPEG_MARKER_DHT (1<<3)
00292 #define V4L2_JPEG_MARKER_DQT (1<<4)
00293 #define V4L2_JPEG_MARKER_DRI (1<<5)
00294 #define V4L2_JPEG_MARKER_COM (1<<6)
00295 #define V4L2_JPEG_MARKER_APP (1<<7)
00296
00297 };
00298
00299
00300
00301
00302
00303 struct v4l2_requestbuffers
00304 {
00305 __u32 count;
00306 enum v4l2_buf_type type;
00307 enum v4l2_memory memory;
00308 __u32 reserved[2];
00309 };
00310
00311 struct v4l2_buffer
00312 {
00313 __u32 index;
00314 enum v4l2_buf_type type;
00315 __u32 bytesused;
00316 __u32 flags;
00317 enum v4l2_field field;
00318 struct timeval timestamp;
00319 struct v4l2_timecode timecode;
00320 __u32 sequence;
00321
00322
00323 enum v4l2_memory memory;
00324 union {
00325 __u32 offset;
00326 unsigned long userptr;
00327 } m;
00328 __u32 length;
00329
00330 __u32 reserved[2];
00331 };
00332
00333
00334 #define V4L2_BUF_FLAG_MAPPED 0x0001
00335 #define V4L2_BUF_FLAG_QUEUED 0x0002
00336 #define V4L2_BUF_FLAG_DONE 0x0004
00337 #define V4L2_BUF_FLAG_KEYFRAME 0x0008
00338 #define V4L2_BUF_FLAG_PFRAME 0x0010
00339 #define V4L2_BUF_FLAG_BFRAME 0x0020
00340 #define V4L2_BUF_FLAG_TIMECODE 0x0100
00341
00342
00343
00344
00345 struct v4l2_framebuffer
00346 {
00347 __u32 capability;
00348 __u32 flags;
00349
00350
00351 void* base;
00352 struct v4l2_pix_format fmt;
00353 };
00354
00355 #define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001
00356 #define V4L2_FBUF_CAP_CHROMAKEY 0x0002
00357 #define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004
00358 #define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008
00359
00360 #define V4L2_FBUF_FLAG_PRIMARY 0x0001
00361 #define V4L2_FBUF_FLAG_OVERLAY 0x0002
00362 #define V4L2_FBUF_FLAG_CHROMAKEY 0x0004
00363
00364 struct v4l2_clip
00365 {
00366 struct v4l2_rect c;
00367 struct v4l2_clip *next;
00368 };
00369
00370 struct v4l2_window
00371 {
00372 struct v4l2_rect w;
00373 enum v4l2_field field;
00374 __u32 chromakey;
00375 struct v4l2_clip *clips;
00376 __u32 clipcount;
00377 void *bitmap;
00378 };
00379
00380
00381
00382
00383
00384 struct v4l2_captureparm
00385 {
00386 __u32 capability;
00387 __u32 capturemode;
00388 struct v4l2_fract timeperframe;
00389 __u32 extendedmode;
00390 __u32 readbuffers;
00391 __u32 reserved[4];
00392 };
00393
00394 #define V4L2_MODE_HIGHQUALITY 0x0001
00395 #define V4L2_CAP_TIMEPERFRAME 0x1000
00396
00397 struct v4l2_outputparm
00398 {
00399 __u32 capability;
00400 __u32 outputmode;
00401 struct v4l2_fract timeperframe;
00402 __u32 extendedmode;
00403 __u32 writebuffers;
00404 __u32 reserved[4];
00405 };
00406
00407
00408
00409
00410
00411 struct v4l2_cropcap {
00412 enum v4l2_buf_type type;
00413 struct v4l2_rect bounds;
00414 struct v4l2_rect defrect;
00415 struct v4l2_fract pixelaspect;
00416 };
00417
00418 struct v4l2_crop {
00419 enum v4l2_buf_type type;
00420 struct v4l2_rect c;
00421 };
00422
00423
00424
00425
00426
00427 typedef __u64 v4l2_std_id;
00428
00429
00430 #define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001)
00431 #define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002)
00432 #define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004)
00433 #define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008)
00434 #define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010)
00435 #define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020)
00436 #define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040)
00437 #define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080)
00438
00439 #define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100)
00440 #define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200)
00441 #define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400)
00442 #define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800)
00443
00444 #define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000)
00445 #define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000)
00446
00447 #define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000)
00448 #define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000)
00449 #define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000)
00450 #define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000)
00451 #define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000)
00452 #define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000)
00453 #define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000)
00454
00455
00456 #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
00457 #define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)
00458
00459
00460 #define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\
00461 V4L2_STD_PAL_B1 |\
00462 V4L2_STD_PAL_G)
00463 #define V4L2_STD_PAL_DK (V4L2_STD_PAL_D |\
00464 V4L2_STD_PAL_D1 |\
00465 V4L2_STD_PAL_K)
00466 #define V4L2_STD_PAL (V4L2_STD_PAL_BG |\
00467 V4L2_STD_PAL_DK |\
00468 V4L2_STD_PAL_H |\
00469 V4L2_STD_PAL_I)
00470 #define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\
00471 V4L2_STD_NTSC_M_JP)
00472 #define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\
00473 V4L2_STD_SECAM_D |\
00474 V4L2_STD_SECAM_G |\
00475 V4L2_STD_SECAM_H |\
00476 V4L2_STD_SECAM_K |\
00477 V4L2_STD_SECAM_K1 |\
00478 V4L2_STD_SECAM_L)
00479
00480 #define V4L2_STD_525_60 (V4L2_STD_PAL_M |\
00481 V4L2_STD_PAL_60 |\
00482 V4L2_STD_NTSC)
00483 #define V4L2_STD_625_50 (V4L2_STD_PAL |\
00484 V4L2_STD_PAL_N |\
00485 V4L2_STD_PAL_Nc |\
00486 V4L2_STD_SECAM)
00487
00488 #define V4L2_STD_UNKNOWN 0
00489 #define V4L2_STD_ALL (V4L2_STD_525_60 |\
00490 V4L2_STD_625_50)
00491
00492 struct v4l2_standard
00493 {
00494 __u32 index;
00495 v4l2_std_id id;
00496 __u8 name[24];
00497 struct v4l2_fract frameperiod;
00498 __u32 framelines;
00499 __u32 reserved[4];
00500 };
00501
00502
00503
00504
00505
00506 struct v4l2_input
00507 {
00508 __u32 index;
00509 __u8 name[32];
00510 __u32 type;
00511 __u32 audioset;
00512 __u32 tuner;
00513 v4l2_std_id std;
00514 __u32 status;
00515 __u32 reserved[4];
00516 };
00517
00518 #define V4L2_INPUT_TYPE_TUNER 1
00519 #define V4L2_INPUT_TYPE_CAMERA 2
00520
00521
00522 #define V4L2_IN_ST_NO_POWER 0x00000001
00523 #define V4L2_IN_ST_NO_SIGNAL 0x00000002
00524 #define V4L2_IN_ST_NO_COLOR 0x00000004
00525
00526
00527 #define V4L2_IN_ST_NO_H_LOCK 0x00000100
00528 #define V4L2_IN_ST_COLOR_KILL 0x00000200
00529
00530
00531 #define V4L2_IN_ST_NO_SYNC 0x00010000
00532 #define V4L2_IN_ST_NO_EQU 0x00020000
00533 #define V4L2_IN_ST_NO_CARRIER 0x00040000
00534
00535
00536 #define V4L2_IN_ST_MACROVISION 0x01000000
00537 #define V4L2_IN_ST_NO_ACCESS 0x02000000
00538 #define V4L2_IN_ST_VTR 0x04000000
00539
00540
00541
00542
00543 struct v4l2_output
00544 {
00545 __u32 index;
00546 __u8 name[32];
00547 __u32 type;
00548 __u32 audioset;
00549 __u32 modulator;
00550 v4l2_std_id std;
00551 __u32 reserved[4];
00552 };
00553
00554 #define V4L2_OUTPUT_TYPE_MODULATOR 1
00555 #define V4L2_OUTPUT_TYPE_ANALOG 2
00556 #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3
00557
00558
00559
00560
00561 struct v4l2_control
00562 {
00563 __u32 id;
00564 __s32 value;
00565 };
00566
00567
00568 struct v4l2_queryctrl
00569 {
00570 __u32 id;
00571 enum v4l2_ctrl_type type;
00572 __u8 name[32];
00573 __s32 minimum;
00574 __s32 maximum;
00575 __s32 step;
00576 __s32 default_value;
00577 __u32 flags;
00578 __u32 reserved[2];
00579 };
00580
00581
00582 struct v4l2_querymenu
00583 {
00584 __u32 id;
00585 __u32 index;
00586 __u8 name[32];
00587 __u32 reserved;
00588 };
00589
00590
00591 #define V4L2_CTRL_FLAG_DISABLED 0x0001
00592 #define V4L2_CTRL_FLAG_GRABBED 0x0002
00593
00594
00595 #define V4L2_CID_BASE 0x00980900
00596
00597 #define V4L2_CID_PRIVATE_BASE 0x08000000
00598
00599 #define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0)
00600 #define V4L2_CID_CONTRAST (V4L2_CID_BASE+1)
00601 #define V4L2_CID_SATURATION (V4L2_CID_BASE+2)
00602 #define V4L2_CID_HUE (V4L2_CID_BASE+3)
00603 #define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5)
00604 #define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6)
00605 #define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7)
00606 #define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8)
00607 #define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9)
00608 #define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10)
00609 #define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11)
00610 #define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12)
00611 #define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13)
00612 #define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14)
00613 #define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15)
00614 #define V4L2_CID_GAMMA (V4L2_CID_BASE+16)
00615 #define V4L2_CID_WHITENESS (V4L2_CID_GAMMA)
00616 #define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17)
00617 #define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18)
00618 #define V4L2_CID_GAIN (V4L2_CID_BASE+19)
00619 #define V4L2_CID_HFLIP (V4L2_CID_BASE+20)
00620 #define V4L2_CID_VFLIP (V4L2_CID_BASE+21)
00621 #define V4L2_CID_HCENTER (V4L2_CID_BASE+22)
00622 #define V4L2_CID_VCENTER (V4L2_CID_BASE+23)
00623 #define V4L2_CID_LASTP1 (V4L2_CID_BASE+24)
00624
00625
00626
00627
00628 struct v4l2_tuner
00629 {
00630 __u32 index;
00631 __u8 name[32];
00632 enum v4l2_tuner_type type;
00633 __u32 capability;
00634 __u32 rangelow;
00635 __u32 rangehigh;
00636 __u32 rxsubchans;
00637 __u32 audmode;
00638 __s32 signal;
00639 __s32 afc;
00640 __u32 reserved[4];
00641 };
00642
00643 struct v4l2_modulator
00644 {
00645 __u32 index;
00646 __u8 name[32];
00647 __u32 capability;
00648 __u32 rangelow;
00649 __u32 rangehigh;
00650 __u32 txsubchans;
00651 __u32 reserved[4];
00652 };
00653
00654
00655 #define V4L2_TUNER_CAP_LOW 0x0001
00656 #define V4L2_TUNER_CAP_NORM 0x0002
00657 #define V4L2_TUNER_CAP_STEREO 0x0010
00658 #define V4L2_TUNER_CAP_LANG2 0x0020
00659 #define V4L2_TUNER_CAP_SAP 0x0020
00660 #define V4L2_TUNER_CAP_LANG1 0x0040
00661
00662
00663 #define V4L2_TUNER_SUB_MONO 0x0001
00664 #define V4L2_TUNER_SUB_STEREO 0x0002
00665 #define V4L2_TUNER_SUB_LANG2 0x0004
00666 #define V4L2_TUNER_SUB_SAP 0x0004
00667 #define V4L2_TUNER_SUB_LANG1 0x0008
00668
00669
00670 #define V4L2_TUNER_MODE_MONO 0x0000
00671 #define V4L2_TUNER_MODE_STEREO 0x0001
00672 #define V4L2_TUNER_MODE_LANG2 0x0002
00673 #define V4L2_TUNER_MODE_SAP 0x0002
00674 #define V4L2_TUNER_MODE_LANG1 0x0003
00675
00676 struct v4l2_frequency
00677 {
00678 __u32 tuner;
00679 enum v4l2_tuner_type type;
00680 __u32 frequency;
00681 __u32 reserved[8];
00682 };
00683
00684
00685
00686
00687 struct v4l2_audio
00688 {
00689 __u32 index;
00690 __u8 name[32];
00691 __u32 capability;
00692 __u32 mode;
00693 __u32 reserved[2];
00694 };
00695
00696 #define V4L2_AUDCAP_STEREO 0x00001
00697 #define V4L2_AUDCAP_AVL 0x00002
00698
00699
00700 #define V4L2_AUDMODE_AVL 0x00001
00701
00702 struct v4l2_audioout
00703 {
00704 __u32 index;
00705 __u8 name[32];
00706 __u32 capability;
00707 __u32 mode;
00708 __u32 reserved[2];
00709 };
00710
00711
00712
00713
00714
00715
00716
00717 struct v4l2_vbi_format
00718 {
00719 __u32 sampling_rate;
00720 __u32 offset;
00721 __u32 samples_per_line;
00722 __u32 sample_format;
00723 __s32 start[2];
00724 __u32 count[2];
00725 __u32 flags;
00726 __u32 reserved[2];
00727 };
00728
00729
00730 #define V4L2_VBI_UNSYNC (1<< 0)
00731 #define V4L2_VBI_INTERLACED (1<< 1)
00732
00733
00734
00735
00736
00737
00738
00739
00740 struct v4l2_format
00741 {
00742 enum v4l2_buf_type type;
00743 union
00744 {
00745 struct v4l2_pix_format pix;
00746 struct v4l2_window win;
00747 struct v4l2_vbi_format vbi;
00748 __u8 raw_data[200];
00749 } fmt;
00750 };
00751
00752
00753
00754
00755 struct v4l2_streamparm
00756 {
00757 enum v4l2_buf_type type;
00758 union
00759 {
00760 struct v4l2_captureparm capture;
00761 struct v4l2_outputparm output;
00762 __u8 raw_data[200];
00763 } parm;
00764 };
00765
00766
00767
00768
00769
00770
00771
00772 #define VIDIOC_QUERYCAP _IOR ('V', 0, struct v4l2_capability)
00773 #define VIDIOC_RESERVED _IO ('V', 1)
00774 #define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc)
00775 #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format)
00776 #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format)
00777 #if 0
00778 #define VIDIOC_G_COMP _IOR ('V', 6, struct v4l2_compression)
00779 #define VIDIOC_S_COMP _IOW ('V', 7, struct v4l2_compression)
00780 #endif
00781 #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers)
00782 #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer)
00783 #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer)
00784 #define VIDIOC_S_FBUF _IOW ('V', 11, struct v4l2_framebuffer)
00785 #define VIDIOC_OVERLAY _IOWR ('V', 14, int)
00786 #define VIDIOC_QBUF _IOWR ('V', 15, struct v4l2_buffer)
00787 #define VIDIOC_DQBUF _IOWR ('V', 17, struct v4l2_buffer)
00788 #define VIDIOC_STREAMON _IOW ('V', 18, int)
00789 #define VIDIOC_STREAMOFF _IOW ('V', 19, int)
00790 #define VIDIOC_G_PARM _IOWR ('V', 21, struct v4l2_streamparm)
00791 #define VIDIOC_S_PARM _IOW ('V', 22, struct v4l2_streamparm)
00792 #define VIDIOC_G_STD _IOR ('V', 23, v4l2_std_id)
00793 #define VIDIOC_S_STD _IOW ('V', 24, v4l2_std_id)
00794 #define VIDIOC_ENUMSTD _IOWR ('V', 25, struct v4l2_standard)
00795 #define VIDIOC_ENUMINPUT _IOWR ('V', 26, struct v4l2_input)
00796 #define VIDIOC_G_CTRL _IOWR ('V', 27, struct v4l2_control)
00797 #define VIDIOC_S_CTRL _IOW ('V', 28, struct v4l2_control)
00798 #define VIDIOC_G_TUNER _IOWR ('V', 29, struct v4l2_tuner)
00799 #define VIDIOC_S_TUNER _IOW ('V', 30, struct v4l2_tuner)
00800 #define VIDIOC_G_AUDIO _IOWR ('V', 33, struct v4l2_audio)
00801 #define VIDIOC_S_AUDIO _IOW ('V', 34, struct v4l2_audio)
00802 #define VIDIOC_QUERYCTRL _IOWR ('V', 36, struct v4l2_queryctrl)
00803 #define VIDIOC_QUERYMENU _IOWR ('V', 37, struct v4l2_querymenu)
00804 #define VIDIOC_G_INPUT _IOR ('V', 38, int)
00805 #define VIDIOC_S_INPUT _IOWR ('V', 39, int)
00806 #define VIDIOC_G_OUTPUT _IOR ('V', 46, int)
00807 #define VIDIOC_S_OUTPUT _IOWR ('V', 47, int)
00808 #define VIDIOC_ENUMOUTPUT _IOWR ('V', 48, struct v4l2_output)
00809 #define VIDIOC_G_AUDOUT _IOWR ('V', 49, struct v4l2_audioout)
00810 #define VIDIOC_S_AUDOUT _IOW ('V', 50, struct v4l2_audioout)
00811 #define VIDIOC_G_MODULATOR _IOWR ('V', 54, struct v4l2_modulator)
00812 #define VIDIOC_S_MODULATOR _IOW ('V', 55, struct v4l2_modulator)
00813 #define VIDIOC_G_FREQUENCY _IOWR ('V', 56, struct v4l2_frequency)
00814 #define VIDIOC_S_FREQUENCY _IOW ('V', 57, struct v4l2_frequency)
00815 #define VIDIOC_CROPCAP _IOR ('V', 58, struct v4l2_cropcap)
00816 #define VIDIOC_G_CROP _IOWR ('V', 59, struct v4l2_crop)
00817 #define VIDIOC_S_CROP _IOW ('V', 60, struct v4l2_crop)
00818 #define VIDIOC_G_JPEGCOMP _IOR ('V', 61, struct v4l2_jpegcompression)
00819 #define VIDIOC_S_JPEGCOMP _IOW ('V', 62, struct v4l2_jpegcompression)
00820 #define VIDIOC_QUERYSTD _IOR ('V', 63, v4l2_std_id)
00821 #define VIDIOC_TRY_FMT _IOWR ('V', 64, struct v4l2_format)
00822
00823 #define BASE_VIDIOC_PRIVATE 192
00824
00825
00826 #ifdef __KERNEL__
00827
00828
00829
00830
00831
00832
00833 #include <linux/fs.h>
00834
00835
00836 extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs);
00837 extern int v4l2_video_std_construct(struct v4l2_standard *vs,
00838 int id, char *name);
00839
00840
00841 typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file,
00842 unsigned int cmd, void *arg);
00843 int v4l_compat_translate_ioctl(struct inode *inode, struct file *file,
00844 int cmd, void *arg, v4l2_kioctl driver_ioctl);
00845
00846
00847 extern char *v4l2_field_names[];
00848 extern char *v4l2_type_names[];
00849 extern char *v4l2_ioctl_names[];
00850
00851 #endif
00852 #endif
00853
00854
00855
00856
00857
00858