⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 videodev2.h

📁 V4l driver for DVB HD
💻 H
📖 第 1 页 / 共 3 页
字号:
struct v4l2_bitrate {	/* rates are specified in kbit/sec */	enum v4l2_bitrate_mode	mode;	__u32			min;	__u32			target;  /* use this one for CBR */	__u32			max;};enum v4l2_mpeg_streamtype {	V4L2_MPEG_SS_1,		/* MPEG-1 system stream */	V4L2_MPEG_PS_2,		/* MPEG-2 program stream */	V4L2_MPEG_TS_2,		/* MPEG-2 transport stream */	V4L2_MPEG_PS_DVD,      	/* MPEG-2 program stream with DVD header fixups */};enum v4l2_mpeg_audiotype {	V4L2_MPEG_AU_2_I,	/* MPEG-2 layer 1 */	V4L2_MPEG_AU_2_II,	/* MPEG-2 layer 2 */	V4L2_MPEG_AU_2_III,	/* MPEG-2 layer 3 */	V4L2_MPEG_AC3,		/* AC3 */	V4L2_MPEG_LPCM,		/* LPCM */};enum v4l2_mpeg_videotype {	V4L2_MPEG_VI_1,		/* MPEG-1 */	V4L2_MPEG_VI_2,		/* MPEG-2 */};enum v4l2_mpeg_aspectratio {	V4L2_MPEG_ASPECT_SQUARE = 1,   /* square pixel */	V4L2_MPEG_ASPECT_4_3    = 2,   /*  4 : 3       */	V4L2_MPEG_ASPECT_16_9   = 3,   /* 16 : 9       */	V4L2_MPEG_ASPECT_1_221  = 4,   /*  1 : 2,21    */};struct v4l2_mpeg_compression {	/* general */	enum v4l2_mpeg_streamtype	st_type;	struct v4l2_bitrate		st_bitrate;	/* transport streams */	__u16				ts_pid_pmt;	__u16				ts_pid_audio;	__u16				ts_pid_video;	__u16				ts_pid_pcr;	/* program stream */	__u16				ps_size;	__u16				reserved_1;    /* align */	/* audio */	enum v4l2_mpeg_audiotype	au_type;	struct v4l2_bitrate		au_bitrate;	__u32				au_sample_rate;	__u8                            au_pesid;	__u8                            reserved_2[3]; /* align */	/* video */	enum v4l2_mpeg_videotype	vi_type;	enum v4l2_mpeg_aspectratio	vi_aspect_ratio;	struct v4l2_bitrate		vi_bitrate;	__u32				vi_frame_rate;	__u16				vi_frames_per_gop;	__u16				vi_bframes_count;	__u8                            vi_pesid;	__u8                            reserved_3[3]; /* align */	/* misc flags */	__u32                           closed_gops:1;	__u32                           pulldown:1;	__u32                           reserved_4:30; /* align */	/* I don't expect the above being perfect yet ;) */	__u32				reserved_5[8];};#endifstruct v4l2_jpegcompression{	int quality;	int  APPn;              /* Number of APP segment to be written,				 * must be 0..15 */	int  APP_len;           /* Length of data in JPEG APPn segment */	char APP_data[60];      /* Data in the JPEG APPn segment. */	int  COM_len;           /* Length of data in JPEG COM segment */	char COM_data[60];      /* Data in JPEG COM segment */	__u32 jpeg_markers;     /* Which markers should go into the JPEG				 * output. Unless you exactly know what				 * you do, leave them untouched.				 * Inluding less markers will make the				 * resulting code smaller, but there will				 * be fewer aplications which can read it.				 * The presence of the APP and COM marker				 * is influenced by APP_len and COM_len				 * ONLY, not by this property! */#define V4L2_JPEG_MARKER_DHT (1<<3)    /* Define Huffman Tables */#define V4L2_JPEG_MARKER_DQT (1<<4)    /* Define Quantization Tables */#define V4L2_JPEG_MARKER_DRI (1<<5)    /* Define Restart Interval */#define V4L2_JPEG_MARKER_COM (1<<6)    /* Comment segment */#define V4L2_JPEG_MARKER_APP (1<<7)    /* App segment, driver will					* allways use APP0 */};/* *	M E M O R Y - M A P P I N G   B U F F E R S */struct v4l2_requestbuffers{	__u32			count;	enum v4l2_buf_type      type;	enum v4l2_memory        memory;	__u32			reserved[2];};struct v4l2_buffer{	__u32			index;	enum v4l2_buf_type      type;	__u32			bytesused;	__u32			flags;	enum v4l2_field		field;	struct timeval		timestamp;	struct v4l2_timecode	timecode;	__u32			sequence;	/* memory location */	enum v4l2_memory        memory;	union {		__u32           offset;		unsigned long   userptr;	} m;	__u32			length;	__u32			input;	__u32			reserved;};/*  Flags for 'flags' field */#define V4L2_BUF_FLAG_MAPPED	0x0001  /* Buffer is mapped (flag) */#define V4L2_BUF_FLAG_QUEUED	0x0002	/* Buffer is queued for processing */#define V4L2_BUF_FLAG_DONE	0x0004	/* Buffer is ready */#define V4L2_BUF_FLAG_KEYFRAME	0x0008	/* Image is a keyframe (I-frame) */#define V4L2_BUF_FLAG_PFRAME	0x0010	/* Image is a P-frame */#define V4L2_BUF_FLAG_BFRAME	0x0020	/* Image is a B-frame */#define V4L2_BUF_FLAG_TIMECODE	0x0100	/* timecode field is valid */#define V4L2_BUF_FLAG_INPUT     0x0200  /* input field is valid *//* *	O V E R L A Y   P R E V I E W */struct v4l2_framebuffer{	__u32			capability;	__u32			flags;/* FIXME: in theory we should pass something like PCI device + memory * region + offset instead of some physical address */	void*                   base;	struct v4l2_pix_format	fmt;};/*  Flags for the 'capability' field. Read only */#define V4L2_FBUF_CAP_EXTERNOVERLAY	0x0001#define V4L2_FBUF_CAP_CHROMAKEY		0x0002#define V4L2_FBUF_CAP_LIST_CLIPPING     0x0004#define V4L2_FBUF_CAP_BITMAP_CLIPPING	0x0008/*  Flags for the 'flags' field. */#define V4L2_FBUF_FLAG_PRIMARY		0x0001#define V4L2_FBUF_FLAG_OVERLAY		0x0002#define V4L2_FBUF_FLAG_CHROMAKEY	0x0004struct v4l2_clip{	struct v4l2_rect        c;	struct v4l2_clip	__user *next;};struct v4l2_window{	struct v4l2_rect        w;	enum v4l2_field  	field;	__u32			chromakey;	struct v4l2_clip	__user *clips;	__u32			clipcount;	void			__user *bitmap;};/* *	C A P T U R E   P A R A M E T E R S */struct v4l2_captureparm{	__u32		   capability;	  /*  Supported modes */	__u32		   capturemode;	  /*  Current mode */	struct v4l2_fract  timeperframe;  /*  Time per frame in .1us units */	__u32		   extendedmode;  /*  Driver-specific extensions */	__u32              readbuffers;   /*  # of buffers for read */	__u32		   reserved[4];};/*  Flags for 'capability' and 'capturemode' fields */#define V4L2_MODE_HIGHQUALITY	0x0001	/*  High quality imaging mode */#define V4L2_CAP_TIMEPERFRAME	0x1000	/*  timeperframe field is supported */struct v4l2_outputparm{	__u32		   capability;	 /*  Supported modes */	__u32		   outputmode;	 /*  Current mode */	struct v4l2_fract  timeperframe; /*  Time per frame in seconds */	__u32		   extendedmode; /*  Driver-specific extensions */	__u32              writebuffers; /*  # of buffers for write */	__u32		   reserved[4];};/* *	I N P U T   I M A G E   C R O P P I N G */struct v4l2_cropcap {	enum v4l2_buf_type      type;	struct v4l2_rect        bounds;	struct v4l2_rect        defrect;	struct v4l2_fract       pixelaspect;};struct v4l2_crop {	enum v4l2_buf_type      type;	struct v4l2_rect        c;};/* *      A N A L O G   V I D E O   S T A N D A R D */typedef __u64 v4l2_std_id;/* one bit for each */#define V4L2_STD_PAL_B          ((v4l2_std_id)0x00000001)#define V4L2_STD_PAL_B1         ((v4l2_std_id)0x00000002)#define V4L2_STD_PAL_G          ((v4l2_std_id)0x00000004)#define V4L2_STD_PAL_H          ((v4l2_std_id)0x00000008)#define V4L2_STD_PAL_I          ((v4l2_std_id)0x00000010)#define V4L2_STD_PAL_D          ((v4l2_std_id)0x00000020)#define V4L2_STD_PAL_D1         ((v4l2_std_id)0x00000040)#define V4L2_STD_PAL_K          ((v4l2_std_id)0x00000080)#define V4L2_STD_PAL_M          ((v4l2_std_id)0x00000100)#define V4L2_STD_PAL_N          ((v4l2_std_id)0x00000200)#define V4L2_STD_PAL_Nc         ((v4l2_std_id)0x00000400)#define V4L2_STD_PAL_60         ((v4l2_std_id)0x00000800)#define V4L2_STD_NTSC_M         ((v4l2_std_id)0x00001000)#define V4L2_STD_NTSC_M_JP      ((v4l2_std_id)0x00002000)#define V4L2_STD_NTSC_443       ((v4l2_std_id)0x00004000)#define V4L2_STD_NTSC_M_KR      ((v4l2_std_id)0x00008000)#define V4L2_STD_SECAM_B        ((v4l2_std_id)0x00010000)#define V4L2_STD_SECAM_D        ((v4l2_std_id)0x00020000)#define V4L2_STD_SECAM_G        ((v4l2_std_id)0x00040000)#define V4L2_STD_SECAM_H        ((v4l2_std_id)0x00080000)#define V4L2_STD_SECAM_K        ((v4l2_std_id)0x00100000)#define V4L2_STD_SECAM_K1       ((v4l2_std_id)0x00200000)#define V4L2_STD_SECAM_L        ((v4l2_std_id)0x00400000)#define V4L2_STD_SECAM_LC       ((v4l2_std_id)0x00800000)/* ATSC/HDTV */#define V4L2_STD_ATSC_8_VSB     ((v4l2_std_id)0x01000000)#define V4L2_STD_ATSC_16_VSB    ((v4l2_std_id)0x02000000)/* some merged standards */#define V4L2_STD_MN	(V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC)#define V4L2_STD_B	(V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B)#define V4L2_STD_GH	(V4L2_STD_PAL_G|V4L2_STD_PAL_H|V4L2_STD_SECAM_G|V4L2_STD_SECAM_H)#define V4L2_STD_DK	(V4L2_STD_PAL_DK|V4L2_STD_SECAM_DK)/* some common needed stuff */#define V4L2_STD_PAL_BG		(V4L2_STD_PAL_B		|\				 V4L2_STD_PAL_B1	|\				 V4L2_STD_PAL_G)#define V4L2_STD_PAL_DK		(V4L2_STD_PAL_D		|\				 V4L2_STD_PAL_D1	|\				 V4L2_STD_PAL_K)#define V4L2_STD_PAL		(V4L2_STD_PAL_BG	|\				 V4L2_STD_PAL_DK	|\				 V4L2_STD_PAL_H		|\				 V4L2_STD_PAL_I)#define V4L2_STD_NTSC           (V4L2_STD_NTSC_M	|\				 V4L2_STD_NTSC_M_JP     |\				 V4L2_STD_NTSC_M_KR)#define V4L2_STD_SECAM_DK      	(V4L2_STD_SECAM_D	|\				 V4L2_STD_SECAM_K	|\				 V4L2_STD_SECAM_K1)#define V4L2_STD_SECAM		(V4L2_STD_SECAM_B	|\				 V4L2_STD_SECAM_G	|\				 V4L2_STD_SECAM_H	|\				 V4L2_STD_SECAM_DK	|\				 V4L2_STD_SECAM_L       |\				 V4L2_STD_SECAM_LC)#define V4L2_STD_525_60		(V4L2_STD_PAL_M		|\				 V4L2_STD_PAL_60	|\				 V4L2_STD_NTSC		|\				 V4L2_STD_NTSC_443)#define V4L2_STD_625_50		(V4L2_STD_PAL		|\				 V4L2_STD_PAL_N		|\				 V4L2_STD_PAL_Nc	|\				 V4L2_STD_SECAM)#define V4L2_STD_ATSC           (V4L2_STD_ATSC_8_VSB    |\				 V4L2_STD_ATSC_16_VSB)#define V4L2_STD_UNKNOWN        0#define V4L2_STD_ALL            (V4L2_STD_525_60	|\				 V4L2_STD_625_50)struct v4l2_standard{	__u32		     index;	v4l2_std_id          id;	__u8		     name[24];	struct v4l2_fract    frameperiod; /* Frames, not fields */	__u32		     framelines;	__u32		     reserved[4];};/* *	V I D E O   I N P U T S */struct v4l2_input{	__u32	     index;		/*  Which input */	__u8	     name[32];		/*  Label */	__u32	     type;		/*  Type of input */	__u32	     audioset;		/*  Associated audios (bitfield) */	__u32        tuner;             /*  Associated tuner */	v4l2_std_id  std;	__u32	     status;	__u32	     reserved[4];};/*  Values for the 'type' field */#define V4L2_INPUT_TYPE_TUNER		1#define V4L2_INPUT_TYPE_CAMERA		2/* field 'status' - general */#define V4L2_IN_ST_NO_POWER    0x00000001  /* Attached device is off */#define V4L2_IN_ST_NO_SIGNAL   0x00000002#define V4L2_IN_ST_NO_COLOR    0x00000004/* field 'status' - analog */#define V4L2_IN_ST_NO_H_LOCK   0x00000100  /* No horizontal sync lock */#define V4L2_IN_ST_COLOR_KILL  0x00000200  /* Color killer is active *//* field 'status' - digital */#define V4L2_IN_ST_NO_SYNC     0x00010000  /* No synchronization lock */#define V4L2_IN_ST_NO_EQU      0x00020000  /* No equalizer lock */#define V4L2_IN_ST_NO_CARRIER  0x00040000  /* Carrier recovery failed *//* field 'status' - VCR and set-top box */#define V4L2_IN_ST_MACROVISION 0x01000000  /* Macrovision detected */#define V4L2_IN_ST_NO_ACCESS   0x02000000  /* Conditional access denied */#define V4L2_IN_ST_VTR         0x04000000  /* VTR time constant *//* *	V I D E O   O U T P U T S */struct v4l2_output{	__u32	     index;		/*  Which output */	__u8	     name[32];		/*  Label */	__u32	     type;		/*  Type of output */	__u32	     audioset;		/*  Associated audios (bitfield) */	__u32	     modulator;         /*  Associated modulator */	v4l2_std_id  std;	__u32	     reserved[4];};/*  Values for the 'type' field */#define V4L2_OUTPUT_TYPE_MODULATOR		1#define V4L2_OUTPUT_TYPE_ANALOG			2#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY	3/* *	C O N T R O L S */struct v4l2_control{	__u32		     id;	__s32		     value;};/*  Used in the VIDIOC_QUERYCTRL ioctl for querying controls */struct v4l2_queryctrl{	__u32		     id;	enum v4l2_ctrl_type  type;	__u8		     name[32];	/* Whatever */	__s32		     minimum;	/* Note signedness */	__s32		     maximum;	__s32		     step;	__s32		     default_value;	__u32                flags;	__u32		     reserved[2];};/*  Used in the VIDIOC_QUERYMENU ioctl for querying menu items */struct v4l2_querymenu{	__u32		id;	__u32		index;	__u8		name[32];	/* Whatever */	__u32		reserved;};/*  Control flags  */#define V4L2_CTRL_FLAG_DISABLED		0x0001#define V4L2_CTRL_FLAG_GRABBED		0x0002/*  Control IDs defined by V4L2 */#define V4L2_CID_BASE			0x00980900/*  IDs reserved for driver specific controls */#define V4L2_CID_PRIVATE_BASE		0x08000000#define V4L2_CID_BRIGHTNESS		(V4L2_CID_BASE+0)#define V4L2_CID_CONTRAST		(V4L2_CID_BASE+1)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -