Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
3.5 KiB

4 years ago
  1. /*
  2. * Copyright (c) Microsoft Corporation 1993. All Rights Reserved.
  3. */
  4. /*
  5. * vcstruct.h
  6. *
  7. * 32-bit Video Capture Driver
  8. *
  9. * This header describes structures used in the interface between the
  10. * kernel driver and the user-mode dll.
  11. *
  12. * Geraint Davies, Feb 93.
  13. */
  14. #ifndef _VCSTRUCT_
  15. #define _VCSTRUCT_
  16. /* --- configuration ------------------------------------------------- */
  17. /*
  18. * this structure contains configuration information generated
  19. * by the hardware-specific dialogs and sent to the hardware-specific
  20. * kernel-mode code. No one else knows its format.
  21. *
  22. * these generic structures are used so that driver writers can
  23. * change the user-mode dialogs and the supporting hardware-specific code
  24. * and yet still use the common code for interfacing between the
  25. * two and dealing with NT.
  26. */
  27. typedef struct _CONFIG_INFO {
  28. ULONG ulSize; /* size of struct including size field */
  29. BYTE ulData[1]; /* (ulSize - sizeof(ULONG)) bytes of data */
  30. } CONFIG_INFO, *PCONFIG_INFO;
  31. /* --- overlay keying and region setting ---------------------------- */
  32. typedef struct _OVERLAY_MODE {
  33. ULONG ulMode;
  34. } OVERLAY_MODE, *POVERLAY_MODE;
  35. /* values for overlay mode field - or-ed together */
  36. #define VCO_KEYCOLOUR 1 // true if a key colour supported
  37. #define VCO_KEYCOLOUR_FIXED 2 // if not true, you can change it
  38. #define VCO_KEYCOLOUR_RGB 4 // if not true, use palette index
  39. #define VCO_SIMPLE_RECT 8 // if true, supports a single rect
  40. #define VCO_COMPLEX_REGION 0x10 // if true, supports complex regions.
  41. /*
  42. * values indicating whether we can put data back into the frame
  43. * buffer for overlaying (we support the DrawFrame ioctl for the
  44. * Y411 and/or S422 formats
  45. */
  46. #define VCO_CAN_DRAW_Y411 0x20 // 7-bit 4:1:1 yuv ala bravado
  47. #define VCO_CAN_DRAW_S422 0x40 // 8-bit 4:2:2 yuv ala spigot
  48. #define VCO_CAN_DRAW 0x60 // for testing: can he draw anything?
  49. typedef struct _OVERLAY_RECTS {
  50. ULONG ulCount; // total number of rects in array
  51. RECT rcRects[1]; // ulCount rectangles.
  52. }OVERLAY_RECTS, *POVERLAY_RECTS;
  53. typedef RGBQUAD * PRGBQUAD;
  54. /* --- frame capture ------------------------------------------------ */
  55. /*
  56. * declaring a real LPVIDEOHDR in the kernel driver is too much of a
  57. * pain with header files. So the kernel interface will use this declaration
  58. */
  59. typedef struct _CAPTUREBUFFER {
  60. PUCHAR lpData; /* buffer data area */
  61. ULONG BufferLength; /* length of buffer */
  62. ULONG BytesUsed; /* actual bytes of data (size of dib) */
  63. ULONG TimeCaptured; /* millisec time stamp */
  64. PVOID Context; /* pointer to user context data */
  65. DWORD dwFlags; /* not used by kernel interface */
  66. /*
  67. * remaining are declared as 4 reserved dwords in orig struct
  68. * we use these fields for partial-frame requests
  69. */
  70. DWORD dwWindowOffset; /* current window offset from
  71. * start of buffer
  72. */
  73. DWORD dwWindowLength; /* length of current window */
  74. DWORD dwReserved[2]; /* not used */
  75. } CAPTUREBUFFER, * PCAPTUREBUFFER;
  76. /* --- drawing ------------------------------------------------------- */
  77. /*
  78. * used by sample hardware codec to write data back into frame buffer
  79. */
  80. typedef struct _DRAWBUFFER {
  81. PUCHAR lpData; /* frame data to be drawn */
  82. ULONG ulWidth; /* width of frame in pixels */
  83. ULONG ulHeight; /* height of frame in pixels */
  84. ULONG Format; /* h/w specific data format code */
  85. RECT rcSource; /* write only this rect to the device */
  86. } DRAWBUFFER, *PDRAWBUFFER;
  87. #endif //_VCSTRUCT_