V4L2结构体手册,某大厂开发者对于Android多线程的总结

***   To edit the content of this header, modify the corresponding

***   source file (e.g. under external/kernel-headers/original/) then

***   run bionic/libc/kernel/tools/update_all.py

***

***   Any manual change here will be lost the next time this script will

***   be run. You’ve been warned!

***

****************************************************************************

****************************************************************************/

#ifndef _UAPI__LINUX_VIDEODEV2_H

#define _UAPI__LINUX_VIDEODEV2_H

#include <sys/time.h>

#include <linux/compiler.h>

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

#include <linux/ioctl.h>

#include <linux/types.h>

#include <linux/v4l2-common.h>

#include <linux/v4l2-controls.h>

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

#define VIDEO_MAX_FRAME 32

#define VIDEO_MAX_PLANES 8

#define v4l2_fourcc(a,b,c,d) ((__u32) (a) | ((__u32) (b) << 8) | ((__u32) © << 16) | ((__u32) (d) << 24))

#define v4l2_fourcc_be(a,b,c,d) (v4l2_fourcc(a, b, c, d) | (1 << 31))

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

enum v4l2_field {

V4L2_FIELD_ANY = 0,

V4L2_FIELD_NONE = 1,

V4L2_FIELD_TOP = 2,

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

V4L2_FIELD_BOTTOM = 3,

V4L2_FIELD_INTERLACED = 4,

V4L2_FIELD_SEQ_TB = 5,

V4L2_FIELD_SEQ_BT = 6,

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

V4L2_FIELD_ALTERNATE = 7,

V4L2_FIELD_INTERLACED_TB = 8,

V4L2_FIELD_INTERLACED_BT = 9,

};

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

#define V4L2_FIELD_HAS_TOP(field) ((field) == V4L2_FIELD_TOP || (field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_INTERLACED_TB || (field) == V4L2_FIELD_INTERLACED_BT || (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT)

#define V4L2_FIELD_HAS_BOTTOM(field) ((field) == V4L2_FIELD_BOTTOM || (field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_INTERLACED_TB || (field) == V4L2_FIELD_INTERLACED_BT || (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT)

#define V4L2_FIELD_HAS_BOTH(field) ((field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_INTERLACED_TB || (field) == V4L2_FIELD_INTERLACED_BT || (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT)

#define V4L2_FIELD_HAS_T_OR_B(field) ((field) == V4L2_FIELD_BOTTOM || (field) == V4L2_FIELD_TOP || (field) == V4L2_FIELD_ALTERNATE)

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

enum v4l2_buf_type {

V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,

V4L2_BUF_TYPE_VIDEO_OUTPUT = 2,

V4L2_BUF_TYPE_VIDEO_OVERLAY = 3,

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

V4L2_BUF_TYPE_VBI_CAPTURE = 4,

V4L2_BUF_TYPE_VBI_OUTPUT = 5,

V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,

V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,

V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9,

V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10,

V4L2_BUF_TYPE_SDR_CAPTURE = 11,

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

V4L2_BUF_TYPE_PRIVATE = 0x80,

};

#define V4L2_TYPE_IS_MULTIPLANAR(type) ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)

#define V4L2_TYPE_IS_OUTPUT(type) ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY || (type) == V4L2_BUF_TYPE_VBI_OUTPUT || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT)

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

enum v4l2_tuner_type {

V4L2_TUNER_RADIO = 1,

V4L2_TUNER_ANALOG_TV = 2,

V4L2_TUNER_DIGITAL_TV = 3,

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

V4L2_TUNER_ADC = 4,

V4L2_TUNER_RF = 5,

};

enum v4l2_memory {

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

V4L2_MEMORY_MMAP = 1,

V4L2_MEMORY_USERPTR = 2,

V4L2_MEMORY_OVERLAY = 3,

V4L2_MEMORY_DMABUF = 4,

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

};

