whoami7 - Manager
:
/
home
/
papecmvm
/
public_html
/
documents
/
6204_Rajpara
/
2020
/
k_november
/
receipt
/
Upload File:
files >> //home/papecmvm/public_html/documents/6204_Rajpara/2020/k_november/receipt/video.h.tar
usr/include/linux/dvb/video.h 0000644 00000021131 14676654603 0012210 0 ustar 00 /* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */ /* * video.h * * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de> * & Ralph Metzler <ralph@convergence.de> * for convergence integrated media GmbH * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef _DVBVIDEO_H_ #define _DVBVIDEO_H_ #include <linux/types.h> #include <time.h> typedef enum { VIDEO_FORMAT_4_3, /* Select 4:3 format */ VIDEO_FORMAT_16_9, /* Select 16:9 format. */ VIDEO_FORMAT_221_1 /* 2.21:1 */ } video_format_t; typedef enum { VIDEO_SYSTEM_PAL, VIDEO_SYSTEM_NTSC, VIDEO_SYSTEM_PALN, VIDEO_SYSTEM_PALNc, VIDEO_SYSTEM_PALM, VIDEO_SYSTEM_NTSC60, VIDEO_SYSTEM_PAL60, VIDEO_SYSTEM_PALM60 } video_system_t; typedef enum { VIDEO_PAN_SCAN, /* use pan and scan format */ VIDEO_LETTER_BOX, /* use letterbox format */ VIDEO_CENTER_CUT_OUT /* use center cut out format */ } video_displayformat_t; typedef struct { int w; int h; video_format_t aspect_ratio; } video_size_t; typedef enum { VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */ VIDEO_SOURCE_MEMORY /* If this source is selected, the stream comes from the user through the write system call */ } video_stream_source_t; typedef enum { VIDEO_STOPPED, /* Video is stopped */ VIDEO_PLAYING, /* Video is currently playing */ VIDEO_FREEZED /* Video is freezed */ } video_play_state_t; /* Decoder commands */ #define VIDEO_CMD_PLAY (0) #define VIDEO_CMD_STOP (1) #define VIDEO_CMD_FREEZE (2) #define VIDEO_CMD_CONTINUE (3) /* Flags for VIDEO_CMD_FREEZE */ #define VIDEO_CMD_FREEZE_TO_BLACK (1 << 0) /* Flags for VIDEO_CMD_STOP */ #define VIDEO_CMD_STOP_TO_BLACK (1 << 0) #define VIDEO_CMD_STOP_IMMEDIATELY (1 << 1) /* Play input formats: */ /* The decoder has no special format requirements */ #define VIDEO_PLAY_FMT_NONE (0) /* The decoder requires full GOPs */ #define VIDEO_PLAY_FMT_GOP (1) /* The structure must be zeroed before use by the application This ensures it can be extended safely in the future. */ struct video_command { __u32 cmd; __u32 flags; union { struct { __u64 pts; } stop; struct { /* 0 or 1000 specifies normal speed, 1 specifies forward single stepping, -1 specifies backward single stepping, >1: playback at speed/1000 of the normal speed, <-1: reverse playback at (-speed/1000) of the normal speed. */ __s32 speed; __u32 format; } play; struct { __u32 data[16]; } raw; }; }; /* FIELD_UNKNOWN can be used if the hardware does not know whether the Vsync is for an odd, even or progressive (i.e. non-interlaced) field. */ #define VIDEO_VSYNC_FIELD_UNKNOWN (0) #define VIDEO_VSYNC_FIELD_ODD (1) #define VIDEO_VSYNC_FIELD_EVEN (2) #define VIDEO_VSYNC_FIELD_PROGRESSIVE (3) struct video_event { __s32 type; #define VIDEO_EVENT_SIZE_CHANGED 1 #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 #define VIDEO_EVENT_DECODER_STOPPED 3 #define VIDEO_EVENT_VSYNC 4 /* unused, make sure to use atomic time for y2038 if it ever gets used */ long timestamp; union { video_size_t size; unsigned int frame_rate; /* in frames per 1000sec */ unsigned char vsync_field; /* unknown/odd/even/progressive */ } u; }; struct video_status { int video_blank; /* blank video on freeze? */ video_play_state_t play_state; /* current state of playback */ video_stream_source_t stream_source; /* current source (demux/memory) */ video_format_t video_format; /* current aspect ratio of stream*/ video_displayformat_t display_format;/* selected cropping mode */ }; struct video_still_picture { char *iFrame; /* pointer to a single iframe in memory */ __s32 size; }; typedef struct video_highlight { int active; /* 1=show highlight, 0=hide highlight */ __u8 contrast1; /* 7- 4 Pattern pixel contrast */ /* 3- 0 Background pixel contrast */ __u8 contrast2; /* 7- 4 Emphasis pixel-2 contrast */ /* 3- 0 Emphasis pixel-1 contrast */ __u8 color1; /* 7- 4 Pattern pixel color */ /* 3- 0 Background pixel color */ __u8 color2; /* 7- 4 Emphasis pixel-2 color */ /* 3- 0 Emphasis pixel-1 color */ __u32 ypos; /* 23-22 auto action mode */ /* 21-12 start y */ /* 9- 0 end y */ __u32 xpos; /* 23-22 button color number */ /* 21-12 start x */ /* 9- 0 end x */ } video_highlight_t; typedef struct video_spu { int active; int stream_id; } video_spu_t; typedef struct video_spu_palette { /* SPU Palette information */ int length; __u8 *palette; } video_spu_palette_t; typedef struct video_navi_pack { int length; /* 0 ... 1024 */ __u8 data[1024]; } video_navi_pack_t; typedef __u16 video_attributes_t; /* bits: descr. */ /* 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */ /* 13-12 TV system (0=525/60, 1=625/50) */ /* 11-10 Aspect ratio (0=4:3, 3=16:9) */ /* 9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca */ /* 7 line 21-1 data present in GOP (1=yes, 0=no) */ /* 6 line 21-2 data present in GOP (1=yes, 0=no) */ /* 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */ /* 2 source letterboxed (1=yes, 0=no) */ /* 0 film/camera mode (0= *camera, 1=film (625/50 only)) */ /* bit definitions for capabilities: */ /* can the hardware decode MPEG1 and/or MPEG2? */ #define VIDEO_CAP_MPEG1 1 #define VIDEO_CAP_MPEG2 2 /* can you send a system and/or program stream to video device? (you still have to open the video and the audio device but only send the stream to the video device) */ #define VIDEO_CAP_SYS 4 #define VIDEO_CAP_PROG 8 /* can the driver also handle SPU, NAVI and CSS encoded data? (CSS API is not present yet) */ #define VIDEO_CAP_SPU 16 #define VIDEO_CAP_NAVI 32 #define VIDEO_CAP_CSS 64 #define VIDEO_STOP _IO('o', 21) #define VIDEO_PLAY _IO('o', 22) #define VIDEO_FREEZE _IO('o', 23) #define VIDEO_CONTINUE _IO('o', 24) #define VIDEO_SELECT_SOURCE _IO('o', 25) #define VIDEO_SET_BLANK _IO('o', 26) #define VIDEO_GET_STATUS _IOR('o', 27, struct video_status) #define VIDEO_GET_EVENT _IOR('o', 28, struct video_event) #define VIDEO_SET_DISPLAY_FORMAT _IO('o', 29) #define VIDEO_STILLPICTURE _IOW('o', 30, struct video_still_picture) #define VIDEO_FAST_FORWARD _IO('o', 31) #define VIDEO_SLOWMOTION _IO('o', 32) #define VIDEO_GET_CAPABILITIES _IOR('o', 33, unsigned int) #define VIDEO_CLEAR_BUFFER _IO('o', 34) #define VIDEO_SET_ID _IO('o', 35) #define VIDEO_SET_STREAMTYPE _IO('o', 36) #define VIDEO_SET_FORMAT _IO('o', 37) #define VIDEO_SET_SYSTEM _IO('o', 38) #define VIDEO_SET_HIGHLIGHT _IOW('o', 39, video_highlight_t) #define VIDEO_SET_SPU _IOW('o', 50, video_spu_t) #define VIDEO_SET_SPU_PALETTE _IOW('o', 51, video_spu_palette_t) #define VIDEO_GET_NAVI _IOR('o', 52, video_navi_pack_t) #define VIDEO_SET_ATTRIBUTES _IO('o', 53) #define VIDEO_GET_SIZE _IOR('o', 55, video_size_t) #define VIDEO_GET_FRAME_RATE _IOR('o', 56, unsigned int) /** * VIDEO_GET_PTS * * Read the 33 bit presentation time stamp as defined * in ITU T-REC-H.222.0 / ISO/IEC 13818-1. * * The PTS should belong to the currently played * frame if possible, but may also be a value close to it * like the PTS of the last decoded frame or the last PTS * extracted by the PES parser. */ #define VIDEO_GET_PTS _IOR('o', 57, __u64) /* Read the number of displayed frames since the decoder was started */ #define VIDEO_GET_FRAME_COUNT _IOR('o', 58, __u64) #define VIDEO_COMMAND _IOWR('o', 59, struct video_command) #define VIDEO_TRY_COMMAND _IOWR('o', 60, struct video_command) #endif /* _DVBVIDEO_H_ */ usr/include/linux/usb/video.h 0000644 00000041617 14676666144 0012244 0 ustar 00 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * USB Video Class definitions. * * Copyright (C) 2009 Laurent Pinchart <laurent.pinchart@skynet.be> * * This file holds USB constants and structures defined by the USB Device * Class Definition for Video Devices. Unless otherwise stated, comments * below reference relevant sections of the USB Video Class 1.1 specification * available at * * http://www.usb.org/developers/devclass_docs/USB_Video_Class_1_1.zip */ #ifndef __LINUX_USB_VIDEO_H #define __LINUX_USB_VIDEO_H #include <linux/types.h> /* -------------------------------------------------------------------------- * UVC constants */ /* A.2. Video Interface Subclass Codes */ #define UVC_SC_UNDEFINED 0x00 #define UVC_SC_VIDEOCONTROL 0x01 #define UVC_SC_VIDEOSTREAMING 0x02 #define UVC_SC_VIDEO_INTERFACE_COLLECTION 0x03 /* A.3. Video Interface Protocol Codes */ #define UVC_PC_PROTOCOL_UNDEFINED 0x00 #define UVC_PC_PROTOCOL_15 0x01 /* A.5. Video Class-Specific VC Interface Descriptor Subtypes */ #define UVC_VC_DESCRIPTOR_UNDEFINED 0x00 #define UVC_VC_HEADER 0x01 #define UVC_VC_INPUT_TERMINAL 0x02 #define UVC_VC_OUTPUT_TERMINAL 0x03 #define UVC_VC_SELECTOR_UNIT 0x04 #define UVC_VC_PROCESSING_UNIT 0x05 #define UVC_VC_EXTENSION_UNIT 0x06 /* A.6. Video Class-Specific VS Interface Descriptor Subtypes */ #define UVC_VS_UNDEFINED 0x00 #define UVC_VS_INPUT_HEADER 0x01 #define UVC_VS_OUTPUT_HEADER 0x02 #define UVC_VS_STILL_IMAGE_FRAME 0x03 #define UVC_VS_FORMAT_UNCOMPRESSED 0x04 #define UVC_VS_FRAME_UNCOMPRESSED 0x05 #define UVC_VS_FORMAT_MJPEG 0x06 #define UVC_VS_FRAME_MJPEG 0x07 #define UVC_VS_FORMAT_MPEG2TS 0x0a #define UVC_VS_FORMAT_DV 0x0c #define UVC_VS_COLORFORMAT 0x0d #define UVC_VS_FORMAT_FRAME_BASED 0x10 #define UVC_VS_FRAME_FRAME_BASED 0x11 #define UVC_VS_FORMAT_STREAM_BASED 0x12 /* A.7. Video Class-Specific Endpoint Descriptor Subtypes */ #define UVC_EP_UNDEFINED 0x00 #define UVC_EP_GENERAL 0x01 #define UVC_EP_ENDPOINT 0x02 #define UVC_EP_INTERRUPT 0x03 /* A.8. Video Class-Specific Request Codes */ #define UVC_RC_UNDEFINED 0x00 #define UVC_SET_CUR 0x01 #define UVC_GET_CUR 0x81 #define UVC_GET_MIN 0x82 #define UVC_GET_MAX 0x83 #define UVC_GET_RES 0x84 #define UVC_GET_LEN 0x85 #define UVC_GET_INFO 0x86 #define UVC_GET_DEF 0x87 /* A.9.1. VideoControl Interface Control Selectors */ #define UVC_VC_CONTROL_UNDEFINED 0x00 #define UVC_VC_VIDEO_POWER_MODE_CONTROL 0x01 #define UVC_VC_REQUEST_ERROR_CODE_CONTROL 0x02 /* A.9.2. Terminal Control Selectors */ #define UVC_TE_CONTROL_UNDEFINED 0x00 /* A.9.3. Selector Unit Control Selectors */ #define UVC_SU_CONTROL_UNDEFINED 0x00 #define UVC_SU_INPUT_SELECT_CONTROL 0x01 /* A.9.4. Camera Terminal Control Selectors */ #define UVC_CT_CONTROL_UNDEFINED 0x00 #define UVC_CT_SCANNING_MODE_CONTROL 0x01 #define UVC_CT_AE_MODE_CONTROL 0x02 #define UVC_CT_AE_PRIORITY_CONTROL 0x03 #define UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 0x04 #define UVC_CT_EXPOSURE_TIME_RELATIVE_CONTROL 0x05 #define UVC_CT_FOCUS_ABSOLUTE_CONTROL 0x06 #define UVC_CT_FOCUS_RELATIVE_CONTROL 0x07 #define UVC_CT_FOCUS_AUTO_CONTROL 0x08 #define UVC_CT_IRIS_ABSOLUTE_CONTROL 0x09 #define UVC_CT_IRIS_RELATIVE_CONTROL 0x0a #define UVC_CT_ZOOM_ABSOLUTE_CONTROL 0x0b #define UVC_CT_ZOOM_RELATIVE_CONTROL 0x0c #define UVC_CT_PANTILT_ABSOLUTE_CONTROL 0x0d #define UVC_CT_PANTILT_RELATIVE_CONTROL 0x0e #define UVC_CT_ROLL_ABSOLUTE_CONTROL 0x0f #define UVC_CT_ROLL_RELATIVE_CONTROL 0x10 #define UVC_CT_PRIVACY_CONTROL 0x11 /* A.9.5. Processing Unit Control Selectors */ #define UVC_PU_CONTROL_UNDEFINED 0x00 #define UVC_PU_BACKLIGHT_COMPENSATION_CONTROL 0x01 #define UVC_PU_BRIGHTNESS_CONTROL 0x02 #define UVC_PU_CONTRAST_CONTROL 0x03 #define UVC_PU_GAIN_CONTROL 0x04 #define UVC_PU_POWER_LINE_FREQUENCY_CONTROL 0x05 #define UVC_PU_HUE_CONTROL 0x06 #define UVC_PU_SATURATION_CONTROL 0x07 #define UVC_PU_SHARPNESS_CONTROL 0x08 #define UVC_PU_GAMMA_CONTROL 0x09 #define UVC_PU_WHITE_BALANCE_TEMPERATURE_CONTROL 0x0a #define UVC_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 0x0b #define UVC_PU_WHITE_BALANCE_COMPONENT_CONTROL 0x0c #define UVC_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 0x0d #define UVC_PU_DIGITAL_MULTIPLIER_CONTROL 0x0e #define UVC_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 0x0f #define UVC_PU_HUE_AUTO_CONTROL 0x10 #define UVC_PU_ANALOG_VIDEO_STANDARD_CONTROL 0x11 #define UVC_PU_ANALOG_LOCK_STATUS_CONTROL 0x12 /* A.9.7. VideoStreaming Interface Control Selectors */ #define UVC_VS_CONTROL_UNDEFINED 0x00 #define UVC_VS_PROBE_CONTROL 0x01 #define UVC_VS_COMMIT_CONTROL 0x02 #define UVC_VS_STILL_PROBE_CONTROL 0x03 #define UVC_VS_STILL_COMMIT_CONTROL 0x04 #define UVC_VS_STILL_IMAGE_TRIGGER_CONTROL 0x05 #define UVC_VS_STREAM_ERROR_CODE_CONTROL 0x06 #define UVC_VS_GENERATE_KEY_FRAME_CONTROL 0x07 #define UVC_VS_UPDATE_FRAME_SEGMENT_CONTROL 0x08 #define UVC_VS_SYNC_DELAY_CONTROL 0x09 /* B.1. USB Terminal Types */ #define UVC_TT_VENDOR_SPECIFIC 0x0100 #define UVC_TT_STREAMING 0x0101 /* B.2. Input Terminal Types */ #define UVC_ITT_VENDOR_SPECIFIC 0x0200 #define UVC_ITT_CAMERA 0x0201 #define UVC_ITT_MEDIA_TRANSPORT_INPUT 0x0202 /* B.3. Output Terminal Types */ #define UVC_OTT_VENDOR_SPECIFIC 0x0300 #define UVC_OTT_DISPLAY 0x0301 #define UVC_OTT_MEDIA_TRANSPORT_OUTPUT 0x0302 /* B.4. External Terminal Types */ #define UVC_EXTERNAL_VENDOR_SPECIFIC 0x0400 #define UVC_COMPOSITE_CONNECTOR 0x0401 #define UVC_SVIDEO_CONNECTOR 0x0402 #define UVC_COMPONENT_CONNECTOR 0x0403 /* 2.4.2.2. Status Packet Type */ #define UVC_STATUS_TYPE_CONTROL 1 #define UVC_STATUS_TYPE_STREAMING 2 /* 2.4.3.3. Payload Header Information */ #define UVC_STREAM_EOH (1 << 7) #define UVC_STREAM_ERR (1 << 6) #define UVC_STREAM_STI (1 << 5) #define UVC_STREAM_RES (1 << 4) #define UVC_STREAM_SCR (1 << 3) #define UVC_STREAM_PTS (1 << 2) #define UVC_STREAM_EOF (1 << 1) #define UVC_STREAM_FID (1 << 0) /* 4.1.2. Control Capabilities */ #define UVC_CONTROL_CAP_GET (1 << 0) #define UVC_CONTROL_CAP_SET (1 << 1) #define UVC_CONTROL_CAP_DISABLED (1 << 2) #define UVC_CONTROL_CAP_AUTOUPDATE (1 << 3) #define UVC_CONTROL_CAP_ASYNCHRONOUS (1 << 4) /* 3.9.2.6 Color Matching Descriptor Values */ enum uvc_color_primaries_values { UVC_COLOR_PRIMARIES_UNSPECIFIED, UVC_COLOR_PRIMARIES_BT_709_SRGB, UVC_COLOR_PRIMARIES_BT_470_2_M, UVC_COLOR_PRIMARIES_BT_470_2_B_G, UVC_COLOR_PRIMARIES_SMPTE_170M, UVC_COLOR_PRIMARIES_SMPTE_240M, }; enum uvc_transfer_characteristics_values { UVC_TRANSFER_CHARACTERISTICS_UNSPECIFIED, UVC_TRANSFER_CHARACTERISTICS_BT_709, UVC_TRANSFER_CHARACTERISTICS_BT_470_2_M, UVC_TRANSFER_CHARACTERISTICS_BT_470_2_B_G, UVC_TRANSFER_CHARACTERISTICS_SMPTE_170M, UVC_TRANSFER_CHARACTERISTICS_SMPTE_240M, UVC_TRANSFER_CHARACTERISTICS_LINEAR, UVC_TRANSFER_CHARACTERISTICS_SRGB, }; enum uvc_matrix_coefficients { UVC_MATRIX_COEFFICIENTS_UNSPECIFIED, UVC_MATRIX_COEFFICIENTS_BT_709, UVC_MATRIX_COEFFICIENTS_FCC, UVC_MATRIX_COEFFICIENTS_BT_470_2_B_G, UVC_MATRIX_COEFFICIENTS_SMPTE_170M, UVC_MATRIX_COEFFICIENTS_SMPTE_240M, }; /* ------------------------------------------------------------------------ * UVC structures */ /* All UVC descriptors have these 3 fields at the beginning */ struct uvc_descriptor_header { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; } __attribute__((packed)); /* 3.7.2. Video Control Interface Header Descriptor */ struct uvc_header_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __le16 bcdUVC; __le16 wTotalLength; __le32 dwClockFrequency; __u8 bInCollection; __u8 baInterfaceNr[]; } __attribute__((__packed__)); #define UVC_DT_HEADER_SIZE(n) (12+(n)) #define UVC_HEADER_DESCRIPTOR(n) \ uvc_header_descriptor_##n #define DECLARE_UVC_HEADER_DESCRIPTOR(n) \ struct UVC_HEADER_DESCRIPTOR(n) { \ __u8 bLength; \ __u8 bDescriptorType; \ __u8 bDescriptorSubType; \ __le16 bcdUVC; \ __le16 wTotalLength; \ __le32 dwClockFrequency; \ __u8 bInCollection; \ __u8 baInterfaceNr[n]; \ } __attribute__ ((packed)) /* 3.7.2.1. Input Terminal Descriptor */ struct uvc_input_terminal_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bTerminalID; __le16 wTerminalType; __u8 bAssocTerminal; __u8 iTerminal; } __attribute__((__packed__)); #define UVC_DT_INPUT_TERMINAL_SIZE 8 /* 3.7.2.2. Output Terminal Descriptor */ struct uvc_output_terminal_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bTerminalID; __le16 wTerminalType; __u8 bAssocTerminal; __u8 bSourceID; __u8 iTerminal; } __attribute__((__packed__)); #define UVC_DT_OUTPUT_TERMINAL_SIZE 9 /* 3.7.2.3. Camera Terminal Descriptor */ struct uvc_camera_terminal_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bTerminalID; __le16 wTerminalType; __u8 bAssocTerminal; __u8 iTerminal; __le16 wObjectiveFocalLengthMin; __le16 wObjectiveFocalLengthMax; __le16 wOcularFocalLength; __u8 bControlSize; __u8 bmControls[3]; } __attribute__((__packed__)); #define UVC_DT_CAMERA_TERMINAL_SIZE(n) (15+(n)) /* 3.7.2.4. Selector Unit Descriptor */ struct uvc_selector_unit_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bUnitID; __u8 bNrInPins; __u8 baSourceID[0]; __u8 iSelector; } __attribute__((__packed__)); #define UVC_DT_SELECTOR_UNIT_SIZE(n) (6+(n)) #define UVC_SELECTOR_UNIT_DESCRIPTOR(n) \ uvc_selector_unit_descriptor_##n #define DECLARE_UVC_SELECTOR_UNIT_DESCRIPTOR(n) \ struct UVC_SELECTOR_UNIT_DESCRIPTOR(n) { \ __u8 bLength; \ __u8 bDescriptorType; \ __u8 bDescriptorSubType; \ __u8 bUnitID; \ __u8 bNrInPins; \ __u8 baSourceID[n]; \ __u8 iSelector; \ } __attribute__ ((packed)) /* 3.7.2.5. Processing Unit Descriptor */ struct uvc_processing_unit_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bUnitID; __u8 bSourceID; __le16 wMaxMultiplier; __u8 bControlSize; __u8 bmControls[2]; __u8 iProcessing; __u8 bmVideoStandards; } __attribute__((__packed__)); #define UVC_DT_PROCESSING_UNIT_SIZE(n) (10+(n)) /* 3.7.2.6. Extension Unit Descriptor */ struct uvc_extension_unit_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bUnitID; __u8 guidExtensionCode[16]; __u8 bNumControls; __u8 bNrInPins; __u8 baSourceID[0]; __u8 bControlSize; __u8 bmControls[0]; __u8 iExtension; } __attribute__((__packed__)); #define UVC_DT_EXTENSION_UNIT_SIZE(p, n) (24+(p)+(n)) #define UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) \ uvc_extension_unit_descriptor_##p_##n #define DECLARE_UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) \ struct UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) { \ __u8 bLength; \ __u8 bDescriptorType; \ __u8 bDescriptorSubType; \ __u8 bUnitID; \ __u8 guidExtensionCode[16]; \ __u8 bNumControls; \ __u8 bNrInPins; \ __u8 baSourceID[p]; \ __u8 bControlSize; \ __u8 bmControls[n]; \ __u8 iExtension; \ } __attribute__ ((packed)) /* 3.8.2.2. Video Control Interrupt Endpoint Descriptor */ struct uvc_control_endpoint_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __le16 wMaxTransferSize; } __attribute__((__packed__)); #define UVC_DT_CONTROL_ENDPOINT_SIZE 5 /* 3.9.2.1. Input Header Descriptor */ struct uvc_input_header_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bNumFormats; __le16 wTotalLength; __u8 bEndpointAddress; __u8 bmInfo; __u8 bTerminalLink; __u8 bStillCaptureMethod; __u8 bTriggerSupport; __u8 bTriggerUsage; __u8 bControlSize; __u8 bmaControls[]; } __attribute__((__packed__)); #define UVC_DT_INPUT_HEADER_SIZE(n, p) (13+(n*p)) #define UVC_INPUT_HEADER_DESCRIPTOR(n, p) \ uvc_input_header_descriptor_##n_##p #define DECLARE_UVC_INPUT_HEADER_DESCRIPTOR(n, p) \ struct UVC_INPUT_HEADER_DESCRIPTOR(n, p) { \ __u8 bLength; \ __u8 bDescriptorType; \ __u8 bDescriptorSubType; \ __u8 bNumFormats; \ __le16 wTotalLength; \ __u8 bEndpointAddress; \ __u8 bmInfo; \ __u8 bTerminalLink; \ __u8 bStillCaptureMethod; \ __u8 bTriggerSupport; \ __u8 bTriggerUsage; \ __u8 bControlSize; \ __u8 bmaControls[p][n]; \ } __attribute__ ((packed)) /* 3.9.2.2. Output Header Descriptor */ struct uvc_output_header_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bNumFormats; __le16 wTotalLength; __u8 bEndpointAddress; __u8 bTerminalLink; __u8 bControlSize; __u8 bmaControls[]; } __attribute__((__packed__)); #define UVC_DT_OUTPUT_HEADER_SIZE(n, p) (9+(n*p)) #define UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) \ uvc_output_header_descriptor_##n_##p #define DECLARE_UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) \ struct UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) { \ __u8 bLength; \ __u8 bDescriptorType; \ __u8 bDescriptorSubType; \ __u8 bNumFormats; \ __le16 wTotalLength; \ __u8 bEndpointAddress; \ __u8 bTerminalLink; \ __u8 bControlSize; \ __u8 bmaControls[p][n]; \ } __attribute__ ((packed)) /* 3.9.2.6. Color matching descriptor */ struct uvc_color_matching_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bColorPrimaries; __u8 bTransferCharacteristics; __u8 bMatrixCoefficients; } __attribute__((__packed__)); #define UVC_DT_COLOR_MATCHING_SIZE 6 /* 4.3.1.1. Video Probe and Commit Controls */ struct uvc_streaming_control { __u16 bmHint; __u8 bFormatIndex; __u8 bFrameIndex; __u32 dwFrameInterval; __u16 wKeyFrameRate; __u16 wPFrameRate; __u16 wCompQuality; __u16 wCompWindowSize; __u16 wDelay; __u32 dwMaxVideoFrameSize; __u32 dwMaxPayloadTransferSize; __u32 dwClockFrequency; __u8 bmFramingInfo; __u8 bPreferedVersion; __u8 bMinVersion; __u8 bMaxVersion; } __attribute__((__packed__)); /* Uncompressed Payload - 3.1.1. Uncompressed Video Format Descriptor */ struct uvc_format_uncompressed { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bFormatIndex; __u8 bNumFrameDescriptors; __u8 guidFormat[16]; __u8 bBitsPerPixel; __u8 bDefaultFrameIndex; __u8 bAspectRatioX; __u8 bAspectRatioY; __u8 bmInterfaceFlags; __u8 bCopyProtect; } __attribute__((__packed__)); #define UVC_DT_FORMAT_UNCOMPRESSED_SIZE 27 /* Uncompressed Payload - 3.1.2. Uncompressed Video Frame Descriptor */ struct uvc_frame_uncompressed { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bFrameIndex; __u8 bmCapabilities; __le16 wWidth; __le16 wHeight; __le32 dwMinBitRate; __le32 dwMaxBitRate; __le32 dwMaxVideoFrameBufferSize; __le32 dwDefaultFrameInterval; __u8 bFrameIntervalType; __le32 dwFrameInterval[]; } __attribute__((__packed__)); #define UVC_DT_FRAME_UNCOMPRESSED_SIZE(n) (26+4*(n)) #define UVC_FRAME_UNCOMPRESSED(n) \ uvc_frame_uncompressed_##n #define DECLARE_UVC_FRAME_UNCOMPRESSED(n) \ struct UVC_FRAME_UNCOMPRESSED(n) { \ __u8 bLength; \ __u8 bDescriptorType; \ __u8 bDescriptorSubType; \ __u8 bFrameIndex; \ __u8 bmCapabilities; \ __le16 wWidth; \ __le16 wHeight; \ __le32 dwMinBitRate; \ __le32 dwMaxBitRate; \ __le32 dwMaxVideoFrameBufferSize; \ __le32 dwDefaultFrameInterval; \ __u8 bFrameIntervalType; \ __le32 dwFrameInterval[n]; \ } __attribute__ ((packed)) /* MJPEG Payload - 3.1.1. MJPEG Video Format Descriptor */ struct uvc_format_mjpeg { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bFormatIndex; __u8 bNumFrameDescriptors; __u8 bmFlags; __u8 bDefaultFrameIndex; __u8 bAspectRatioX; __u8 bAspectRatioY; __u8 bmInterfaceFlags; __u8 bCopyProtect; } __attribute__((__packed__)); #define UVC_DT_FORMAT_MJPEG_SIZE 11 /* MJPEG Payload - 3.1.2. MJPEG Video Frame Descriptor */ struct uvc_frame_mjpeg { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubType; __u8 bFrameIndex; __u8 bmCapabilities; __le16 wWidth; __le16 wHeight; __le32 dwMinBitRate; __le32 dwMaxBitRate; __le32 dwMaxVideoFrameBufferSize; __le32 dwDefaultFrameInterval; __u8 bFrameIntervalType; __le32 dwFrameInterval[]; } __attribute__((__packed__)); #define UVC_DT_FRAME_MJPEG_SIZE(n) (26+4*(n)) #define UVC_FRAME_MJPEG(n) \ uvc_frame_mjpeg_##n #define DECLARE_UVC_FRAME_MJPEG(n) \ struct UVC_FRAME_MJPEG(n) { \ __u8 bLength; \ __u8 bDescriptorType; \ __u8 bDescriptorSubType; \ __u8 bFrameIndex; \ __u8 bmCapabilities; \ __le16 wWidth; \ __le16 wHeight; \ __le32 dwMinBitRate; \ __le32 dwMaxBitRate; \ __le32 dwMaxVideoFrameBufferSize; \ __le32 dwDefaultFrameInterval; \ __u8 bFrameIntervalType; \ __le32 dwFrameInterval[n]; \ } __attribute__ ((packed)) #endif /* __LINUX_USB_VIDEO_H */
Copyright ©2021 || Defacer Indonesia