Leaked source code of windows server 2003
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.

193 lines
7.5 KiB

  1. /****************************************************************************/
  2. /* */
  3. /* ivideo32.h */
  4. /* */
  5. /* private structures & prototypes for 32bit videoXXX api's */
  6. /* this header file is specific to WIN32 */
  7. /* */
  8. /****************************************************************************/
  9. // include public stuff about the videoXXX interface
  10. //
  11. #include <vfw.h>
  12. // include private stuff IFF _WIN32 and we have not already done so
  13. //
  14. #if !defined _INC_IVIDEO32 && defined _WIN32
  15. #define _INC_IVIDEO32
  16. #ifdef __cplusplus
  17. extern "C" { /* Assume C declarations for C++ */
  18. #endif /* __cplusplus */
  19. #ifndef _RCINVOKED
  20. /****************************************************************************
  21. Structures
  22. ****************************************************************************/
  23. #if 0
  24. /* video data block header */
  25. typedef struct videohdr_tag {
  26. LPBYTE lpData; /* pointer to locked data buffer */
  27. DWORD dwBufferLength; /* Length of data buffer */
  28. DWORD dwBytesUsed; /* Bytes actually used */
  29. DWORD dwTimeCaptured; /* Milliseconds from start of stream */
  30. DWORD dwUser; /* for client's use */
  31. DWORD dwFlags; /* assorted flags (see defines) */
  32. DWORD dwReserved[4]; /* reserved for driver */
  33. } VIDEOHDR, NEAR *PVIDEOHDR, FAR * LPVIDEOHDR;
  34. /* dwFlags field of VIDEOHDR */
  35. #define VHDR_DONE 0x00000001 /* Done bit */
  36. #define VHDR_PREPARED 0x00000002 /* Set if this header has been prepared */
  37. #define VHDR_INQUEUE 0x00000004 /* Reserved for driver */
  38. #define VHDR_KEYFRAME 0x00000008 /* Key Frame */
  39. #define VHDR_VALID 0x0000000F /* valid flags */ /* ;Internal */
  40. /* Channel capabilities structure */
  41. typedef struct channel_caps_tag {
  42. DWORD dwFlags; /* Capability flags*/
  43. DWORD dwSrcRectXMod; /* Granularity of src rect in x */
  44. DWORD dwSrcRectYMod; /* Granularity of src rect in y */
  45. DWORD dwSrcRectWidthMod; /* Granularity of src rect width */
  46. DWORD dwSrcRectHeightMod; /* Granularity of src rect height */
  47. DWORD dwDstRectXMod; /* Granularity of dst rect in x */
  48. DWORD dwDstRectYMod; /* Granularity of dst rect in y */
  49. DWORD dwDstRectWidthMod; /* Granularity of dst rect width */
  50. DWORD dwDstRectHeightMod; /* Granularity of dst rect height */
  51. } CHANNEL_CAPS, NEAR *PCHANNEL_CAPS, FAR * LPCHANNEL_CAPS;
  52. /* dwFlags of CHANNEL_CAPS */
  53. #define VCAPS_OVERLAY 0x00000001 /* overlay channel */
  54. #define VCAPS_SRC_CAN_CLIP 0x00000002 /* src rect can clip */
  55. #define VCAPS_DST_CAN_CLIP 0x00000004 /* dst rect can clip */
  56. #define VCAPS_CAN_SCALE 0x00000008 /* allows src != dst */
  57. #endif
  58. /****************************************************************************
  59. video APIs
  60. ****************************************************************************/
  61. DWORD WINAPI videoGetNumDevs(void);
  62. DWORD WINAPI videoOpen (LPHVIDEO lphVideo,
  63. DWORD dwDevice, DWORD dwFlags);
  64. DWORD WINAPI videoClose (HVIDEO hVideo);
  65. DWORD WINAPI videoDialog(HVIDEO hVideo, HWND hWndParent, DWORD dwFlags);
  66. DWORD WINAPI videoGetChannelCaps(HVIDEO hVideo, LPCHANNEL_CAPS lpChannelCaps,
  67. DWORD dwSize);
  68. DWORD WINAPI videoUpdate (HVIDEO hVideo, HWND hWnd, HDC hDC);
  69. DWORD WINAPI videoConfigure (HVIDEO hVideo, UINT msg, DWORD dwFlags,
  70. LPDWORD lpdwReturn, LPVOID lpData1, DWORD dwSize1,
  71. LPVOID lpData2, DWORD dwSize2);
  72. DWORD WINAPI videoConfigureStorageA(HVIDEO hVideo,
  73. LPSTR lpstrIdent, DWORD dwFlags);
  74. DWORD WINAPI videoConfigureStorageW(HVIDEO hVideo,
  75. LPWSTR lpstrIdent, DWORD dwFlags);
  76. #ifdef UNICODE
  77. #define videoConfigureStorage videoConfigureStorageW
  78. #else
  79. #define videoConfigureStorage videoConfigureStorageA
  80. #endif // !UNICODE
  81. DWORD WINAPI videoFrame(HVIDEO hVideo, LPVIDEOHDR lpVHdr);
  82. DWORD WINAPI videoMessage(HVIDEO hVideo, UINT msg, LPARAM dwP1, LPARAM dwP2);
  83. /* streaming APIs */
  84. DWORD WINAPI videoStreamAddBuffer(HVIDEO hVideo,
  85. LPVIDEOHDR lpVHdr, DWORD dwSize);
  86. DWORD WINAPI videoStreamGetError(HVIDEO hVideo, LPDWORD lpdwErrorFirst,
  87. LPDWORD lpdwErrorLast);
  88. DWORD WINAPI videoGetErrorTextA(HVIDEO hVideo, UINT wError,
  89. LPSTR lpText, UINT wSize);
  90. DWORD WINAPI videoGetErrorTextW(HVIDEO hVideo, UINT wError,
  91. LPWSTR lpText, UINT wSize);
  92. #ifdef UNICODE
  93. #define videoGetErrorText videoGetErrorTextW
  94. #else
  95. #define videoGetErrorText videoGetErrorTextA
  96. #endif // !UNICODE
  97. DWORD WINAPI videoStreamGetPosition(HVIDEO hVideo, MMTIME FAR* lpInfo,
  98. DWORD dwSize);
  99. DWORD WINAPI videoStreamInit(HVIDEO hVideo,
  100. DWORD dwMicroSecPerFrame, DWORD_PTR dwCallback,
  101. DWORD_PTR dwCallbackInst, DWORD dwFlags);
  102. DWORD WINAPI videoStreamFini(HVIDEO hVideo);
  103. DWORD WINAPI videoStreamPrepareHeader(HVIDEO hVideo,
  104. LPVIDEOHDR lpVHdr, DWORD dwSize);
  105. DWORD WINAPI videoStreamReset(HVIDEO hVideo);
  106. DWORD WINAPI videoStreamStart(HVIDEO hVideo);
  107. DWORD WINAPI videoStreamStop(HVIDEO hVideo);
  108. DWORD WINAPI videoStreamUnprepareHeader(HVIDEO hVideo,
  109. LPVIDEOHDR lpVHdr, DWORD dwSize);
  110. // Added post VFW1.1a
  111. DWORD WINAPI videoStreamAllocHdrAndBuffer(HVIDEO hVideo,
  112. LPVIDEOHDR FAR * plpVHdr, DWORD dwSize);
  113. DWORD WINAPI videoStreamFreeHdrAndBuffer(HVIDEO hVideo,
  114. LPVIDEOHDR lpVHdr);
  115. /****************************************************************************
  116. API Flags
  117. ****************************************************************************/
  118. // Types of channels to open with the videoOpen function
  119. #define VIDEO_EXTERNALIN 0x0001
  120. #define VIDEO_EXTERNALOUT 0x0002
  121. #define VIDEO_IN 0x0004
  122. #define VIDEO_OUT 0x0008
  123. // Is a driver dialog available for this channel?
  124. #define VIDEO_DLG_QUERY 0x0010
  125. // videoConfigure (both GET and SET)
  126. #define VIDEO_CONFIGURE_QUERY 0x8000
  127. // videoConfigure (SET only)
  128. #define VIDEO_CONFIGURE_SET 0x1000
  129. // videoConfigure (GET only)
  130. #define VIDEO_CONFIGURE_GET 0x2000
  131. #define VIDEO_CONFIGURE_QUERYSIZE 0x0001
  132. #define VIDEO_CONFIGURE_CURRENT 0x0010
  133. #define VIDEO_CONFIGURE_NOMINAL 0x0020
  134. #define VIDEO_CONFIGURE_MIN 0x0040
  135. #define VIDEO_CONFIGURE_MAX 0x0080
  136. /****************************************************************************
  137. CONFIGURE MESSAGES
  138. ****************************************************************************/
  139. #define DVM_USER 0X4000
  140. #define DVM_CONFIGURE_START 0x1000
  141. #define DVM_CONFIGURE_END 0x1FFF
  142. #define DVM_PALETTE (DVM_CONFIGURE_START + 1)
  143. #define DVM_FORMAT (DVM_CONFIGURE_START + 2)
  144. #define DVM_PALETTERGB555 (DVM_CONFIGURE_START + 3)
  145. #define DVM_SRC_RECT (DVM_CONFIGURE_START + 4)
  146. #define DVM_DST_RECT (DVM_CONFIGURE_START + 5)
  147. #endif /* ifndef _RCINVOKED */
  148. #ifdef __cplusplus
  149. } /* End of extern "C" { */
  150. #endif /* __cplusplus */
  151. #endif // _INC_VIDEO32