11 #ifndef _VGA2USB_DEFS_H_ 12 #define _VGA2USB_DEFS_H_ 1 15 #if !defined(__KERNEL__) && !defined(__C51__) 18 # include <winioctl.h> 21 # include <sys/ioctl.h> 27 # include <pshpack1.h> 31 # if defined(_WIN32) || defined(__C51__) 34 # define V2U_PACKED __attribute__((packed)) 48 #elif defined(__C51__) 151 #define V2U_FLAG_VALID_HSHIFT 0x0001 153 #define V2U_FLAG_VALID_PHASE 0x0002 155 #define V2U_FLAG_VALID_OFFSETGAIN 0x0004 157 #define V2U_FLAG_VALID_VSHIFT 0x0008 159 #define V2U_FLAG_VALID_PLLSHIFT 0x0010 161 #define V2U_FLAG_VALID_GRABFLAGS 0x0020 165 #define V2U_GRAB_BMP_BOTTOM_UP 0x10000 168 #define V2U_GRAB_PREFER_WIDE_MODE 0x20000 176 #define V2U_MIN_PHASE 0 177 #define V2U_MAX_PHASE 31 178 #define V2U_MIN_GAIN 0 179 #define V2U_MAX_GAIN 255 180 #define V2U_MIN_OFFSET 0 181 #define V2U_MAX_OFFSET 63 195 #define V2U_PS2ADDR_KEYBOARD 0x01 196 #define V2U_PS2ADDR_MOUSE 0x02 204 #define V2U_SN_BUFSIZ 32 264 #define V2U_SCALE_MODE_TO_FLAGS(_m) \ 265 (((_m) << 16) & V2U_GRABFRAME_SCALE_MASK) 266 #define V2U_SCALE_FLAGS_TO_MODE(_f) \ 267 ((V2UScaleMode)(((_f) & V2U_GRABFRAME_SCALE_MASK) >> 16)) 279 #define V2U_ROTATION_MODE_TO_FLAGS(_m) \ 280 (((_m) << 20) & V2U_GRABFRAME_ROTATION_MASK) 281 #define V2U_ROTATION_FLAGS_TO_MODE(_f) \ 282 ((V2URotationMode)(((_f) & V2U_GRABFRAME_ROTATION_MASK) >> 20)) 316 #define VIDEOMODE_TYPE_VALID 0x01 317 #define VIDEOMODE_TYPE_ENABLED 0x02 318 #define VIDEOMODE_TYPE_SUPPORTED 0x04 319 #define VIDEOMODE_TYPE_DUALLINK 0x08 320 #define VIDEOMODE_TYPE_DIGITAL 0x10 321 #define VIDEOMODE_TYPE_INTERLACED 0x20 322 #define VIDEOMODE_TYPE_HSYNCPOSITIVE 0x40 323 #define VIDEOMODE_TYPE_VSYNCPOSITIVE 0x80 324 #define VIDEOMODE_TYPE_TOPFIELDFIRST 0x100 330 #define V2U_CUSTOM_VIDEOMODE_COUNT 8 356 #define V2U_DSHOW_LIMIT_FPS 0x200 357 #define V2U_DSHOW_FLIP_VERTICALLY 0x400 358 #define V2U_DSHOW_FIX_FPS 0x800 361 #define V2U_INPUT_NONE 0x00 362 #define V2U_INPUT_ANALOG 0x01 363 #define V2U_INPUT_DIGITAL 0x02 364 #define V2U_INPUT_SOG 0x04 365 #define V2U_INPUT_COMPOSITE 0x08 398 #define V2U_MIN_SYNC_THRESHOLD 0 399 #define V2U_MAX_SYNC_THRESHOLD 255 400 #define V2U_DEFAULT_SYNC_THRESHOLD 128 403 #define ResetADC_Reset 0x01 404 #define ResetADC_PowerDown 0x02 405 #define ResetADC_PowerUp 0x03 408 #define V2U_FPS_DENOMINATOR 100 411 #define V2U_CAPS_VGA_CAPTURE 0x0001 412 #define V2U_CAPS_DVI_CAPTURE 0x0002 413 #define V2U_CAPS_DVI_DUAL_LINK 0x0004 414 #define V2U_CAPS_KVM 0x0008 415 #define V2U_CAPS_EDID 0x0010 416 #define V2U_CAPS_HW_COMPRESSION 0x0020 417 #define V2U_CAPS_SYNC_THRESHOLD 0x0040 418 #define V2U_CAPS_HW_SCALE 0x0080 419 #define V2U_CAPS_SIGNATURE 0x0100 457 #define V2UPropType_Enum V2UPropType_Int32 459 #define V2U_PROPERTY_LIST(property) \ 460 property( V2UKey_UsbProductID, \ 464 property( V2UKey_ProductType, \ 468 property( V2UKey_DirectShowFixRes, \ 469 "DS Fix Resolution", \ 472 property( V2UKey_DirectShowFlags, \ 476 property( V2UKey_DirectShowDefaultBmp, \ 478 V2UPropType_StrUcs2, \ 480 property( V2UKey_ModeMeasurmentsDump, \ 481 "Mode Measurments dump", \ 482 V2UPropType_Binary, \ 484 property( V2UKey_ResetADC, \ 488 property( V2UKey_DirectShowScaleMode, \ 489 "DirectShow Scale Mode", \ 492 property( V2UKey_HardwareCompression, \ 493 "Hardware Compression", \ 494 V2UPropType_Boolean, \ 496 property( V2UKey_AdjustmentsRange, \ 497 "Adjustments Range", \ 498 V2UPropType_AdjustRange, \ 500 property( V2UKey_Version, \ 502 V2UPropType_Version, \ 504 property( V2UKey_EDID, \ 508 property( V2UKey_DirectShowMaxFps, \ 512 property( V2UKey_KVMCapable, \ 514 V2UPropType_Boolean, \ 516 property( V2UKey_VGAMode, \ 518 V2UPropType_VGAMode, \ 520 property( V2UKey_CurrentVGAMode, \ 521 "Current VGA mode", \ 522 V2UPropType_VESAMode, \ 524 property( V2UKey_ModeMeasureInterval, \ 525 "Mode Measure interval", \ 528 property( V2UKey_EDIDSupport, \ 530 V2UPropType_Boolean, \ 532 property( V2UKey_ProductName, \ 534 V2UPropType_String, \ 536 property( V2UKey_TuneInterval, \ 538 V2UPropType_Uint32, \ 540 property( V2UKey_UserData, \ 542 V2UPropType_UserData, \ 544 property( V2UKey_SerialNumber, \ 546 V2UPropType_String, \ 548 property( V2UKey_InputSignalType, \ 549 "Input signal type", \ 550 V2UPropType_Uint32, \ 552 property( V2UKey_DigitalModeDetect, \ 553 "Digital mode detection", \ 556 property( V2UKey_NoiseFilter, \ 560 property( V2UKey_HSyncThreshold, \ 564 property( V2UKey_VSyncThreshold, \ 568 property( V2UKey_DeviceCaps, \ 569 "Device capabilities", \ 570 V2UPropType_Uint32, \ 572 property( V2UKey_DirectShowDefaultBmp2, \ 574 V2UPropType_String2, \ 576 property( V2UKey_BusType, \ 577 "Grabber bus type", \ 584 #define V2U_PROPERTY_KEY_ENUM(key,name,type,access) key, 586 #undef V2U_PROPERTY_KEY_ENUM 590 #define V2U_USERDATA_LEN 8 631 #define V2U_GrabFrame_Fields(pointer) \ 633 V2U_UINT32 pixbuflen; \ 642 #define V2U_GrabFrame2_Fields(pointer) \ 644 V2U_UINT32 pixbuflen; \ 645 V2U_UINT32 palette; \ 647 V2U_VideoMode mode; \ 648 V2U_UINT32 imagelen; \ 656 #define V2UERROR_OK 0 657 #define V2UERROR_FAULT 1 658 #define V2UERROR_INVALARG 2 659 #define V2UERROR_SMALLBUF 3 660 #define V2UERROR_OUTOFMEMORY 4 661 #define V2UERROR_NOSIGNAL 5 662 #define V2UERROR_UNSUPPORTED 6 663 #define V2UERROR_TIMEOUT 7 678 #define V2U_GRABFRAME_RESERVED 0x0f000000 679 #define V2U_GRABFRAME_FLAGS_MASK 0xf0000000 680 #define V2U_GRABFRAME_BOTTOM_UP_FLAG 0x80000000 681 #define V2U_GRABFRAME_KEYFRAME_FLAG 0x40000000 682 #define V2U_GRABFRAME_ADDR_IS_PHYS 0x20000000 683 #define V2U_GRABFRAME_DEINTERLACE 0x10000000 703 #define V2U_GRABFRAME_ROTATION_MASK 0x00300000 704 #define V2U_GRABFRAME_ROTATION_NONE 0x00000000 705 #define V2U_GRABFRAME_ROTATION_LEFT90 0x00100000 706 #define V2U_GRABFRAME_ROTATION_RIGHT90 0x00200000 707 #define V2U_GRABFRAME_ROTATION_180 0x00300000 734 #define V2U_GRABFRAME_SCALE_MASK 0x000F0000 735 #define V2U_GRABFRAME_SCALE_NEAREST 0x00010000 736 #define V2U_GRABFRAME_SCALE_AVERAGE 0x00020000 737 #define V2U_GRABFRAME_SCALE_FAST_BILINEAR 0x00030000 738 #define V2U_GRABFRAME_SCALE_BILINEAR 0x00040000 739 #define V2U_GRABFRAME_SCALE_BICUBIC 0x00050000 740 #define V2U_GRABFRAME_SCALE_EXPERIMENTAL 0x00060000 741 #define V2U_GRABFRAME_SCALE_POINT 0x00070000 742 #define V2U_GRABFRAME_SCALE_AREA 0x00080000 743 #define V2U_GRABFRAME_SCALE_BICUBLIN 0x00090000 744 #define V2U_GRABFRAME_SCALE_SINC 0x000A0000 745 #define V2U_GRABFRAME_SCALE_LANCZOS 0x000B0000 746 #define V2U_GRABFRAME_SCALE_SPLINE 0x000C0000 747 #define V2U_GRABFRAME_SCALE_HW 0x000D0000 748 #define V2U_GRABFRAME_SCALE_MAX_MODE 0x000D0000 751 #define V2U_GRABFRAME_FORMAT_MASK 0x0000ffff 752 #define V2U_GRABFRAME_FORMAT_RGB_MASK 0x0000001f 753 #define V2U_GRABFRAME_FORMAT_RGB4 0x00000004 754 #define V2U_GRABFRAME_FORMAT_RGB8 0x00000008 755 #define V2U_GRABFRAME_FORMAT_RGB16 0x00000010 756 #define V2U_GRABFRAME_FORMAT_RGB24 0x00000018 757 #define V2U_GRABFRAME_FORMAT_YUY2 0x00000100 758 #define V2U_GRABFRAME_FORMAT_YV12 0x00000200 759 #define V2U_GRABFRAME_FORMAT_2VUY 0x00000300 760 #define V2U_GRABFRAME_FORMAT_BGR16 0x00000400 761 #define V2U_GRABFRAME_FORMAT_Y8 0x00000500 762 #define V2U_GRABFRAME_FORMAT_CRGB24 0x00000600 763 #define V2U_GRABFRAME_FORMAT_CYUY2 0x00000700 764 #define V2U_GRABFRAME_FORMAT_BGR24 0x00000800 765 #define V2U_GRABFRAME_FORMAT_CBGR24 0x00000900 766 #define V2U_GRABFRAME_FORMAT_I420 0x00000A00 767 #define V2U_GRABFRAME_FORMAT_ARGB32 0x00000B00 768 #define V2U_GRABFRAME_FORMAT_NV12 0x00000C00 769 #define V2U_GRABFRAME_FORMAT_C2VUY 0x00000D00 772 #define V2U_GRABFRAME_PALETTE_MASK V2U_GRABFRAME_FORMAT_MASK 773 #define V2U_GRABFRAME_PALETTE_RGB_MASK V2U_GRABFRAME_FORMAT_RGB_MASK 774 #define V2U_GRABFRAME_PALETTE_RGB4 V2U_GRABFRAME_FORMAT_RGB4 775 #define V2U_GRABFRAME_PALETTE_RGB8 V2U_GRABFRAME_FORMAT_RGB8 776 #define V2U_GRABFRAME_PALETTE_RGB16 V2U_GRABFRAME_FORMAT_RGB16 777 #define V2U_GRABFRAME_PALETTE_RGB24 V2U_GRABFRAME_FORMAT_RGB24 778 #define V2U_GRABFRAME_PALETTE_ARGB32 V2U_GRABFRAME_FORMAT_ARGB32 779 #define V2U_GRABFRAME_PALETTE_YUY2 V2U_GRABFRAME_FORMAT_YUY2 780 #define V2U_GRABFRAME_PALETTE_YV12 V2U_GRABFRAME_FORMAT_YV12 781 #define V2U_GRABFRAME_PALETTE_I420 V2U_GRABFRAME_FORMAT_I420 782 #define V2U_GRABFRAME_PALETTE_2VUY V2U_GRABFRAME_FORMAT_2VUY 783 #define V2U_GRABFRAME_PALETTE_BGR16 V2U_GRABFRAME_FORMAT_BGR16 784 #define V2U_GRABFRAME_PALETTE_Y8 V2U_GRABFRAME_FORMAT_Y8 785 #define V2U_GRABFRAME_PALETTE_BGR24 V2U_GRABFRAME_FORMAT_BGR24 786 #define V2U_GRABFRAME_PALETTE_NV12 V2U_GRABFRAME_FORMAT_NV12 788 #define V2U_GRABFRAME_FORMAT(p) ((p) & V2U_GRABFRAME_FORMAT_MASK) 791 #define V2UPALETTE_2_BPP(p) \ 792 (((p) & V2U_GRABFRAME_FORMAT_RGB_MASK) ? \ 793 ((V2U_UINT8)((p) & V2U_GRABFRAME_FORMAT_RGB_MASK)) : \ 794 (((V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_BGR16) || \ 795 (V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_YUY2) || \ 796 (V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_2VUY) || \ 797 (V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_CYUY2) || \ 798 (V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_C2VUY)) ? 16 :\ 799 (((V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_YV12) || \ 800 (V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_NV12) || \ 801 (V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_I420)) ? 12 : \ 802 (((V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_Y8) || \ 803 (V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_RGB8)) ? 8 : \ 804 (((V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_CRGB24) || \ 805 (V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_CBGR24) || \ 806 (V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_BGR24)) ? 24 : \ 807 ((V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_ARGB32) ? 32 : 0)))))) 810 #define V2UPALETTE_COMPRESSED(p) \ 811 ((V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_CRGB24) || \ 812 (V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_CBGR24) || \ 813 (V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_CYUY2) || \ 814 (V2U_GRABFRAME_FORMAT(p) == V2U_GRABFRAME_FORMAT_C2VUY)) 820 # include <poppack.h>
#define V2U_GrabFrame_Fields(pointer)
struct ioctl_setparams V2U_GrabParameters
#define V2U_PROPERTY_KEY_ENUM(key, name, type, access)
struct v2u_ioctl_property V2U_Property
union v2u_property_value V2UPropertyValue
struct ioctl_sendps2 V2U_SendPS2
struct custom_videomode V2UVGAMode
enum v2u_property_access V2UPropertyAccess
struct vesa_videomode V2UVideoModeDescr
struct ioctl_grabframe2 V2U_GrabFrame2
struct ioctl_videomode V2U_VideoMode
#define V2U_GrabFrame2_Fields(pointer)
V2U_UINT32 grab_flags_mask
struct ioctl_getsn V2U_GetSN
V2U_UINT8 userdata[V2U_USERDATA_LEN]
enum v2u_scale_mode V2UScaleMode
#define V2U_PROPERTY_LIST(property)
const V2UVideoModeDescr * V2UVideoModeDescrCPtr
enum v2u_product_type V2UProductType
enum v2u_property_type V2UPropertyType
struct ioctl_grabframe V2U_GrabFrame
V2UVideoModeDescr vesa_mode
enum v2u_property_key V2UPropertyKey
struct v2u_str_ucs2 V2UStrUcs2
V2UVideoModeDescr vesa_mode
enum v2u_noise_filter V2UNoiseFilter
V2UProductType product_type
enum v2u_digital_mode_detect V2UDigitalModeDetect
enum v2u_bus_type V2UBusType
enum v2u_rotation_mode V2URotationMode
struct v2u_adjustment_range V2UAdjRange
struct v2u_version V2UVersion