enum v4l2_colorspace {

V4L2_COLORSPACE_SMPTE170M = 1,

V4L2_COLORSPACE_SMPTE240M = 2,

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

V4L2_COLORSPACE_REC709 = 3,

V4L2_COLORSPACE_BT878 = 4,

V4L2_COLORSPACE_470_SYSTEM_M = 5,

V4L2_COLORSPACE_470_SYSTEM_BG = 6,

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

V4L2_COLORSPACE_JPEG = 7,

V4L2_COLORSPACE_SRGB = 8,

};

enum v4l2_priority {

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

V4L2_PRIORITY_UNSET = 0,

V4L2_PRIORITY_BACKGROUND = 1,

V4L2_PRIORITY_INTERACTIVE = 2,

V4L2_PRIORITY_RECORD = 3,

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE,

};

struct v4l2_rect {

__s32 left;

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

__s32 top;

__u32 width;

__u32 height;

};

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

struct v4l2_fract {

__u32 numerator;

__u32 denominator;

};

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

struct v4l2_capability {

__u8 driver[16];

__u8 card[32];

__u8 bus_info[32];

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

__u32 version;

__u32 capabilities;

__u32 device_caps;

__u32 reserved[3];

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

};

#define V4L2_CAP_VIDEO_CAPTURE 0x00000001

#define V4L2_CAP_VIDEO_OUTPUT 0x00000002

#define V4L2_CAP_VIDEO_OVERLAY 0x00000004

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

#define V4L2_CAP_VBI_CAPTURE 0x00000010

#define V4L2_CAP_VBI_OUTPUT 0x00000020

#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040

#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

#define V4L2_CAP_RDS_CAPTURE 0x00000100

#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200

#define V4L2_CAP_HW_FREQ_SEEK 0x00000400

#define V4L2_CAP_RDS_OUTPUT 0x00000800

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

#define V4L2_CAP_VIDEO_CAPTURE_MPLANE 0x00001000

#define V4L2_CAP_VIDEO_OUTPUT_MPLANE 0x00002000

#define V4L2_CAP_VIDEO_M2M_MPLANE 0x00004000

#define V4L2_CAP_VIDEO_M2M 0x00008000

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

#define V4L2_CAP_TUNER 0x00010000

#define V4L2_CAP_AUDIO 0x00020000

#define V4L2_CAP_RADIO 0x00040000

#define V4L2_CAP_MODULATOR 0x00080000

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

#define V4L2_CAP_SDR_CAPTURE 0x00100000

#define V4L2_CAP_EXT_PIX_FORMAT 0x00200000

#define V4L2_CAP_READWRITE 0x01000000

#define V4L2_CAP_ASYNCIO 0x02000000

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

#define V4L2_CAP_STREAMING 0x04000000

#define V4L2_CAP_DEVICE_CAPS 0x80000000

struct v4l2_pix_format {

__u32 width;

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

__u32 height;

__u32 pixelformat;

__u32 field;

__u32 bytesperline;

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

__u32 sizeimage;

__u32 colorspace;

__u32 priv;

__u32 flags;

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

};

#define V4L2_PIX_FMT_RGB332 v4l2_fourcc(‘R’, ‘G’, ‘B’, ‘1’)

#define V4L2_PIX_FMT_RGB444 v4l2_fourcc(‘R’, ‘4’, ‘4’, ‘4’)

#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc(‘A’, ‘R’, ‘1’, ‘2’)

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc(‘X’, ‘R’, ‘1’, ‘2’)

#define V4L2_PIX_FMT_RGB555 v4l2_fourcc(‘R’, ‘G’, ‘B’, ‘O’)

#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc(‘A’, ‘R’, ‘1’, ‘5’)

#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc(‘X’, ‘R’, ‘1’, ‘5’)

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

#define V4L2_PIX_FMT_RGB565 v4l2_fourcc(‘R’, ‘G’, ‘B’, ‘P’)

#define V4L2_PIX_FMT_RGB555X v4l2_fourcc(‘R’, ‘G’, ‘B’, ‘Q’)

#define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be(‘A’, ‘R’, ‘1’, ‘5’)

#define V4L2_PIX_FMT_XRGB555X v4l2_fourcc_be(‘X’, ‘R’, ‘1’, ‘5’)

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */<

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值