00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __LINUX_VIDEODEV_H
00010 #define __LINUX_VIDEODEV_H
00011
00012
00013 #define V4L2_MAJOR_VERSION 0
00014 #define V4L2_MINOR_VERSION 20
00015 #include "videodevfix.h"
00016
00017
00018
00019
00020
00021
00022 #define fourcc(a,b,c,d)\
00023 (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24))
00024
00025
00026 #define O_NONCAP O_TRUNC
00027 #define O_NOIO O_TRUNC
00028
00029
00030
00031 #ifndef STAMP_T
00032 #define STAMP_T
00033 typedef __s64 stamp_t;
00034 #endif
00035
00036
00037
00038
00039 struct v4l2_capability
00040 {
00041 char name[32];
00042 int type;
00043 int inputs;
00044 int outputs;
00045 int audios;
00046 int maxwidth;
00047 int maxheight;
00048 int minwidth;
00049 int minheight;
00050 int maxframerate;
00051 __u32 flags;
00052 __u32 reserved[4];
00053 };
00054
00055 #define V4L2_TYPE_CAPTURE 0
00056 #define V4L2_TYPE_CODEC 1
00057 #define V4L2_TYPE_OUTPUT 2
00058 #define V4L2_TYPE_FX 3
00059 #define V4L2_TYPE_VBI 4
00060 #define V4L2_TYPE_VTR 5
00061 #define V4L2_TYPE_VTX 6
00062 #define V4L2_TYPE_RADIO 7
00063 #define V4L2_TYPE_PRIVATE 1000
00064
00065 #define V4L2_FLAG_READ 0x00001
00066 #define V4L2_FLAG_WRITE 0x00002
00067 #define V4L2_FLAG_STREAMING 0x00004
00068 #define V4L2_FLAG_PREVIEW 0x00008
00069 #define V4L2_FLAG_SELECT 0x00010
00070 #define V4L2_FLAG_TUNER 0x00020
00071 #define V4L2_FLAG_MONOCHROME 0x00040
00072 #define V4L2_FLAG_DATA_SERVICE 0x00080
00073
00074
00075
00076
00077
00078 struct v4l2_pix_format
00079 {
00080 __u32 width;
00081 __u32 height;
00082 __u32 depth;
00083 __u32 pixelformat;
00084 __u32 flags;
00085 __u32 bytesperline;
00086 __u32 sizeimage;
00087 __u32 priv;
00088 };
00089
00090 #define V4L2_PIX_FMT_RGB332 fourcc('R','G','B','1')
00091 #define V4L2_PIX_FMT_RGB555 fourcc('R','G','B','O')
00092 #define V4L2_PIX_FMT_RGB565 fourcc('R','G','B','P')
00093 #define V4L2_PIX_FMT_BGR24 fourcc('B','G','R','3')
00094 #define V4L2_PIX_FMT_RGB24 fourcc('R','G','B','3')
00095 #define V4L2_PIX_FMT_BGR32 fourcc('B','G','R','4')
00096 #define V4L2_PIX_FMT_RGB32 fourcc('R','G','B','4')
00097 #define V4L2_PIX_FMT_GREY fourcc('G','R','E','Y')
00098 #define V4L2_PIX_FMT_YVU410 fourcc('Y','V','U','9')
00099 #define V4L2_PIX_FMT_YVU420 fourcc('Y','V','1','2')
00100 #define V4L2_PIX_FMT_YUYV fourcc('Y','U','Y','V')
00101 #define V4L2_PIX_FMT_UYVY fourcc('U','Y','V','Y')
00102 #define V4L2_PIX_FMT_YVU422P fourcc('4','2','2','P')
00103 #define V4L2_PIX_FMT_YVU411P fourcc('4','1','1','P')
00104
00105
00106 #define V4L2_PIX_FMT_YUV410 fourcc('Y','U','V','9')
00107 #define V4L2_PIX_FMT_YUV420 fourcc('Y','U','1','2')
00108 #define V4L2_PIX_FMT_YYUV fourcc('Y','Y','U','V')
00109 #define V4L2_PIX_FMT_HI240 fourcc('H','I','2','4')
00110
00111
00112
00113 #define V4L2_FMT_FLAG_COMPRESSED 0x0001
00114 #define V4L2_FMT_FLAG_BYTESPERLINE 0x0002
00115 #define V4L2_FMT_FLAG_INTERLACED 0x0004
00116 #define V4L2_FMT_FLAG_TOPFIELD 0x0008
00117 #define V4L2_FMT_FLAG_BOTFIELD 0x0010
00118 #define V4L2_FMT_FLAG_ODDFIELD V4L2_FMT_FLAG_TOPFIELD
00119 #define V4L2_FMT_FLAG_EVENFIELD V4L2_FMT_FLAG_BOTFIELD
00120 #define V4L2_FMT_FLAG_COMBINED V4L2_FMT_FLAG_INTERLACED
00121 #define V4L2_FMT_CS_field 0xF000
00122 #define V4L2_FMT_CS_601YUV 0x1000
00123 #define V4L2_FMT_FLAG_SWCONVERSION 0x0800
00124
00125
00126
00127
00128
00129
00130
00131 struct v4l2_fmtdesc
00132 {
00133 int index;
00134 char description[32];
00135 __u32 pixelformat;
00136 __u32 flags;
00137 __u32 depth;
00138 __u32 reserved[2];
00139 };
00140
00141 struct v4l2_cvtdesc
00142 {
00143 int index;
00144 struct
00145 {
00146 __u32 pixelformat;
00147 __u32 flags;
00148 __u32 depth;
00149 __u32 reserved[2];
00150 } in, out;
00151 };
00152
00153 struct v4l2_fxdesc
00154 {
00155 int index;
00156 char name[32];
00157 __u32 flags;
00158 __u32 inputs;
00159 __u32 controls;
00160 __u32 reserved[2];
00161 };
00162
00163
00164
00165
00166
00167 struct v4l2_timecode
00168 {
00169 __u8 frames;
00170 __u8 seconds;
00171 __u8 minutes;
00172 __u8 hours;
00173 __u8 userbits[4];
00174 __u32 flags;
00175 __u32 type;
00176 };
00177
00178 #define V4L2_TC_TYPE_24FPS 1
00179 #define V4L2_TC_TYPE_25FPS 2
00180 #define V4L2_TC_TYPE_30FPS 3
00181 #define V4L2_TC_TYPE_50FPS 4
00182 #define V4L2_TC_TYPE_60FPS 5
00183
00184
00185
00186 #define V4L2_TC_FLAG_DROPFRAME 0x0001
00187 #define V4L2_TC_FLAG_COLORFRAME 0x0002
00188 #define V4L2_TC_USERBITS_field 0x000C
00189 #define V4L2_TC_USERBITS_USERDEFINED 0x0000
00190 #define V4L2_TC_USERBITS_8BITCHARS 0x0008
00191
00192
00193
00194
00195
00196
00197 struct v4l2_compression
00198 {
00199 int quality;
00200 int keyframerate;
00201 int pframerate;
00202 __u32 reserved[5];
00203 };
00204
00205
00206
00207
00208
00209 struct v4l2_requestbuffers
00210 {
00211 int count;
00212 __u32 type;
00213 __u32 reserved[2];
00214 };
00215 struct v4l2_buffer
00216 {
00217 int index;
00218 __u32 type;
00219 __u32 offset;
00220 __u32 length;
00221 __u32 bytesused;
00222 __u32 flags;
00223 stamp_t timestamp;
00224 struct v4l2_timecode timecode;
00225 __u32 sequence;
00226 __u32 reserved[3];
00227 };
00228
00229 #define V4L2_BUF_TYPE_field 0x00001FFF
00230 #define V4L2_BUF_TYPE_CAPTURE 0x00000001
00231 #define V4L2_BUF_TYPE_CODECIN 0x00000002
00232 #define V4L2_BUF_TYPE_CODECOUT 0x00000003
00233 #define V4L2_BUF_TYPE_EFFECTSIN 0x00000004
00234 #define V4L2_BUF_TYPE_EFFECTSIN2 0x00000005
00235 #define V4L2_BUF_TYPE_EFFECTSOUT 0x00000006
00236 #define V4L2_BUF_TYPE_VIDEOOUT 0x00000007
00237 #define V4L2_BUF_TYPE_FXCONTROL 0x00000008
00238
00239
00240 #define V4L2_BUF_TYPE_PRIVATE 0x00001000
00241
00242 #define V4L2_BUF_ATTR_DEVICEMEM 0x00010000
00243
00244
00245 #define V4L2_BUF_REQ_field 0xF0000000
00246 #define V4L2_BUF_REQ_CONTIG 0x10000000
00247
00248
00249
00250
00251 #define V4L2_BUF_FLAG_MAPPED 0x0001
00252 #define V4L2_BUF_FLAG_QUEUED 0x0002
00253 #define V4L2_BUF_FLAG_DONE 0x0004
00254 #define V4L2_BUF_FLAG_KEYFRAME 0x0008
00255 #define V4L2_BUF_FLAG_PFRAME 0x0010
00256 #define V4L2_BUF_FLAG_BFRAME 0x0020
00257 #define V4L2_BUF_FLAG_TOPFIELD 0x0040
00258 #define V4L2_BUF_FLAG_BOTFIELD 0x0080
00259 #define V4L2_BUF_FLAG_ODDFIELD V4L2_BUF_FLAG_TOPFIELD
00260 #define V4L2_BUF_FLAG_EVENFIELD V4L2_BUF_FLAG_BOTFIELD
00261 #define V4L2_BUF_FLAG_TIMECODE 0x0100
00262
00263
00264
00265
00266 struct v4l2_framebuffer
00267 {
00268 __u32 capability;
00269 __u32 flags;
00270 void *base[3];
00271 struct v4l2_pix_format fmt;
00272 };
00273
00274 #define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001
00275 #define V4L2_FBUF_CAP_CHROMAKEY 0x0002
00276 #define V4L2_FBUF_CAP_CLIPPING 0x0004
00277 #define V4L2_FBUF_CAP_SCALEUP 0x0008
00278 #define V4L2_FBUF_CAP_SCALEDOWN 0x0010
00279 #define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0020
00280
00281 #define V4L2_FBUF_FLAG_PRIMARY 0x0001
00282 #define V4L2_FBUF_FLAG_OVERLAY 0x0002
00283 #define V4L2_FBUF_FLAG_CHROMAKEY 0x0004
00284
00285 struct v4l2_clip
00286 {
00287 int x;
00288 int y;
00289 int width;
00290 int height;
00291 struct v4l2_clip *next;
00292 };
00293 struct v4l2_window
00294 {
00295 int x;
00296 int y;
00297 int width;
00298 int height;
00299 __u32 chromakey;
00300 struct v4l2_clip *clips;
00301 int clipcount;
00302 void *bitmap;
00303 };
00304
00305
00306
00307
00308
00309 struct v4l2_performance
00310 {
00311 int frames;
00312 int framesdropped;
00313 __u64 bytesin;
00314 __u64 bytesout;
00315 __u32 reserved[4];
00316 };
00317
00318
00319
00320
00321 struct v4l2_captureparm
00322 {
00323 __u32 capability;
00324 __u32 capturemode;
00325 unsigned long timeperframe;
00326 __u32 extendedmode;
00327 __u32 reserved[4];
00328 };
00329
00330 #define V4L2_MODE_HIGHQUALITY 0x0001
00331
00332
00333 #define V4L2_CAP_TIMEPERFRAME 0x1000
00334
00335 struct v4l2_outputparm
00336 {
00337 __u32 capability;
00338 __u32 outputmode;
00339 unsigned long timeperframe;
00340 __u32 extendedmode;
00341 __u32 reserved[4];
00342 };
00343
00344
00345
00346
00347 struct v4l2_cropcap
00348 {
00349 __u32 capability;
00350 int min_x;
00351 int min_y;
00352 int max_x;
00353 int max_y;
00354 int default_left;
00355 int default_top;
00356 int default_right;
00357 int default_bottom;
00358 __u32 reserved[2];
00359 };
00360 struct v4l2_crop
00361 {
00362 int left;
00363 int top;
00364 int right;
00365 int bottom;
00366 __u32 reserved;
00367 };
00368
00369
00370
00371
00372 struct v4l2_zoomcap
00373 {
00374 __u32 capability;
00375 __u32 maxwidth;
00376 __u32 maxheight;
00377 __u32 minwidth;
00378 __u32 minheight;
00379 __u32 reserved[2];
00380 };
00381
00382 #define V4L2_ZOOM_NONCAP 0x0001
00383 #define V4L2_ZOOM_WHILESTREAMING 0x0002
00384
00385 struct v4l2_zoom
00386 {
00387 __u32 x;
00388 __u32 y;
00389 __u32 width;
00390 __u32 height;
00391 __u32 reserved;
00392 };
00393
00394
00395
00396
00397
00398 struct v4l2_standard
00399 {
00400 __u8 name[24];
00401 struct {
00402 __u32 numerator;
00403 __u32 denominator;
00404 } framerate;
00405 __u32 framelines;
00406 __u32 reserved1;
00407 __u32 colorstandard;
00408 union {
00409 struct {
00410 __u32 colorsubcarrier;
00411 } pal;
00412 struct {
00413 __u32 colorsubcarrier;
00414 } ntsc;
00415 struct {
00416 __u32 f0b;
00417 __u32 f0r;
00418 } secam;
00419 __u8 reserved[12];
00420 } colorstandard_data;
00421 __u32 transmission;
00422
00423 __u32 reserved2;
00424 };
00425
00426
00427 #define V4L2_COLOR_STD_PAL 1
00428 #define V4L2_COLOR_STD_NTSC 2
00429 #define V4L2_COLOR_STD_SECAM 3
00430
00431
00432 #define V4L2_COLOR_SUBC_PAL 4433619
00433 #define V4L2_COLOR_SUBC_PAL_M 3575611
00434 #define V4L2_COLOR_SUBC_PAL_N 3582056
00435 #define V4L2_COLOR_SUBC_NTSC 3579545
00436 #define V4L2_COLOR_SUBC_SECAMB 4250000
00437 #define V4L2_COLOR_SUBC_SECAMR 4406250
00438
00439
00440 #define V4L2_TRANSM_STD_B (1<<1)
00441 #define V4L2_TRANSM_STD_D (1<<3)
00442 #define V4L2_TRANSM_STD_G (1<<6)
00443 #define V4L2_TRANSM_STD_H (1<<7)
00444 #define V4L2_TRANSM_STD_I (1<<8)
00445 #define V4L2_TRANSM_STD_K (1<<10)
00446 #define V4L2_TRANSM_STD_K1 (1<<11)
00447 #define V4L2_TRANSM_STD_L (1<<12)
00448 #define V4L2_TRANSM_STD_M (1<<13)
00449 #define V4L2_TRANSM_STD_N (1<<14)
00450
00451
00452
00453 struct v4l2_enumstd
00454 {
00455 int index;
00456 struct v4l2_standard std;
00457 __u32 inputs;
00458
00459 __u32 outputs;
00460
00461 __u32 reserved[2];
00462 };
00463
00464
00465
00466
00467
00468 struct v4l2_input
00469 {
00470 int index;
00471 char name[32];
00472 int type;
00473 __u32 capability;
00474 int assoc_audio;
00475 __u32 reserved[4];
00476 };
00477
00478 #define V4L2_INPUT_TYPE_TUNER 1
00479 #define V4L2_INPUT_TYPE_CAMERA 2
00480
00481
00482 #define V4L2_INPUT_CAP_AUDIO 0x0001
00483
00484
00485
00486
00487
00488 struct v4l2_output
00489 {
00490 int index;
00491 char name[32];
00492 int type;
00493 __u32 capability;
00494 int assoc_audio;
00495 __u32 reserved[4];
00496 };
00497
00498 #define V4L2_OUTPUT_TYPE_MODULATOR 1
00499 #define V4L2_OUTPUT_TYPE_ANALOG 2
00500 #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3
00501
00502
00503 #define V4L2_OUTPUT_CAP_AUDIO 0x0001
00504
00505
00506
00507
00508
00509 struct v4l2_control
00510 {
00511 __u32 id;
00512 int value;
00513 };
00514
00515
00516 struct v4l2_queryctrl
00517 {
00518 __u32 id;
00519 __u8 name[32];
00520 int minimum;
00521 int maximum;
00522 unsigned int step;
00523 int default_value;
00524 __u32 type;
00525 __u32 flags;
00526 __u32 category;
00527 __u8 group[32];
00528 __u32 reserved[2];
00529 };
00530
00531
00532 struct v4l2_querymenu
00533 {
00534 __u32 id;
00535 int index;
00536 __u8 name[32];
00537 int reserved;
00538 };
00539
00540
00541 struct v4l2_fxcontrol
00542 {
00543 __u32 id;
00544 __u32 value;
00545 };
00546
00547
00548 #define V4L2_CTRL_TYPE_INTEGER 0
00549 #define V4L2_CTRL_TYPE_BOOLEAN 1
00550 #define V4L2_CTRL_TYPE_MENU 2
00551 #define V4L2_CTRL_TYPE_BUTTON 3
00552
00553
00554 #define V4L2_CTRL_FLAG_DISABLED 0x0001
00555 #define V4L2_CTRL_FLAG_GRABBED 0x0002
00556
00557
00558 #define V4L2_CTRL_CAT_VIDEO 1
00559 #define V4L2_CTRL_CAT_AUDIO 2
00560 #define V4L2_CTRL_CAT_EFFECT 3
00561
00562
00563 #define V4L2_CID_BASE 0x00980900
00564
00565 #define V4L2_CID_PRIVATE_BASE 0x08000000
00566
00567 #define V4L2_CID_EFFECT_BASE 0x0A00B000
00568
00569 #define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0)
00570 #define V4L2_CID_CONTRAST (V4L2_CID_BASE+1)
00571 #define V4L2_CID_SATURATION (V4L2_CID_BASE+2)
00572 #define V4L2_CID_HUE (V4L2_CID_BASE+3)
00573 #define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5)
00574 #define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6)
00575 #define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7)
00576 #define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8)
00577 #define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9)
00578 #define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10)
00579 #define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11)
00580 #define V4l2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12)
00581 #define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13)
00582 #define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14)
00583 #define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15)
00584 #define V4L2_CID_GAMMA (V4L2_CID_BASE+16)
00585 #define V4L2_CID_WHITENESS (V4L2_CID_GAMMA)
00586 #define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17)
00587 #define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18)
00588 #define V4L2_CID_GAIN (V4L2_CID_BASE+19)
00589 #define V4L2_CID_HFLIP (V4L2_CID_BASE+20)
00590 #define V4L2_CID_VFLIP (V4L2_CID_BASE+21)
00591 #define V4L2_CID_HCENTER (V4L2_CID_BASE+22)
00592 #define V4L2_CID_VCENTER (V4l2_CID_BASE+23)
00593 #define V4L2_CID_LASTP1 (V4L2_CID_BASE+24)
00594
00595
00596
00597
00598
00599 struct v4l2_tuner
00600 {
00601 int input;
00602 char name[32];
00603 struct v4l2_standard std;
00604 __u32 capability;
00605 __u32 rangelow;
00606 __u32 rangehigh;
00607 __u32 rxsubchans;
00608 __u32 audmode;
00609 int signal;
00610 int afc;
00611 __u32 reserved[4];
00612 };
00613 struct v4l2_modulator
00614 {
00615 int output;
00616 char name[32];
00617 struct v4l2_standard std;
00618 __u32 capability;
00619 __u32 rangelow;
00620 __u32 rangehigh;
00621 __u32 txsubchans;
00622 __u32 reserved[4];
00623 };
00624
00625 #define V4L2_TUNER_CAP_LOW 0x0001
00626 #define V4L2_TUNER_CAP_NORM 0x0002
00627 #define V4L2_TUNER_CAP_STEREO 0x0010
00628 #define V4L2_TUNER_CAP_LANG2 0x0020
00629 #define V4L2_TUNER_CAP_SAP 0x0020
00630 #define V4L2_TUNER_CAP_LANG1 0x0040
00631
00632
00633 #define V4L2_TUNER_SUB_MONO 0x0001
00634 #define V4L2_TUNER_SUB_STEREO 0x0002
00635 #define V4L2_TUNER_SUB_LANG2 0x0004
00636 #define V4L2_TUNER_SUB_SAP 0x0004
00637 #define V4L2_TUNER_SUB_LANG1 0x0008
00638
00639
00640 #define V4L2_TUNER_MODE_MONO 0x0000
00641 #define V4L2_TUNER_MODE_STEREO 0x0001
00642 #define V4L2_TUNER_MODE_LANG2 0x0002
00643 #define V4L2_TUNER_MODE_SAP 0x0002
00644 #define V4L2_TUNER_MODE_LANG1 0x0003
00645
00646 struct v4l2_frequency
00647 {
00648 int port;
00649 __u32 frequency;
00650 __u32 reserved[2];
00651 };
00652
00653
00654
00655
00656 struct v4l2_audio
00657 {
00658 int audio;
00659 char name[32];
00660 __u32 capability;
00661 __u32 mode;
00662 __u32 reserved[2];
00663 };
00664
00665 #define V4L2_AUDCAP_EFFECTS 0x0020
00666 #define V4L2_AUDCAP_LOUDNESS 0x0040
00667 #define V4L2_AUDCAP_AVL 0x0080
00668
00669
00670 #define V4L2_AUDMODE_LOUDNESS 0x00002
00671 #define V4L2_AUDMODE_AVL 0x00004
00672 #define V4L2_AUDMODE_STEREO_field 0x0FF00
00673 #define V4L2_AUDMODE_STEREO_LINEAR 0x00100
00674 #define V4L2_AUDMODE_STEREO_PSEUDO 0x00200
00675 #define V4L2_AUDMODE_STEREO_SPATIAL30 0x00300
00676 #define V4L2_AUDMODE_STEREO_SPATIAL50 0x00400
00677
00678 struct v4l2_audioout
00679 {
00680 int audio;
00681 char name[32];
00682 __u32 capability;
00683 __u32 mode;
00684 __u32 reserved[2];
00685 };
00686
00687
00688
00689
00690
00691 struct v4l2_vbi_format
00692 {
00693 __u32 sampling_rate;
00694 __u32 reserved1;
00695 __u32 samples_per_line;
00696 __u32 sample_format;
00697 __s32 start[2];
00698 __u32 count[2];
00699 __u32 flags;
00700 __u32 reserved2;
00701 };
00702
00703
00704 #define V4L2_VBI_SF_UBYTE 1
00705
00706
00707 #define V4L2_VBI_UNSYNC (1<< 0)
00708 #define V4L2_VBI_INTERLACED (1<< 1)
00709
00710
00711
00712
00713
00714
00715
00716
00717 struct v4l2_format
00718 {
00719 __u32 type;
00720 union
00721 {
00722 struct v4l2_pix_format pix;
00723 struct v4l2_vbi_format vbi;
00724
00725 __u8 raw_data[200];
00726 } fmt;
00727 };
00728
00729
00730
00731
00732 struct v4l2_streamparm
00733 {
00734 __u32 type;
00735 union
00736 {
00737 struct v4l2_captureparm capture;
00738 struct v4l2_outputparm output;
00739
00740 __u8 raw_data[200];
00741 } parm;
00742 };
00743
00744
00745
00746
00747
00748
00749
00750 #define VIDIOC_QUERYCAP _IOR ('V', 0, struct v4l2_capability)
00751 #define VIDIOC_RESERVED _IO ('V', 1)
00752 #define VIDIOC_ENUM_PIXFMT _IOWR ('V', 2, struct v4l2_fmtdesc)
00753 #define VIDIOC_ENUM_FBUFFMT _IOWR ('V', 3, struct v4l2_fmtdesc)
00754 #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format)
00755 #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format)
00756 #define VIDIOC_G_COMP _IOR ('V', 6, struct v4l2_compression)
00757 #define VIDIOC_S_COMP _IOW ('V', 7, struct v4l2_compression)
00758 #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers)
00759 #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer)
00760 #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer)
00761 #define VIDIOC_S_FBUF _IOW ('V', 11, struct v4l2_framebuffer)
00762 #define VIDIOC_G_WIN _IOR ('V', 12, struct v4l2_window)
00763 #define VIDIOC_S_WIN _IOW ('V', 13, struct v4l2_window)
00764 #define VIDIOC_PREVIEW _IOWR ('V', 14, int)
00765 #define VIDIOC_QBUF _IOWR ('V', 15, struct v4l2_buffer)
00766 #define VIDIOC_DQBUF _IOWR ('V', 17, struct v4l2_buffer)
00767 #define VIDIOC_STREAMON _IOW ('V', 18, int)
00768 #define VIDIOC_STREAMOFF _IOW ('V', 19, int)
00769 #define VIDIOC_G_PERF _IOR ('V', 20, struct v4l2_performance)
00770 #define VIDIOC_G_PARM _IOWR ('V', 21, struct v4l2_streamparm)
00771 #define VIDIOC_S_PARM _IOW ('V', 22, struct v4l2_streamparm)
00772 #define VIDIOC_G_STD _IOR ('V', 23, struct v4l2_standard)
00773 #define VIDIOC_S_STD _IOW ('V', 24, struct v4l2_standard)
00774 #define VIDIOC_ENUMSTD _IOWR ('V', 25, struct v4l2_enumstd)
00775 #define VIDIOC_ENUMINPUT _IOWR ('V', 26, struct v4l2_input)
00776 #define VIDIOC_G_CTRL _IOWR ('V', 27, struct v4l2_control)
00777 #define VIDIOC_S_CTRL _IOW ('V', 28, struct v4l2_control)
00778 #define VIDIOC_G_TUNER _IOWR ('V', 29, struct v4l2_tuner)
00779 #define VIDIOC_S_TUNER _IOW ('V', 30, struct v4l2_tuner)
00780 #define VIDIOC_G_FREQ _IOR ('V', 31, int)
00781 #define VIDIOC_S_FREQ _IOWR ('V', 32, int)
00782 #define VIDIOC_G_AUDIO _IOWR ('V', 33, struct v4l2_audio)
00783 #define VIDIOC_S_AUDIO _IOW ('V', 34, struct v4l2_audio)
00784 #define VIDIOC_QUERYCTRL _IOWR ('V', 36, struct v4l2_queryctrl)
00785 #define VIDIOC_QUERYMENU _IOWR ('V', 37, struct v4l2_querymenu)
00786 #define VIDIOC_G_INPUT _IOR ('V', 38, int)
00787 #define VIDIOC_S_INPUT _IOWR ('V', 39, int)
00788 #define VIDIOC_ENUMCVT _IOWR ('V', 40, struct v4l2_cvtdesc)
00789 #define VIDIOC_G_OUTPUT _IOR ('V', 46, int)
00790 #define VIDIOC_S_OUTPUT _IOWR ('V', 47, int)
00791 #define VIDIOC_ENUMOUTPUT _IOWR ('V', 48, struct v4l2_output)
00792 #define VIDIOC_G_AUDOUT _IOWR ('V', 49, struct v4l2_audioout)
00793 #define VIDIOC_S_AUDOUT _IOW ('V', 50, struct v4l2_audioout)
00794 #define VIDIOC_ENUMFX _IOWR ('V', 51, struct v4l2_fxdesc)
00795 #define VIDIOC_G_EFFECT _IOR ('V', 52, int)
00796 #define VIDIOC_S_EFFECT _IOWR ('V', 53, int)
00797 #define VIDIOC_G_MODULATOR _IOWR ('V', 54, struct v4l2_modulator)
00798 #define VIDIOC_S_MODULATOR _IOW ('V', 55, struct v4l2_modulator)
00799
00800 #define VIDIOC_ENUM_CAPFMT VIDIOC_ENUM_PIXFMT
00801 #define VIDIOC_ENUM_OUTFMT VIDIOC_ENUM_PIXFMT
00802 #define VIDIOC_ENUM_SRCFMT VIDIOC_ENUM_PIXFMT
00803 #define VIDIOC_ENUMFMT VIDIOC_ENUM_PIXFMT
00804
00805 #define BASE_VIDIOC_PRIVATE 192
00806
00807
00808 #ifdef __KERNEL__
00809
00810
00811
00812
00813 extern int videodev_init(void);
00814
00815
00816
00817
00818
00819
00820
00821
00822 extern void v4l2_version(int *major, int *minor);
00823 extern int v4l2_major_number(void);
00824
00825
00826 extern unsigned long v4l2_vmalloc_to_bus(void *virt);
00827 extern unsigned long v4l2_vmalloc_to_page(void *virt);
00828
00829
00830 struct v4l2_q_node
00831 {
00832 struct v4l2_q_node *forw, *back;
00833 };
00834 struct v4l2_queue
00835 {
00836 struct v4l2_q_node *forw, *back;
00837 rwlock_t qlock;
00838 };
00839 extern void v4l2_q_init(struct v4l2_queue *q);
00840 extern void v4l2_q_add_head(struct v4l2_queue *q, struct v4l2_q_node *node);
00841 extern void v4l2_q_add_tail(struct v4l2_queue *q, struct v4l2_q_node *node);
00842 extern void *v4l2_q_del_head(struct v4l2_queue *q);
00843 extern void *v4l2_q_del_tail(struct v4l2_queue *q);
00844 extern void *v4l2_q_peek_head(struct v4l2_queue *q);
00845 extern void *v4l2_q_peek_tail(struct v4l2_queue *q);
00846 extern void *v4l2_q_yank_node(struct v4l2_queue *q, struct v4l2_q_node *node);
00847
00848
00849 extern u32 v4l2_math_div6432(u64 a, u32 d, u32 *r);
00850
00851
00852 extern unsigned long v4l2_timestamp_divide(stamp_t t,
00853 unsigned long p_100ns);
00854 extern unsigned long v4l2_timestamp_correct(stamp_t *t,
00855 unsigned long p_100ns);
00856
00857
00858 struct v4l2_clock
00859 {
00860 void (*gettime)(stamp_t *);
00861 };
00862 extern int v4l2_masterclock_register(struct v4l2_clock *clock);
00863 extern void v4l2_masterclock_unregister(