Developer World
Spresense SDK Library v3.2.0-ebc0364
video.h
Go to the documentation of this file.
1/****************************************************************************
2 * include/nuttx/video/video.h
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one or more
5 * contributor license agreements. See the NOTICE file distributed with
6 * this work for additional information regarding copyright ownership. The
7 * ASF licenses this file to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance with the
9 * License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 * License for the specific language governing permissions and limitations
17 * under the License.
18 *
19 * The definitions and prototypes in this file are created with reference to
20 * the FreeBSD V4L2 driver header at: https://github.com/freebsd/freebsd-src
21 * /sys/contrib/v4l/videodev2.h
22 *
23 ****************************************************************************/
28#ifndef __INCLUDE_NUTTX_VIDEO_VIDEO_H
29#define __INCLUDE_NUTTX_VIDEO_VIDEO_H
30
31/****************************************************************************
32 * Included Files
33 ****************************************************************************/
34#include <stdint.h>
35#include <sys/time.h>
36
37#include <nuttx/fs/ioctl.h>
39
40#ifdef __cplusplus
41extern "C"
42{
43#endif
44
49/****************************************************************************
50 * Pre-processor Definitions
51 ****************************************************************************/
52
65#define VIDIOC_QUERYCAP _VIDIOC(0x0000)
66
74#define VIDIOC_ENUM_FMT _VIDIOC(0x0002)
75
83#define VIDIOC_G_FMT _VIDIOC(0x0004)
84
92#define VIDIOC_S_FMT _VIDIOC(0x0005)
93
101#define VIDIOC_REQBUFS _VIDIOC(0x0008)
102
103/* Query the status of a buffer */
104
105#define VIDIOC_QUERYBUF _VIDIOC(0x0009)
106
107/* Get frame buffer overlay parameters */
108
109#define VIDIOC_G_FBUF _VIDIOC(0x000a)
110
111/* Set frame buffer overlay parameters */
112
113#define VIDIOC_S_FBUF _VIDIOC(0x000b)
114
115/* Start or stop video overlay */
116
117#define VIDIOC_OVERLAY _VIDIOC(0x000e)
118
126#define VIDIOC_QBUF _VIDIOC(0x000f)
127
128/* Export a buffer as a DMABUF file descriptor */
129
130#define VIDIOC_EXPBUF _VIDIOC(0x0010)
131
139#define VIDIOC_DQBUF _VIDIOC(0x0011)
140
148#define VIDIOC_STREAMON _VIDIOC(0x0012)
149
157#define VIDIOC_STREAMOFF _VIDIOC(0x0013)
158
166#define VIDIOC_G_PARM _VIDIOC(0x0015)
167
175#define VIDIOC_S_PARM _VIDIOC(0x0016)
176
177/* Query the video standard of the current input */
178
179#define VIDIOC_G_STD _VIDIOC(0x0017)
180
181/* Select the video standard of the current input */
182
183#define VIDIOC_S_STD _VIDIOC(0x0018)
184
185/* Enumerate supported video standards */
186
187#define VIDIOC_ENUMSTD _VIDIOC(0x0019)
188
189/* Enumerate video inputs */
190
191#define VIDIOC_ENUMINPUT _VIDIOC(0x001a)
192
201#define VIDIOC_G_CTRL _VIDIOC(0x001b)
202
211#define VIDIOC_S_CTRL _VIDIOC(0x001c)
212
220#define VIDIOC_QUERYCTRL _VIDIOC(0x0024)
221
229#define VIDIOC_QUERYMENU _VIDIOC(0x0025)
230
231/* Get video input */
232
233#define VIDIOC_G_INPUT _VIDIOC(0x0026)
234
235/* Set video input */
236
237#define VIDIOC_S_INPUT _VIDIOC(0x0027)
238
239/* Query video standard */
240
241#define VIDIOC_QUERYSTD _VIDIOC(0x003f)
242
250#define VIDIOC_TRY_FMT _VIDIOC(0x0040)
251
259#define VIDIOC_G_EXT_CTRLS _VIDIOC(0x0047)
260
268#define VIDIOC_S_EXT_CTRLS _VIDIOC(0x0048)
269
270/* Try control value
271 * Address pointing to struct #v4l2_ext_controls
272 */
273
274#define VIDIOC_TRY_EXT_CTRLS _VIDIOC(0x0049)
275
283#define VIDIOC_ENUM_FRAMESIZES _VIDIOC(0x004a)
284
292#define VIDIOC_ENUM_FRAMEINTERVALS _VIDIOC(0x004b)
293
301#define VIDIOC_G_SELECTION _VIDIOC(0x005e)
302
310#define VIDIOC_S_SELECTION _VIDIOC(0x005f)
311
319#define VIDIOC_QUERY_EXT_CTRL _VIDIOC(0x00c0)
320
328#define VIDIOC_CANCEL_DQBUF _VIDIOC(0x00c1)
329
337#define VIDIOC_DO_HALFPUSH _VIDIOC(0x00c2)
338
350#define VIDIOC_TAKEPICT_START _VIDIOC(0x00c3)
351
359#define VIDIOC_TAKEPICT_STOP _VIDIOC(0x00c4)
360
368#define V4SIOC_QUERY_EXT_CTRL_SCENE _VIDIOC(0x00c5)
369
377#define V4SIOC_QUERYMENU_SCENE _VIDIOC(0x00c6)
378
386#define V4SIOC_G_EXT_CTRLS_SCENE _VIDIOC(0x00c7)
387
395#define V4SIOC_S_EXT_CTRLS_SCENE _VIDIOC(0x00c8)
396
404#define VIDEO_HSIZE_QVGA (320)
405#define VIDEO_VSIZE_QVGA (240)
406#define VIDEO_HSIZE_VGA (640)
407#define VIDEO_VSIZE_VGA (480)
408#define VIDEO_HSIZE_QUADVGA (1280)
409#define VIDEO_VSIZE_QUADVGA (960)
410#define VIDEO_HSIZE_HD (1280)
411#define VIDEO_VSIZE_HD (720)
412#define VIDEO_HSIZE_FULLHD (1920)
413#define VIDEO_VSIZE_FULLHD (1080)
414#define VIDEO_HSIZE_5M (2560)
415#define VIDEO_VSIZE_5M (1920)
416#define VIDEO_HSIZE_3M (2048)
417#define VIDEO_VSIZE_3M (1536)
419/* Four-character-code (FOURCC) */
420
421#define v4l2_fourcc(a, b, c, d)\
422 ((uint32_t)(a) | ((uint32_t)(b) << 8) | \
423 ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24))
424#define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1 << 31))
425
426/* RGB formats */
427
428#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1')
429#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4')
430#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2')
431#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2')
432#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O')
433#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5')
434#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5')
435
438#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P')
439#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q')
440#define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5')
441#define V4L2_PIX_FMT_XRGB555X v4l2_fourcc_be('X', 'R', '1', '5')
442#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R')
443#define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H')
444#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3')
445#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3')
446#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4')
447#define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4')
448#define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4')
449#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4')
450#define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4')
451#define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4')
452
453/* Grey formats */
454
455#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y')
456#define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ')
457#define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ')
458#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ')
459#define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ')
460#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ')
461#define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ')
462
463/* Grey bit-packed formats */
464
465#define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B')
466
467/* Palette formats */
468
469#define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8')
470
471/* Chrominance formats */
472
473#define V4L2_PIX_FMT_UV8 v4l2_fourcc('U', 'V', '8', ' ')
474
475/* Luminance+Chrominance formats */
476
477#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V')
478#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V')
479#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U')
480
483#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y')
484
485#define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y')
486#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P')
487#define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4')
488#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O')
489#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P')
490#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4')
491#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4')
492#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2')
493#define V4L2_PIX_FMT_M420 v4l2_fourcc('M', '4', '2', '0')
494
495/* Two planes -- one Y, one Cr + Cb interleaved */
496
497#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2')
498#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1')
499#define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6')
500#define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1')
501#define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4')
502#define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2')
503
504/* Two non contiguous planes - one Y, one Cr + Cb interleaved */
505
506#define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2')
507#define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1')
508#define V4L2_PIX_FMT_NV16M v4l2_fourcc('N', 'M', '1', '6')
509#define V4L2_PIX_FMT_NV61M v4l2_fourcc('N', 'M', '6', '1')
510#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2')
511#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2')
512
513/* Three planes - Y Cb, Cr */
514
515#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9')
516#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9')
517#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P')
518#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2')
519#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2')
520#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P')
521
522/* Three non contiguous planes - Y, Cb, Cr */
523
524#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2')
525#define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'M', '2', '1')
526#define V4L2_PIX_FMT_YUV422M v4l2_fourcc('Y', 'M', '1', '6')
527#define V4L2_PIX_FMT_YVU422M v4l2_fourcc('Y', 'M', '6', '1')
528#define V4L2_PIX_FMT_YUV444M v4l2_fourcc('Y', 'M', '2', '4')
529#define V4L2_PIX_FMT_YVU444M v4l2_fourcc('Y', 'M', '4', '2')
530
531/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
532
533#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1')
534#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G')
535#define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G')
536#define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R', 'G', 'G', 'B')
537#define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0')
538#define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0')
539#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0')
540#define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0')
541
542/* 10bit raw bayer packed, 5 bytes for every 4 pixels */
543
544#define V4L2_PIX_FMT_SBGGR10P v4l2_fourcc('p', 'B', 'A', 'A')
545#define V4L2_PIX_FMT_SGBRG10P v4l2_fourcc('p', 'G', 'A', 'A')
546#define V4L2_PIX_FMT_SGRBG10P v4l2_fourcc('p', 'g', 'A', 'A')
547#define V4L2_PIX_FMT_SRGGB10P v4l2_fourcc('p', 'R', 'A', 'A')
548
549/* 10bit raw bayer a-law compressed to 8 bits */
550
551#define V4L2_PIX_FMT_SBGGR10ALAW8 v4l2_fourcc('a', 'B', 'A', '8')
552#define V4L2_PIX_FMT_SGBRG10ALAW8 v4l2_fourcc('a', 'G', 'A', '8')
553#define V4L2_PIX_FMT_SGRBG10ALAW8 v4l2_fourcc('a', 'g', 'A', '8')
554#define V4L2_PIX_FMT_SRGGB10ALAW8 v4l2_fourcc('a', 'R', 'A', '8')
555
556/* 10bit raw bayer DPCM compressed to 8 bits */
557
558#define V4L2_PIX_FMT_SBGGR10DPCM8 v4l2_fourcc('b', 'B', 'A', '8')
559#define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8')
560#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
561#define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('b', 'R', 'A', '8')
562#define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2')
563#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2')
564#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2')
565#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2')
566#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2')
567#define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6')
568#define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6')
569#define V4L2_PIX_FMT_SRGGB16 v4l2_fourcc('R', 'G', '1', '6')
570
571/* HSV formats */
572
573#define V4L2_PIX_FMT_HSV24 v4l2_fourcc('H', 'S', 'V', '3')
574#define V4L2_PIX_FMT_HSV32 v4l2_fourcc('H', 'S', 'V', '4')
575
576/* Compressed formats */
577
578#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G')
579
582#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G')
583#define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd')
584#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G')
585#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4')
586#define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1')
587#define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4')
588#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3')
589#define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1')
590#define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2')
591#define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M', 'P', 'G', '4')
592#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D')
593#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G')
594#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L')
595#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0')
596#define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0')
597
600#define V4L2_PIX_FMT_JPEG_WITH_SUBIMG v4l2_fourcc('J', 'S', 'U', 'B')
601
604#define V4L2_PIX_FMT_SUBIMG_UYVY v4l2_fourcc('S', 'Y', 'U', 'V')
605
608#define V4L2_PIX_FMT_SUBIMG_RGB565 v4l2_fourcc('S', 'R', 'G', 'B')
609
612#define V4L2_FMT_DSC_MAX (32)
613
616#define V4L2_CTRL_MAX_DIMS (4)
617
620#define V4L2_REQBUFS_COUNT_MAX CONFIG_VIDEO_REQBUFS_COUNT_MAX
621
624#define V4L2_BUF_FLAG_ERROR (0x0001)
625
626/* Values for v4l2_std_id */
627
628/* One bit for each */
629
630#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001)
631#define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002)
632#define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004)
633#define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008)
634#define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010)
635#define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020)
636#define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040)
637#define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080)
638
639#define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100)
640#define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200)
641#define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400)
642#define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800)
643
644#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) /* BTSC */
645#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) /* EIA-J */
646#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000)
647#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000) /* FM A2 */
648
649#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000)
650#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000)
651#define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000)
652#define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000)
653#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000)
654#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000)
655#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000)
656#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000)
657
658/* ATSC/HDTV */
659
660#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
661#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)
662
663/* Some macros to merge video standards in order to make live easier for the
664 * drivers and V4L2 applications
665 */
666
667/* "Common" NTSC/M - It should be noticed that V4L2_STD_NTSC_443 is
668 * Missing here.
669 */
670
671#define V4L2_STD_NTSC (V4L2_STD_NTSC_M | \
672 V4L2_STD_NTSC_M_JP | \
673 V4L2_STD_NTSC_M_KR)
674
675/* Secam macros */
676
677#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D | \
678 V4L2_STD_SECAM_K | \
679 V4L2_STD_SECAM_K1)
680
681/* All Secam Standards */
682
683#define V4L2_STD_SECAM (V4L2_STD_SECAM_B | \
684 V4L2_STD_SECAM_G | \
685 V4L2_STD_SECAM_H | \
686 V4L2_STD_SECAM_DK | \
687 V4L2_STD_SECAM_L | \
688 V4L2_STD_SECAM_LC)
689
690/* PAL macros */
691#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B | \
692 V4L2_STD_PAL_B1 | \
693 V4L2_STD_PAL_G)
694#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D | \
695 V4L2_STD_PAL_D1 | \
696 V4L2_STD_PAL_K)
697
698/* "Common" PAL - This macro is there to be compatible with the old
699 * V4L1 concept of "PAL": /BGDKHI.
700 * Several PAL standards are missing here: /M, /N and /Nc
701 */
702
703#define V4L2_STD_PAL (V4L2_STD_PAL_BG | \
704 V4L2_STD_PAL_DK | \
705 V4L2_STD_PAL_H | \
706 V4L2_STD_PAL_I)
707
708/* Chroma "agnostic" standards */
709
710#define V4L2_STD_B (V4L2_STD_PAL_B | \
711 V4L2_STD_PAL_B1 | \
712 V4L2_STD_SECAM_B)
713#define V4L2_STD_G (V4L2_STD_PAL_G | \
714 V4L2_STD_SECAM_G)
715#define V4L2_STD_H (V4L2_STD_PAL_H | \
716 V4L2_STD_SECAM_H)
717#define V4L2_STD_L (V4L2_STD_SECAM_L | \
718 V4L2_STD_SECAM_LC)
719#define V4L2_STD_GH (V4L2_STD_G | \
720 V4L2_STD_H)
721#define V4L2_STD_DK (V4L2_STD_PAL_DK | \
722 V4L2_STD_SECAM_DK)
723#define V4L2_STD_BG (V4L2_STD_B | \
724 V4L2_STD_G)
725#define V4L2_STD_MN (V4L2_STD_PAL_M | \
726 V4L2_STD_PAL_N | \
727 V4L2_STD_PAL_Nc | \
728 V4L2_STD_NTSC)
729
730/* Standards where MTS/BTSC stereo could be found */
731
732#define V4L2_STD_MTS (V4L2_STD_NTSC_M | \
733 V4L2_STD_PAL_M | \
734 V4L2_STD_PAL_N | \
735 V4L2_STD_PAL_Nc)
736
737/* Standards for Countries with 60Hz Line frequency */
738
739#define V4L2_STD_525_60 (V4L2_STD_PAL_M | \
740 V4L2_STD_PAL_60 | \
741 V4L2_STD_NTSC | \
742 V4L2_STD_NTSC_443)
743
744/* Standards for Countries with 50Hz Line frequency */
745
746#define V4L2_STD_625_50 (V4L2_STD_PAL | \
747 V4L2_STD_PAL_N | \
748 V4L2_STD_PAL_Nc | \
749 V4L2_STD_SECAM)
750#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB | \
751 V4L2_STD_ATSC_16_VSB)
752
753/* Macros with none and all analog standards */
754
755#define V4L2_STD_UNKNOWN 0
756#define V4L2_STD_ALL (V4L2_STD_525_60 | \
757 V4L2_STD_625_50)
760/****************************************************************************
761 * Public Types
762 ****************************************************************************/
763
775{
776 uint8_t driver[16];
777 uint8_t card[32];
778 uint8_t bus_info[32];
779 uint32_t version;
780 uint32_t capabilities;
781 uint32_t device_caps;
782};
783
784/* Values for 'capabilities' field */
785
786enum v4l2_capabilities
787{
788 V4L2_CAP_VIDEO_CAPTURE = 0x00000001, /* Is a video capture device */
789 V4L2_CAP_VIDEO_OUTPUT = 0x00000002, /* Is a video output device */
790 V4L2_CAP_VIDEO_OVERLAY = 0x00000004, /* Can do video overlay */
791 V4L2_CAP_VBI_CAPTURE = 0x00000010, /* Is a raw VBI capture device */
792 V4L2_CAP_VBI_OUTPUT = 0x00000020, /* Is a raw VBI output device */
793 V4L2_CAP_SLICED_VBI_CAPTURE = 0x00000040, /* Is a sliced VBI capture device */
794 V4L2_CAP_SLICED_VBI_OUTPUT = 0x00000080, /* Is a sliced VBI output device */
795 V4L2_CAP_RDS_CAPTURE = 0x00000100, /* RDS data capture */
796 V4L2_CAP_VIDEO_OUTPUT_OVERLAY = 0x00000200, /* Can do video output overlay */
797 V4L2_CAP_HW_FREQ_SEEK = 0x00000400, /* Can do hardware frequency seek */
798 V4L2_CAP_RDS_OUTPUT = 0x00000800, /* Is an RDS encoder */
799 V4L2_CAP_VIDEO_CAPTURE_MPLANE = 0x00001000, /* Is a video capture device that supports multiplanar formats */
800 V4L2_CAP_VIDEO_OUTPUT_MPLANE = 0x00002000, /* Is a video output device that supports multiplanar formats */
801 V4L2_CAP_VIDEO_M2M_MPLANE = 0x00004000, /* Is a video mem-to-mem device that supports multiplanar formats */
802 V4L2_CAP_VIDEO_M2M = 0x00008000, /* Is a video mem-to-mem device */
803 V4L2_CAP_TUNER = 0x00010000, /* Has a tuner */
804 V4L2_CAP_AUDIO = 0x00020000, /* Has audio support */
805 V4L2_CAP_RADIO = 0x00040000, /* Is a radio device */
806 V4L2_CAP_MODULATOR = 0x00080000, /* Has a modulator */
807 V4L2_CAP_SDR_CAPTURE = 0x00100000, /* Is a SDR capture device */
808 V4L2_CAP_EXT_PIX_FORMAT = 0x00200000, /* Supports the extended pixel format */
809 V4L2_CAP_SDR_OUTPUT = 0x00400000, /* Is a SDR output device */
810 V4L2_CAP_READWRITE = 0x01000000, /* Read/write systemcalls */
811 V4L2_CAP_ASYNCIO = 0x02000000, /* Async I/O */
812 V4L2_CAP_STREAMING = 0x04000000, /* Streaming I/O ioctls */
813 V4L2_CAP_TOUCH = 0x10000000, /* Is a touch device */
814 V4L2_CAP_DEVICE_CAPS = 0x80000000, /* Sets device capabilities field */
815};
816
820{
823 int32_t left;
824
827 int32_t top;
828
831 uint32_t width;
832
835 uint32_t height;
836};
837
841{
842 uint32_t numerator; /* Numerator */
843 uint32_t denominator; /* Denominator */
844};
845
852{
853 uint32_t type;
854 uint32_t target;
855 uint32_t flags;
856 struct v4l2_rect r;
857};
858
859typedef uint64_t v4l2_std_id;
860
862{
863 uint32_t index;
864 v4l2_std_id id;
865 uint8_t name[24];
866 struct v4l2_fract frameperiod; /* Frames, not fields */
867 uint32_t framelines;
868 uint32_t reserved[4];
869};
870
877{
894
898{
903};
904
908{
919};
920
924{
927};
928
935{
936 uint32_t count;
940 uint32_t type;
941 uint32_t memory;
942 uint32_t mode;
943};
944
946
948{
949 uint32_t type;
950 uint32_t flags;
951 uint8_t frames;
952 uint8_t seconds;
953 uint8_t minutes;
954 uint8_t hours;
955 uint8_t userbits[4];
956};
957
958typedef struct v4l2_timecode v4l2_timecode_t;
959
961{
962 uint32_t bytesused;
963 uint32_t length;
964 union
965 {
966 uint32_t mem_offset;
967 unsigned long userptr;
968 int fd;
969 } m;
970 uint32_t data_offset;
971 uint32_t reserved[11];
972};
973
974typedef struct v4l2_plane v4l2_plane_t;
975
984{
985 uint16_t index;
986 uint16_t type;
987 uint32_t bytesused;
988 uint16_t flags;
989 uint16_t field;
990 struct timeval timestamp;
992 uint16_t sequence;
993 uint16_t memory;
994 union
995 {
996 uint32_t offset;
997 unsigned long userptr;
998 struct v4l2_plane *planes;
999 int fd;
1000 } m;
1001 uint32_t length;
1002};
1003typedef struct v4l2_buffer v4l2_buffer_t;
1004
1011{
1012 uint16_t index;
1013 uint16_t type;
1014 uint32_t flags;
1016 uint32_t pixelformat;
1017};
1018
1019enum v4l2_fmt_flag
1020{
1021 V4L2_FMT_FLAG_COMPRESSED = 0x0001, /* This is a compressed format */
1022 V4L2_FMT_FLAG_EMULATED = 0x0002, /* This format is not native */
1023};
1024
1025enum v4l2_frmsizetypes
1026{
1027 V4L2_FRMSIZE_TYPE_DISCRETE = 1, /* Discrete value */
1028 V4L2_FRMSIZE_TYPE_CONTINUOUS = 2, /* Continuous value */
1029 V4L2_FRMSIZE_TYPE_STEPWISE = 3, /* Step value */
1030};
1031
1033{
1034 uint16_t width;
1035 uint16_t height;
1036};
1037
1039{
1040 uint16_t min_width;
1041 uint16_t max_width;
1042 uint16_t step_width;
1043 uint16_t min_height;
1044 uint16_t max_height;
1045 uint16_t step_height;
1046};
1047
1054{
1055 uint32_t index;
1056 uint32_t buf_type;
1057 uint32_t pixel_format;
1058 uint32_t type;
1064 union
1065 {
1073 };
1074};
1075
1079{
1083};
1084
1088{
1092};
1093
1100{
1101 uint32_t index;
1102 uint32_t buf_type;
1103 uint32_t pixel_format;
1104 uint16_t width;
1105 uint16_t height;
1106 uint32_t type;
1107 union
1108 {
1110 struct v4l2_frmival_stepwise stepwise;
1111 };
1112};
1113
1117{
1118 uint16_t width;
1119 uint16_t height;
1120 uint32_t pixelformat;
1121 uint32_t field;
1122 uint32_t bytesperline;
1123 uint32_t sizeimage;
1124 uint32_t colorspace;
1125 uint32_t priv;
1126 uint32_t flags;
1127 union
1128 {
1129 uint32_t ycbcr_enc;
1130 uint32_t hsv_enc;
1131 };
1132 uint32_t quantization;
1133 uint32_t xfer_func;
1134};
1135
1136typedef struct v4l2_pix_format v4l2_pix_format_t;
1137
1144{
1145 uint32_t type;
1146 union
1147 {
1149 } fmt;
1150};
1151
1152typedef struct v4l2_format v4l2_format_t;
1153
1155{
1156 uint32_t capability;
1157 uint32_t capturemode;
1159 uint32_t extendedmode;
1160 uint32_t readbuffers;
1161};
1162
1163/* Flags for 'capability' and 'capturemode' fields */
1164
1165enum v4l2_capture_mode
1166{
1167 V4L2_MODE_HIGHQUALITY = 0x0001, /* High quality imaging mode */
1168};
1169
1170enum v4l2_capture_capability
1171{
1172 V4L2_CAP_TIMEPERFRAME = 0x1000, /* timeperframe field is supported */
1173};
1174
1181{
1182 uint32_t type; /* enum v4l2_buf_type */
1183 union
1184 {
1185 struct v4l2_captureparm capture;
1186 } parm;
1187};
1188
1192{
1206 /* Compound types are >= 0x0100 */
1211};
1212
1213
1220{
1221 uint16_t ctrl_class;
1222 uint16_t id;
1223 uint16_t type;
1224 char name[32];
1225 int32_t minimum;
1226 int32_t maximum;
1227 uint32_t step;
1229 uint32_t flags; };
1230
1237{
1238 uint16_t ctrl_class;
1239 uint16_t id;
1240 uint16_t type;
1241 char name[32];
1242 int64_t minimum;
1243 int64_t maximum;
1244 uint64_t step;
1246 uint32_t flags;
1247 uint32_t elem_size;
1248 uint32_t elems;
1249 uint32_t nr_of_dims;
1251};
1252
1259{
1260 uint16_t ctrl_class;
1261 uint16_t id;
1262 uint32_t index;
1263 union
1264 {
1265 char name[32];
1266 int64_t value;
1267 };
1268};
1269
1271{
1272 uint32_t index; /* Which input */
1273 uint8_t name[32]; /* Label */
1274 uint32_t type; /* Type of input */
1275 uint32_t audioset; /* Associated audios (bitfield) */
1276 uint32_t tuner; /* enum v4l2_tuner_type */
1277 v4l2_std_id std;
1278 uint32_t status;
1279 uint32_t capabilities;
1280 uint32_t reserved[3];
1281};
1282
1283/* Values for the 'type' field */
1284
1285enum v4l2_input_type
1286{
1287 V4L2_INPUT_TYPE_TUNER = 1,
1288 V4L2_INPUT_TYPE_CAMERA = 2,
1289 V4L2_INPUT_TYPE_TOUCH = 3,
1290};
1291
1292enum v4l2_input_status
1293{
1294 /* Field 'status' - general */
1295
1296 V4L2_IN_ST_NO_POWER = 0x00000001, /* Attached device is off */
1297 V4L2_IN_ST_NO_SIGNAL = 0x00000002,
1298 V4L2_IN_ST_NO_COLOR = 0x00000004,
1299
1300 /* Field 'status' - sensor orientation */
1301
1302 /* If sensor is mounted upside down set both bits */
1303
1304 V4L2_IN_ST_HFLIP = 0x00000010, /* Frames are flipped horizontally */
1305 V4L2_IN_ST_VFLIP = 0x00000020, /* Frames are flipped vertically */
1306
1307 /* Field 'status' - analog */
1308
1309 V4L2_IN_ST_NO_H_LOCK = 0x00000100, /* No horizontal sync lock */
1310 V4L2_IN_ST_COLOR_KILL = 0x00000200, /* Color killer is active */
1311 V4L2_IN_ST_NO_V_LOCK = 0x00000400, /* No vertical sync lock */
1312 V4L2_IN_ST_NO_STD_LOCK = 0x00000800, /* No standard format lock */
1313
1314 /* Field 'status' - digital */
1315
1316 V4L2_IN_ST_NO_SYNC = 0x00010000, /* No synchronization lock */
1317 V4L2_IN_ST_NO_EQU = 0x00020000, /* No equalizer lock */
1318 V4L2_IN_ST_NO_CARRIER = 0x00040000, /* Carrier recovery failed */
1319
1320 /* Field 'status' - VCR and set-top box */
1321
1322 V4L2_IN_ST_MACROVISION = 0x01000000, /* Macrovision detected */
1323 V4L2_IN_ST_NO_ACCESS = 0x02000000, /* Conditional access denied */
1324 V4L2_IN_ST_VTR = 0x04000000, /* VTR time constant */
1325};
1326
1327/* Capabilities flags */
1328
1329enum v4l2_input_capabilities
1330{
1331 V4L2_IN_CAP_DV_TIMINGS = 0x00000002, /* Supports S_DV_TIMINGS */
1332 V4L2_IN_CAP_STD = 0x00000004, /* Supports S_STD */
1333 V4L2_IN_CAP_NATIVE_SIZE = 0x00000008, /* Supports setting native size */
1334};
1335
1336enum v4l2_input_capabilites_compat
1337{
1338 V4L2_IN_CAP_CUSTOM_TIMINGS = V4L2_IN_CAP_DV_TIMINGS, /* For compatibility */
1339};
1340
1342{
1343 uint32_t index; /* Which output */
1344 uint8_t name[32]; /* Label */
1345 uint32_t type; /* Type of output */
1346 uint32_t audioset; /* Associated audios (bitfield) */
1347 uint32_t modulator; /* Associated modulator */
1348 v4l2_std_id std;
1349 uint32_t capabilities;
1350 uint32_t reserved[3];
1351};
1352
1353/* Values for the 'type' field */
1354
1355enum v4l2_output_type
1356{
1357 V4L2_OUTPUT_TYPE_MODULATOR = 1,
1358 V4L2_OUTPUT_TYPE_ANALOG = 2,
1359 V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY = 3,
1360};
1361
1362/* Capabilities flags */
1363
1364enum v4l2_output_capabilities
1365{
1366 V4L2_OUT_CAP_DV_TIMINGS = 0x00000002, /* Supports S_DV_TIMINGS */
1367 V4L2_OUT_CAP_STD = 0x00000004, /* Supports S_STD */
1368 V4L2_OUT_CAP_NATIVE_SIZE = 0x00000008, /* Supports setting native size */
1369};
1370
1371enum v4l2_output_capabilites_compat
1372{
1373 V4L2_OUT_CAP_CUSTOM_TIMINGS = V4L2_OUT_CAP_DV_TIMINGS, /* For compatibility */
1374};
1375
1382{
1383 uint16_t id;
1384 int32_t value;
1385};
1386
1393{
1394 uint16_t id;
1395 uint16_t size;
1396 union
1397 {
1398 int32_t value;
1399 int64_t value64;
1400 char *string;
1401 uint8_t *p_u8;
1402 uint16_t *p_u16;
1403 uint32_t *p_u32;
1404 void *ptr;
1405 };
1406};
1407
1414{
1415 union
1416 {
1417 uint16_t ctrl_class;
1418 uint16_t which;
1419 };
1420 uint16_t count;
1421 uint16_t error_idx;
1423};
1424
1431{
1434};
1435
1442{
1445};
1446
1453{
1456};
1457
1460/****************************************************************************
1461 * Public Function Prototypes
1462 ****************************************************************************/
1463
1469struct imgdata_s;
1470struct imgsensor_s;
1471
1481int video_initialize(FAR const char *devpath);
1482
1490int video_uninitialize(FAR const char *devpath);
1491
1492/* New API to register video driver.
1493 *
1494 * param [in] devpath: path to video device
1495 * param [in] data: provide imgdata ops
1496 * param [in] sensor: provide imgsensor ops array
1497 * param [in] sensor_num: the number of imgsensor ops array
1498 *
1499 * Return on success, 0 is returned. On failure,
1500 * negative value is returned.
1501 */
1502
1503int video_register(FAR const char *devpath,
1504 FAR struct imgdata_s *data,
1505 FAR struct imgsensor_s **sensors,
1506 size_t sensor_num);
1507
1508/* New API to Unregister video driver.
1509 *
1510 * param [in] devpath: path to video device
1511 *
1512 * Return on success, 0 is returned. On failure,
1513 * negative value is returned.
1514 */
1515
1516int video_unregister(FAR const char *devpath);
1517
1522#ifdef __cplusplus
1523}
1524#endif
1525#endif /* __INCLUDE_NUTTX_VIDEO_VIDEO_H */
v4l2_scene_mode
Definition: video_controls.h:227
v4l2_buf_type
Definition: video.h:877
v4l2_field
Definition: video.h:908
v4l2_frmivaltypes
Definition: video.h:1079
v4l2_buf_mode
Definition: video.h:924
v4l2_memory
Definition: video.h:898
v4l2_ctrl_type
Definition: video.h:1192
@ V4L2_BUF_TYPE_VIDEO_CAPTURE
Definition: video.h:878
@ V4L2_BUF_TYPE_SLICED_VBI_CAPTURE
Definition: video.h:883
@ V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
Definition: video.h:887
@ V4L2_BUF_TYPE_VBI_OUTPUT
Definition: video.h:882
@ V4L2_BUF_TYPE_SDR_OUTPUT
Definition: video.h:889
@ V4L2_BUF_TYPE_SLICED_VBI_OUTPUT
Definition: video.h:884
@ V4L2_BUF_TYPE_VIDEO_OVERLAY
Definition: video.h:880
@ V4L2_BUF_TYPE_SDR_CAPTURE
Definition: video.h:888
@ V4L2_BUF_TYPE_STILL_CAPTURE
Definition: video.h:892
@ V4L2_BUF_TYPE_VBI_CAPTURE
Definition: video.h:881
@ V4L2_BUF_TYPE_VIDEO_OUTPUT
Definition: video.h:879
@ V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
Definition: video.h:886
@ V4L2_BUF_TYPE_META_CAPTURE
Definition: video.h:890
@ V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY
Definition: video.h:885
@ V4L2_BUF_TYPE_PRIVATE
Definition: video.h:891
@ V4L2_FIELD_INTERLACED_TB
Definition: video.h:917
@ V4L2_FIELD_INTERLACED
Definition: video.h:913
@ V4L2_FIELD_NONE
Definition: video.h:910
@ V4L2_FIELD_TOP
Definition: video.h:911
@ V4L2_FIELD_BOTTOM
Definition: video.h:912
@ V4L2_FIELD_ALTERNATE
Definition: video.h:916
@ V4L2_FIELD_ANY
Definition: video.h:909
@ V4L2_FIELD_SEQ_TB
Definition: video.h:914
@ V4L2_FIELD_SEQ_BT
Definition: video.h:915
@ V4L2_FIELD_INTERLACED_BT
Definition: video.h:918
@ V4L2_FRMIVAL_TYPE_DISCRETE
Definition: video.h:1080
@ V4L2_FRMIVAL_TYPE_CONTINUOUS
Definition: video.h:1081
@ V4L2_FRMIVAL_TYPE_STEPWISE
Definition: video.h:1082
@ V4L2_BUF_MODE_FIFO
Definition: video.h:926
@ V4L2_BUF_MODE_RING
Definition: video.h:925
@ V4L2_MEMORY_DMABUF
Definition: video.h:902
@ V4L2_MEMORY_USERPTR
Definition: video.h:900
@ V4L2_MEMORY_OVERLAY
Definition: video.h:901
@ V4L2_MEMORY_MMAP
Definition: video.h:899
@ V4L2_CTRL_TYPE_CTRL_CLASS
Definition: video.h:1198
@ V4L2_CTRL_TYPE_U32
Definition: video.h:1210
@ V4L2_CTRL_TYPE_STRING
Definition: video.h:1199
@ V4L2_CTRL_TYPE_INTEGER
Definition: video.h:1193
@ V4L2_CTRL_TYPE_BOOLEAN
Definition: video.h:1194
@ V4L2_CTRL_TYPE_U16FIXEDPOINT_Q8
Definition: video.h:1203
@ V4L2_CTRL_TYPE_U8FIXEDPOINT_Q7
Definition: video.h:1202
@ V4L2_CTRL_TYPE_INTEGER_TIMES_3
Definition: video.h:1204
@ V4L2_CTRL_TYPE_BUTTON
Definition: video.h:1196
@ V4L2_CTRL_COMPOUND_TYPES
Definition: video.h:1207
@ V4L2_CTRL_TYPE_INTEGER_MENU
Definition: video.h:1201
@ V4L2_CTRL_TYPE_U8
Definition: video.h:1208
@ V4L2_CTRL_TYPE_BITMASK
Definition: video.h:1200
@ V4L2_CTRL_TYPE_INTEGER64
Definition: video.h:1197
@ V4L2_CTRL_TYPE_U16
Definition: video.h:1209
@ V4L2_CTRL_TYPE_MENU
Definition: video.h:1195
#define V4L2_CTRL_MAX_DIMS
Definition: video.h:616
#define V4L2_FMT_DSC_MAX
Definition: video.h:612
int video_uninitialize(FAR const char *devpath)
int video_initialize(FAR const char *devpath)
Definition: imgdata.h:120
Definition: imgsensor.h:394
Parameter of ioctl(VIDIOC_QBUF) and ioctl(VIDIOC_DQBUF). Currently, support only index,...
Definition: video.h:984
struct timeval timestamp
Definition: video.h:990
uint16_t flags
Definition: video.h:988
struct v4l2_timecode timecode
Definition: video.h:991
unsigned long userptr
Definition: video.h:997
uint16_t field
Definition: video.h:989
uint16_t index
Definition: video.h:985
uint16_t sequence
Definition: video.h:992
uint16_t type
Definition: video.h:986
uint16_t memory
Definition: video.h:993
uint32_t bytesused
Definition: video.h:987
uint32_t length
Definition: video.h:1001
Definition: video.h:775
uint32_t capabilities
Definition: video.h:780
uint8_t bus_info[32]
Definition: video.h:778
uint8_t driver[16]
Definition: video.h:776
uint32_t version
Definition: video.h:779
uint8_t card[32]
Definition: video.h:777
uint32_t device_caps
Definition: video.h:781
Definition: video.h:1155
uint32_t readbuffers
Definition: video.h:1160
uint32_t extendedmode
Definition: video.h:1159
struct v4l2_fract timeperframe
Definition: video.h:1158
uint32_t capability
Definition: video.h:1156
uint32_t capturemode
Definition: video.h:1157
parameter of ioctl(VIDIOC_G_CTRL / VIDIOC_S_CTRL)
Definition: video.h:1382
Definition: video.h:1393
int32_t value
Definition: video.h:1398
uint16_t id
Definition: video.h:1394
int64_t value64
Definition: video.h:1399
uint8_t * p_u8
Definition: video.h:1401
uint16_t size
Definition: video.h:1395
uint32_t * p_u32
Definition: video.h:1403
uint16_t * p_u16
Definition: video.h:1402
parameter of ioctl(VIDIOC_G_EXT_CTRLS / VIDIOC_S_EXT_CTRLS)
Definition: video.h:1414
struct v4l2_ext_control * controls
Definition: video.h:1422
uint16_t error_idx
Definition: video.h:1421
uint16_t ctrl_class
Definition: video.h:1417
uint16_t count
Definition: video.h:1420
parameter of ioctl(VIDIOC_ENUM_FMT)
Definition: video.h:1011
uint32_t pixelformat
Definition: video.h:1016
uint16_t index
Definition: video.h:1012
uint16_t type
Definition: video.h:1013
char description[V4L2_FMT_DSC_MAX]
Definition: video.h:1015
parameter of ioctl(VIDIOC_S_FMT)
Definition: video.h:1144
struct v4l2_pix_format pix
Definition: video.h:1148
uint32_t type
Definition: video.h:1145
Definition: video.h:841
Definition: video.h:1088
struct v4l2_fract step
Definition: video.h:1091
struct v4l2_fract max
Definition: video.h:1090
struct v4l2_fract min
Definition: video.h:1089
parameter of ioctl(VIDIOC_ENUM_FRAMEINTERVALS)
Definition: video.h:1100
uint32_t buf_type
Definition: video.h:1102
uint32_t pixel_format
Definition: video.h:1103
uint16_t height
Definition: video.h:1105
struct v4l2_fract discrete
Definition: video.h:1109
uint32_t index
Definition: video.h:1101
uint16_t width
Definition: video.h:1104
uint32_t type
Definition: video.h:1106
Definition: video.h:1033
uint16_t height
Definition: video.h:1035
uint16_t width
Definition: video.h:1034
Definition: video.h:1039
uint16_t min_width
Definition: video.h:1040
uint16_t max_width
Definition: video.h:1041
uint16_t max_height
Definition: video.h:1044
uint16_t min_height
Definition: video.h:1043
uint16_t step_height
Definition: video.h:1045
uint16_t step_width
Definition: video.h:1042
parameter of ioctl(VIDIOC_ENUM_FRAMESIZES)
Definition: video.h:1054
struct v4l2_frmsize_stepwise stepwise
Definition: video.h:1069
uint32_t buf_type
Definition: video.h:1056
uint32_t pixel_format
Definition: video.h:1057
uint32_t index
Definition: video.h:1055
uint32_t type
Definition: video.h:1058
struct v4l2_frmsize_discrete discrete
Definition: video.h:1066
Definition: video.h:1271
Definition: video.h:1342
Definition: video.h:1117
uint32_t bytesperline
Definition: video.h:1122
uint32_t priv
Definition: video.h:1125
uint32_t pixelformat
Definition: video.h:1120
uint32_t sizeimage
Definition: video.h:1123
uint32_t hsv_enc
Definition: video.h:1130
uint32_t quantization
Definition: video.h:1132
uint32_t field
Definition: video.h:1121
uint32_t flags
Definition: video.h:1126
uint16_t height
Definition: video.h:1119
uint16_t width
Definition: video.h:1118
uint32_t xfer_func
Definition: video.h:1133
uint32_t colorspace
Definition: video.h:1124
uint32_t ycbcr_enc
Definition: video.h:1129
Definition: video.h:961
parameter of ioctl(VIDIOC_QUERY_EXT_CTRL)
Definition: video.h:1237
uint64_t step
Definition: video.h:1244
int64_t default_value
Definition: video.h:1245
uint16_t id
Definition: video.h:1239
uint32_t flags
Definition: video.h:1246
uint32_t elems
Definition: video.h:1248
int64_t maximum
Definition: video.h:1243
uint32_t elem_size
Definition: video.h:1247
uint16_t ctrl_class
Definition: video.h:1238
uint32_t nr_of_dims
Definition: video.h:1249
uint32_t dims[V4L2_CTRL_MAX_DIMS]
Definition: video.h:1250
char name[32]
Definition: video.h:1241
uint16_t type
Definition: video.h:1240
int64_t minimum
Definition: video.h:1242
parameter of ioctl(VIDIOC_QUERYCTRL)
Definition: video.h:1220
int32_t maximum
Definition: video.h:1226
uint16_t id
Definition: video.h:1222
uint32_t step
Definition: video.h:1227
uint32_t flags
Definition: video.h:1229
int32_t minimum
Definition: video.h:1225
uint16_t ctrl_class
Definition: video.h:1221
char name[32]
Definition: video.h:1224
uint16_t type
Definition: video.h:1223
int32_t default_value
Definition: video.h:1228
parameter of ioctl(VIDIOC_QUERYMENU)
Definition: video.h:1259
uint16_t id
Definition: video.h:1261
uint16_t ctrl_class
Definition: video.h:1260
uint32_t index
Definition: video.h:1262
char name[32]
Definition: video.h:1265
int64_t value
Definition: video.h:1266
Definition: video.h:820
uint32_t width
Definition: video.h:831
uint32_t height
Definition: video.h:835
int32_t left
Definition: video.h:823
int32_t top
Definition: video.h:827
parameter of ioctl(VIDIOC_REQBUFS)
Definition: video.h:935
uint32_t memory
Definition: video.h:941
uint32_t mode
Definition: video.h:942
uint32_t count
Definition: video.h:936
uint32_t type
Definition: video.h:940
Definition: video.h:852
struct v4l2_rect r
Definition: video.h:856
uint32_t type
Definition: video.h:853
Definition: video.h:862
parameter of ioctl(VIDIOC_S_PARM)
Definition: video.h:1181
Definition: video.h:948
parameter of ioctl(V4SIOC_S_EXT_CTRLS_SCENE / V4SIOC_G_EXT_CTRLS_SCENE)
Definition: video.h:1431
struct v4l2_ext_controls control
Definition: video.h:1433
enum v4l2_scene_mode mode
Definition: video.h:1432
parameter of ioctl(V4SIOC_QUERY_EXT_CTRL_SCENE)
Definition: video.h:1442
struct v4l2_query_ext_ctrl control
Definition: video.h:1444
enum v4l2_scene_mode mode
Definition: video.h:1443
parameter of ioctl(V4SIOC_QUERYMENU_SCENE)
Definition: video.h:1453
enum v4l2_scene_mode mode
Definition: video.h:1454
struct v4l2_querymenu menu
Definition: video.h:1455