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.

392 lines
24 KiB

  1. /****************************************************************************
  2. *
  3. * avicap.h
  4. *
  5. * Main include file.
  6. *
  7. * Microsoft Video for Windows Sample Capture Class
  8. *
  9. * Copyright (c) 1992 - 1994 Microsoft Corporation. All Rights Reserved.
  10. *
  11. * You have a royalty-free right to use, modify, reproduce and
  12. * distribute the Sample Files (and/or any modified version) in
  13. * any way you find useful, provided that you agree that
  14. * Microsoft has no warranty obligations or liability for any
  15. * Sample Application Files which are modified.
  16. *
  17. ***************************************************************************/
  18. #ifndef _INC_AVICAP
  19. #define _INC_AVICAP
  20. #ifndef VFWAPI
  21. #ifdef WIN32
  22. #define VFWAPI _stdcall
  23. #define VFWAPIV _stdcall
  24. #else
  25. #define VFWAPI FAR PASCAL
  26. #define VFWAPIV FAR CDECL
  27. #endif
  28. #endif
  29. #ifdef __cplusplus
  30. #define AVICapSM ::SendMessage /* SendMessage in C++*/
  31. #else
  32. #define AVICapSM SendMessage /* SendMessage in C */
  33. #endif /* __cplusplus */
  34. #ifdef __cplusplus
  35. extern "C" { /* Assume C declarations for C++ */
  36. #endif /* __cplusplus */
  37. #ifndef RC_INVOKED
  38. #pragma pack(1) /* Assume byte packing throughout */
  39. #endif /* RC_INVOKED */
  40. #ifndef RC_INVOKED
  41. // ------------------------------------------------------------------
  42. // Window Messages WM_CAP... which can be sent to an AVICAP window
  43. // ------------------------------------------------------------------
  44. // Defines start of the message range
  45. #define WM_CAP_START WM_USER
  46. #define WM_CAP_GET_CAPSTREAMPTR (WM_CAP_START+ 1)
  47. #define WM_CAP_SET_CALLBACK_ERROR (WM_CAP_START+ 2)
  48. #define WM_CAP_SET_CALLBACK_STATUS (WM_CAP_START+ 3)
  49. #define WM_CAP_SET_CALLBACK_YIELD (WM_CAP_START+ 4)
  50. #define WM_CAP_SET_CALLBACK_FRAME (WM_CAP_START+ 5)
  51. #define WM_CAP_SET_CALLBACK_VIDEOSTREAM (WM_CAP_START+ 6)
  52. #define WM_CAP_SET_CALLBACK_WAVESTREAM (WM_CAP_START+ 7)
  53. #define WM_CAP_GET_USER_DATA (WM_CAP_START+ 8)
  54. #define WM_CAP_SET_USER_DATA (WM_CAP_START+ 9)
  55. #define WM_CAP_DRIVER_CONNECT (WM_CAP_START+ 10)
  56. #define WM_CAP_DRIVER_DISCONNECT (WM_CAP_START+ 11)
  57. #define WM_CAP_DRIVER_GET_NAME (WM_CAP_START+ 12)
  58. #define WM_CAP_DRIVER_GET_VERSION (WM_CAP_START+ 13)
  59. #define WM_CAP_DRIVER_GET_CAPS (WM_CAP_START+ 14)
  60. #define WM_CAP_FILE_SET_CAPTURE_FILE (WM_CAP_START+ 20)
  61. #define WM_CAP_FILE_GET_CAPTURE_FILE (WM_CAP_START+ 21)
  62. #define WM_CAP_FILE_ALLOCATE (WM_CAP_START+ 22)
  63. #define WM_CAP_FILE_SAVEAS (WM_CAP_START+ 23)
  64. #define WM_CAP_FILE_SET_INFOCHUNK (WM_CAP_START+ 24)
  65. #define WM_CAP_FILE_SAVEDIB (WM_CAP_START+ 25)
  66. #define WM_CAP_EDIT_COPY (WM_CAP_START+ 30)
  67. #define WM_CAP_SET_AUDIOFORMAT (WM_CAP_START+ 35)
  68. #define WM_CAP_GET_AUDIOFORMAT (WM_CAP_START+ 36)
  69. #define WM_CAP_DLG_VIDEOFORMAT (WM_CAP_START+ 41)
  70. #define WM_CAP_DLG_VIDEOSOURCE (WM_CAP_START+ 42)
  71. #define WM_CAP_DLG_VIDEODISPLAY (WM_CAP_START+ 43)
  72. #define WM_CAP_GET_VIDEOFORMAT (WM_CAP_START+ 44)
  73. #define WM_CAP_SET_VIDEOFORMAT (WM_CAP_START+ 45)
  74. #define WM_CAP_DLG_VIDEOCOMPRESSION (WM_CAP_START+ 46)
  75. #define WM_CAP_SET_PREVIEW (WM_CAP_START+ 50)
  76. #define WM_CAP_SET_OVERLAY (WM_CAP_START+ 51)
  77. #define WM_CAP_SET_PREVIEWRATE (WM_CAP_START+ 52)
  78. #define WM_CAP_SET_SCALE (WM_CAP_START+ 53)
  79. #define WM_CAP_GET_STATUS (WM_CAP_START+ 54)
  80. #define WM_CAP_SET_SCROLL (WM_CAP_START+ 55)
  81. #define WM_CAP_GRAB_FRAME (WM_CAP_START+ 60)
  82. #define WM_CAP_GRAB_FRAME_NOSTOP (WM_CAP_START+ 61)
  83. #define WM_CAP_SEQUENCE (WM_CAP_START+ 62)
  84. #define WM_CAP_SEQUENCE_NOFILE (WM_CAP_START+ 63)
  85. #define WM_CAP_SET_SEQUENCE_SETUP (WM_CAP_START+ 64)
  86. #define WM_CAP_GET_SEQUENCE_SETUP (WM_CAP_START+ 65)
  87. #define WM_CAP_SET_MCI_DEVICE (WM_CAP_START+ 66)
  88. #define WM_CAP_GET_MCI_DEVICE (WM_CAP_START+ 67)
  89. #define WM_CAP_STOP (WM_CAP_START+ 68)
  90. #define WM_CAP_ABORT (WM_CAP_START+ 69)
  91. #define WM_CAP_SINGLE_FRAME_OPEN (WM_CAP_START+ 70)
  92. #define WM_CAP_SINGLE_FRAME_CLOSE (WM_CAP_START+ 71)
  93. #define WM_CAP_SINGLE_FRAME (WM_CAP_START+ 72)
  94. #define WM_CAP_PAL_OPEN (WM_CAP_START+ 80)
  95. #define WM_CAP_PAL_SAVE (WM_CAP_START+ 81)
  96. #define WM_CAP_PAL_PASTE (WM_CAP_START+ 82)
  97. #define WM_CAP_PAL_AUTOCREATE (WM_CAP_START+ 83)
  98. #define WM_CAP_PAL_MANUALCREATE (WM_CAP_START+ 84)
  99. // Following added post VFW 1.1
  100. #define WM_CAP_SET_CALLBACK_CAPCONTROL (WM_CAP_START+ 85)
  101. // Defines end of the message range
  102. #define WM_CAP_END WM_CAP_SET_CALLBACK_CAPCONTROL
  103. // ------------------------------------------------------------------
  104. // Message crackers for above
  105. // ------------------------------------------------------------------
  106. #define capSetCallbackOnError(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_ERROR, 0, (LPARAM)(LPVOID)(fpProc)))
  107. #define capSetCallbackOnStatus(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_STATUS, 0, (LPARAM)(LPVOID)(fpProc)))
  108. #define capSetCallbackOnYield(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_YIELD, 0, (LPARAM)(LPVOID)(fpProc)))
  109. #define capSetCallbackOnFrame(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_FRAME, 0, (LPARAM)(LPVOID)(fpProc)))
  110. #define capSetCallbackOnVideoStream(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, (LPARAM)(LPVOID)(fpProc)))
  111. #define capSetCallbackOnWaveStream(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_WAVESTREAM, 0, (LPARAM)(LPVOID)(fpProc)))
  112. #define capSetCallbackOnCapControl(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_CAPCONTROL, 0, (LPARAM)(LPVOID)(fpProc)))
  113. #define capSetUserData(hwnd, lUser) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_USER_DATA, 0, (LPARAM)lUser))
  114. #define capGetUserData(hwnd) (AVICapSM(hwnd, WM_CAP_GET_USER_DATA, 0, 0))
  115. #define capDriverConnect(hwnd, i) ((BOOL)AVICapSM(hwnd, WM_CAP_DRIVER_CONNECT, (WPARAM)(i), 0L))
  116. #define capDriverDisconnect(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_DRIVER_DISCONNECT, (WPARAM)0, 0L))
  117. #define capDriverGetName(hwnd, szName, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_DRIVER_GET_NAME, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPSTR)(szName)))
  118. #define capDriverGetVersion(hwnd, szVer, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_DRIVER_GET_VERSION, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPSTR)(szVer)))
  119. #define capDriverGetCaps(hwnd, s, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_DRIVER_GET_CAPS, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPCAPDRIVERCAPS)(s)))
  120. #define capFileSetCaptureFile(hwnd, szName) ((BOOL)AVICapSM(hwnd, WM_CAP_FILE_SET_CAPTURE_FILE, 0, (LPARAM)(LPVOID)(LPSTR)(szName)))
  121. #define capFileGetCaptureFile(hwnd, szName, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_FILE_GET_CAPTURE_FILE, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPSTR)(szName)))
  122. #define capFileAlloc(hwnd, dwSize) ((BOOL)AVICapSM(hwnd, WM_CAP_FILE_ALLOCATE, 0, (LPARAM)(DWORD)(dwSize)))
  123. #define capFileSaveAs(hwnd, szName) ((BOOL)AVICapSM(hwnd, WM_CAP_FILE_SAVEAS, 0, (LPARAM)(LPVOID)(LPSTR)(szName)))
  124. #define capFileSetInfoChunk(hwnd, lpInfoChunk) ((BOOL)AVICapSM(hwnd, WM_CAP_FILE_SET_INFOCHUNK, (WPARAM)0, (LPARAM)(LPCAPINFOCHUNK)(lpInfoChunk)))
  125. #define capFileSaveDIB(hwnd, szName) ((BOOL)AVICapSM(hwnd, WM_CAP_FILE_SAVEDIB, 0, (LPARAM)(LPVOID)(LPSTR)(szName)))
  126. #define capEditCopy(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_EDIT_COPY, 0, 0L))
  127. #define capSetAudioFormat(hwnd, s, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_AUDIOFORMAT, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPWAVEFORMATEX)(s)))
  128. #define capGetAudioFormat(hwnd, s, wSize) ((DWORD)AVICapSM(hwnd, WM_CAP_GET_AUDIOFORMAT, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPWAVEFORMATEX)(s)))
  129. #define capGetAudioFormatSize(hwnd) ((DWORD)AVICapSM(hwnd, WM_CAP_GET_AUDIOFORMAT, (WPARAM)0, (LPARAM) NULL))
  130. #define capDlgVideoFormat(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_DLG_VIDEOFORMAT, 0, 0L))
  131. #define capDlgVideoSource(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_DLG_VIDEOSOURCE, 0, 0L))
  132. #define capDlgVideoDisplay(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_DLG_VIDEODISPLAY, 0, 0L))
  133. #define capDlgVideoCompression(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_DLG_VIDEOCOMPRESSION, 0, 0L))
  134. #define capGetVideoFormat(hwnd, s, wSize) ((DWORD)AVICapSM(hwnd, WM_CAP_GET_VIDEOFORMAT, (WPARAM)(wSize), (LPARAM)(LPVOID)(s)))
  135. #define capGetVideoFormatSize(hwnd) ((DWORD)AVICapSM(hwnd, WM_CAP_GET_VIDEOFORMAT, 0, NULL))
  136. #define capSetVideoFormat(hwnd, s, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_VIDEOFORMAT, (WPARAM)(wSize), (LPARAM)(LPVOID)(s)))
  137. #define capPreview(hwnd, f) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_PREVIEW, (WPARAM)(BOOL)(f), 0L))
  138. #define capPreviewRate(hwnd, wMS) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_PREVIEWRATE, (WPARAM)(wMS), 0))
  139. #define capOverlay(hwnd, f) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_OVERLAY, (WPARAM)(BOOL)(f), 0L))
  140. #define capPreviewScale(hwnd, f) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_SCALE, (WPARAM)(BOOL)f, 0L))
  141. #define capGetStatus(hwnd, s, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_GET_STATUS, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPCAPSTATUS)(s)))
  142. #define capSetScrollPos(hwnd, lpP) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_SCROLL, (WPARAM)0, (LPARAM)(LPPOINT)(lpP)))
  143. #define capGrabFrame(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_GRAB_FRAME, (WPARAM)0, (LPARAM)0L))
  144. #define capGrabFrameNoStop(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_GRAB_FRAME_NOSTOP, (WPARAM)0, (LPARAM)0L))
  145. #define capCaptureSequence(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_SEQUENCE, (WPARAM)0, (LPARAM)0L))
  146. #define capCaptureSequenceNoFile(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_SEQUENCE_NOFILE, (WPARAM)0, (LPARAM)0L))
  147. #define capCaptureStop(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_STOP, (WPARAM)0, (LPARAM)0L))
  148. #define capCaptureAbort(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_ABORT, (WPARAM)0, (LPARAM)0L))
  149. #define capCaptureSingleFrameOpen(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_SINGLE_FRAME_OPEN, (WPARAM)0, (LPARAM)0L))
  150. #define capCaptureSingleFrameClose(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_SINGLE_FRAME_CLOSE, (WPARAM)0, (LPARAM)0L))
  151. #define capCaptureSingleFrame(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_SINGLE_FRAME, (WPARAM)0, (LPARAM)0L))
  152. #define capCaptureGetSetup(hwnd, s, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_GET_SEQUENCE_SETUP, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPCAPTUREPARMS)(s)))
  153. #define capCaptureSetSetup(hwnd, s, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_SEQUENCE_SETUP, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPCAPTUREPARMS)(s)))
  154. #define capSetMCIDeviceName(hwnd, szName) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_MCI_DEVICE, 0, (LPARAM)(LPVOID)(LPSTR)(szName)))
  155. #define capGetMCIDeviceName(hwnd, szName, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_GET_MCI_DEVICE, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPSTR)(szName)))
  156. #define capPaletteOpen(hwnd, szName) ((BOOL)AVICapSM(hwnd, WM_CAP_PAL_OPEN, 0, (LPARAM)(LPVOID)(LPSTR)(szName)))
  157. #define capPaletteSave(hwnd, szName) ((BOOL)AVICapSM(hwnd, WM_CAP_PAL_SAVE, 0, (LPARAM)(LPVOID)(LPSTR)(szName)))
  158. #define capPalettePaste(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_PAL_PASTE, (WPARAM) 0, (LPARAM)0L))
  159. #define capPaletteAuto(hwnd, iFrames, iColors) ((BOOL)AVICapSM(hwnd, WM_CAP_PAL_AUTOCREATE, (WPARAM)(iFrames), (LPARAM)(DWORD)(iColors)))
  160. #define capPaletteManual(hwnd, fGrab, iColors) ((BOOL)AVICapSM(hwnd, WM_CAP_PAL_MANUALCREATE, (WPARAM)(fGrab), (LPARAM)(DWORD)(iColors)))
  161. // ------------------------------------------------------------------
  162. // Structures
  163. // ------------------------------------------------------------------
  164. typedef struct tagCapDriverCaps {
  165. WORD wDeviceIndex; // Driver index in system.ini
  166. BOOL fHasOverlay; // Can device overlay?
  167. BOOL fHasDlgVideoSource; // Has Video source dlg?
  168. BOOL fHasDlgVideoFormat; // Has Format dlg?
  169. BOOL fHasDlgVideoDisplay; // Has External out dlg?
  170. BOOL fCaptureInitialized; // Driver ready to capture?
  171. BOOL fDriverSuppliesPalettes; // Can driver make palettes?
  172. HVIDEO hVideoIn; // Driver In channel
  173. HVIDEO hVideoOut; // Driver Out channel
  174. HVIDEO hVideoExtIn; // Driver Ext In channel
  175. HVIDEO hVideoExtOut; // Driver Ext Out channel
  176. } CAPDRIVERCAPS, *PCAPDRIVERCAPS, FAR *LPCAPDRIVERCAPS;
  177. typedef struct tagCapStatus {
  178. UINT uiImageWidth; // Width of the image
  179. UINT uiImageHeight; // Height of the image
  180. BOOL fLiveWindow; // Now Previewing video?
  181. BOOL fOverlayWindow; // Now Overlaying video?
  182. BOOL fScale; // Scale image to client?
  183. POINT ptScroll; // Scroll position
  184. BOOL fUsingDefaultPalette; // Using default driver palette?
  185. BOOL fAudioHardware; // Audio hardware present?
  186. BOOL fCapFileExists; // Does capture file exist?
  187. DWORD dwCurrentVideoFrame; // # of video frames cap'td
  188. DWORD dwCurrentVideoFramesDropped;// # of video frames dropped
  189. DWORD dwCurrentWaveSamples; // # of wave samples cap'td
  190. DWORD dwCurrentTimeElapsedMS; // Elapsed capture duration
  191. HPALETTE hPalCurrent; // Current palette in use
  192. BOOL fCapturingNow; // Capture in progress?
  193. DWORD dwReturn; // Error value after any operation
  194. WORD wNumVideoAllocated; // Actual number of video buffers
  195. WORD wNumAudioAllocated; // Actual number of audio buffers
  196. } CAPSTATUS, *PCAPSTATUS, FAR *LPCAPSTATUS;
  197. // Default values in parenthesis
  198. typedef struct tagCaptureParms {
  199. DWORD dwRequestMicroSecPerFrame; // Requested capture rate
  200. BOOL fMakeUserHitOKToCapture; // Show "Hit OK to cap" dlg?
  201. WORD wPercentDropForError; // Give error msg if > (10%)
  202. BOOL fYield; // Capture via background task?
  203. DWORD dwIndexSize; // Max index size in frames (32K)
  204. WORD wChunkGranularity; // Junk chunk granularity (2K)
  205. BOOL fUsingDOSMemory; // Use DOS buffers?
  206. WORD wNumVideoRequested; // # video buffers, If 0, autocalc
  207. BOOL fCaptureAudio; // Capture audio?
  208. WORD wNumAudioRequested; // # audio buffers, If 0, autocalc
  209. WORD vKeyAbort; // Virtual key causing abort
  210. BOOL fAbortLeftMouse; // Abort on left mouse?
  211. BOOL fAbortRightMouse; // Abort on right mouse?
  212. BOOL fLimitEnabled; // Use wTimeLimit?
  213. WORD wTimeLimit; // Seconds to capture
  214. BOOL fMCIControl; // Use MCI video source?
  215. BOOL fStepMCIDevice; // Step MCI device?
  216. DWORD dwMCIStartTime; // Time to start in MS
  217. DWORD dwMCIStopTime; // Time to stop in MS
  218. BOOL fStepCaptureAt2x; // Perform spatial averaging 2x
  219. WORD wStepCaptureAverageFrames; // Temporal average n Frames
  220. DWORD dwAudioBufferSize; // Size of audio bufs (0 = default)
  221. BOOL fDisableWriteCache; // Attempt to disable write cache
  222. } CAPTUREPARMS, *PCAPTUREPARMS, FAR *LPCAPTUREPARMS;
  223. typedef struct tagCapInfoChunk {
  224. FOURCC fccInfoID; // Chunk ID, "ICOP" for copyright
  225. LPVOID lpData; // pointer to data
  226. LONG cbData; // size of lpData
  227. } CAPINFOCHUNK, *PCAPINFOCHUNK, FAR *LPCAPINFOCHUNK;
  228. // ------------------------------------------------------------------
  229. // Callback Definitions
  230. // ------------------------------------------------------------------
  231. typedef LRESULT (CALLBACK* CAPYIELDCALLBACK) (HWND hWnd);
  232. typedef LRESULT (CALLBACK* CAPSTATUSCALLBACK) (HWND hWnd, int nID, LPCSTR lpsz);
  233. typedef LRESULT (CALLBACK* CAPERRORCALLBACK) (HWND hWnd, int nID, LPCSTR lpsz);
  234. typedef LRESULT (CALLBACK* CAPVIDEOCALLBACK) (HWND hWnd, LPVIDEOHDR lpVHdr);
  235. typedef LRESULT (CALLBACK* CAPWAVECALLBACK) (HWND hWnd, LPWAVEHDR lpWHdr);
  236. typedef LRESULT (CALLBACK* CAPCONTROLCALLBACK)(HWND hWnd, int nState);
  237. // ------------------------------------------------------------------
  238. // CapControlCallback states
  239. // ------------------------------------------------------------------
  240. #define CONTROLCALLBACK_PREROLL 1 /* Waiting to start capture */
  241. #define CONTROLCALLBACK_CAPTURING 2 /* Now capturing */
  242. // ------------------------------------------------------------------
  243. // The only exported functions from AVICAP.DLL
  244. // ------------------------------------------------------------------
  245. HWND VFWAPI capCreateCaptureWindow (
  246. LPCSTR lpszWindowName,
  247. DWORD dwStyle,
  248. int x, int y, int nWidth, int nHeight,
  249. HWND hwndParent, int nID);
  250. BOOL VFWAPI capGetDriverDescription (WORD wDriverIndex,
  251. LPSTR lpszName, int cbName,
  252. LPSTR lpszVer, int cbVer);
  253. #endif /* RC_INVOKED */
  254. // ------------------------------------------------------------------
  255. // New Information chunk IDs
  256. // ------------------------------------------------------------------
  257. #define infotypeDIGITIZATION_TIME mmioFOURCC ('I','D','I','T')
  258. #define infotypeSMPTE_TIME mmioFOURCC ('I','S','M','P')
  259. // ------------------------------------------------------------------
  260. // String IDs from status and error callbacks
  261. // ------------------------------------------------------------------
  262. #define IDS_CAP_BEGIN 300 /* "Capture Start" */
  263. #define IDS_CAP_END 301 /* "Capture End" */
  264. #define IDS_CAP_INFO 401 /* "%s" */
  265. #define IDS_CAP_OUTOFMEM 402 /* "Out of memory" */
  266. #define IDS_CAP_FILEEXISTS 403 /* "File '%s' exists -- overwrite it?" */
  267. #define IDS_CAP_ERRORPALOPEN 404 /* "Error opening palette '%s'" */
  268. #define IDS_CAP_ERRORPALSAVE 405 /* "Error saving palette '%s'" */
  269. #define IDS_CAP_ERRORDIBSAVE 406 /* "Error saving frame '%s'" */
  270. #define IDS_CAP_DEFAVIEXT 407 /* "avi" */
  271. #define IDS_CAP_DEFPALEXT 408 /* "pal" */
  272. #define IDS_CAP_CANTOPEN 409 /* "Cannot open '%s'" */
  273. #define IDS_CAP_SEQ_MSGSTART 410 /* "Select OK to start capture\nof video sequence\nto %s." */
  274. #define IDS_CAP_SEQ_MSGSTOP 411 /* "Hit ESCAPE or click to end capture" */
  275. #define IDS_CAP_VIDEDITERR 412 /* "An error occurred while trying to run VidEdit." */
  276. #define IDS_CAP_READONLYFILE 413 /* "The file '%s' is a read-only file." */
  277. #define IDS_CAP_WRITEERROR 414 /* "Unable to write to file '%s'.\nDisk may be full." */
  278. #define IDS_CAP_NODISKSPACE 415 /* "There is no space to create a capture file on the specified device." */
  279. #define IDS_CAP_SETFILESIZE 416 /* "Set File Size" */
  280. #define IDS_CAP_SAVEASPERCENT 417 /* "SaveAs: %2ld%% Hit Escape to abort." */
  281. #define IDS_CAP_DRIVER_ERROR 418 /* Driver specific error message */
  282. #define IDS_CAP_WAVE_OPEN_ERROR 419 /* "Error: Cannot open the wave input device.\nCheck sample size, frequency, and channels." */
  283. #define IDS_CAP_WAVE_ALLOC_ERROR 420 /* "Error: Out of memory for wave buffers." */
  284. #define IDS_CAP_WAVE_PREPARE_ERROR 421 /* "Error: Cannot prepare wave buffers." */
  285. #define IDS_CAP_WAVE_ADD_ERROR 422 /* "Error: Cannot add wave buffers." */
  286. #define IDS_CAP_WAVE_SIZE_ERROR 423 /* "Error: Bad wave size." */
  287. #define IDS_CAP_VIDEO_OPEN_ERROR 424 /* "Error: Cannot open the video input device." */
  288. #define IDS_CAP_VIDEO_ALLOC_ERROR 425 /* "Error: Out of memory for video buffers." */
  289. #define IDS_CAP_VIDEO_PREPARE_ERROR 426 /* "Error: Cannot prepare video buffers." */
  290. #define IDS_CAP_VIDEO_ADD_ERROR 427 /* "Error: Cannot add video buffers." */
  291. #define IDS_CAP_VIDEO_SIZE_ERROR 428 /* "Error: Bad video size." */
  292. #define IDS_CAP_FILE_OPEN_ERROR 429 /* "Error: Cannot open capture file." */
  293. #define IDS_CAP_FILE_WRITE_ERROR 430 /* "Error: Cannot write to capture file. Disk may be full." */
  294. #define IDS_CAP_RECORDING_ERROR 431 /* "Error: Cannot write to capture file. Data rate too high or disk full." */
  295. #define IDS_CAP_RECORDING_ERROR2 432 /* "Error while recording" */
  296. #define IDS_CAP_AVI_INIT_ERROR 433 /* "Error: Unable to initialize for capture." */
  297. #define IDS_CAP_NO_FRAME_CAP_ERROR 434 /* "Warning: No frames captured.\nConfirm that vertical sync interrupts\nare configured and enabled." */
  298. #define IDS_CAP_NO_PALETTE_WARN 435 /* "Warning: Using default palette." */
  299. #define IDS_CAP_MCI_CONTROL_ERROR 436 /* "Error: Unable to access MCI device." */
  300. #define IDS_CAP_MCI_CANT_STEP_ERROR 437 /* "Error: Unable to step MCI device." */
  301. #define IDS_CAP_NO_AUDIO_CAP_ERROR 438 /* "Error: No audio data captured.\nCheck audio card settings." */
  302. #define IDS_CAP_AVI_DRAWDIB_ERROR 439 /* "Error: Unable to draw this data format." */
  303. #define IDS_CAP_COMPRESSOR_ERROR 440 /* "Error: Unable to initialize compressor." */
  304. #define IDS_CAP_AUDIO_DROP_ERROR 441 /* "Error: Audio data was lost during capture, reduce capture rate." */
  305. /* status string IDs */
  306. #define IDS_CAP_STAT_LIVE_MODE 500 /* "Live window" */
  307. #define IDS_CAP_STAT_OVERLAY_MODE 501 /* "Overlay window" */
  308. #define IDS_CAP_STAT_CAP_INIT 502 /* "Setting up for capture - Please wait" */
  309. #define IDS_CAP_STAT_CAP_FINI 503 /* "Finished capture, now writing frame %ld" */
  310. #define IDS_CAP_STAT_PALETTE_BUILD 504 /* "Building palette map" */
  311. #define IDS_CAP_STAT_OPTPAL_BUILD 505 /* "Computing optimal palette" */
  312. #define IDS_CAP_STAT_I_FRAMES 506 /* "%d frames" */
  313. #define IDS_CAP_STAT_L_FRAMES 507 /* "%ld frames" */
  314. #define IDS_CAP_STAT_CAP_L_FRAMES 508 /* "Captured %ld frames" */
  315. #define IDS_CAP_STAT_CAP_AUDIO 509 /* "Capturing audio" */
  316. #define IDS_CAP_STAT_VIDEOCURRENT 510 /* "Captured %ld frames (%ld dropped) %d.%03d sec." */
  317. #define IDS_CAP_STAT_VIDEOAUDIO 511 /* "Captured %d.%03d sec. %ld frames (%ld dropped) (%d.%03d fps). %ld audio bytes (%d,%03d sps)" */
  318. #define IDS_CAP_STAT_VIDEOONLY 512 /* "Captured %d.%03d sec. %ld frames (%ld dropped) (%d.%03d fps)" */
  319. #define IDS_CAP_STAT_FRAMESDROPPED 513 /* "Dropped %ld of %ld frames (%d.%02d%%) during capture." */
  320. #ifndef RC_INVOKED
  321. #pragma pack() /* Revert to default packing */
  322. #endif /* RC_INVOKED */
  323. #ifdef __cplusplus
  324. } /* End of extern "C" { */
  325. #endif /* __cplusplus */
  326. #endif /* INC_AVICAP */
  327.