AV8api.h
上传用户:hxb_1234
上传日期:2010-03-30
资源大小:8328k
文件大小:17k
源码类别:

VC书籍

开发平台:

Visual C++

  1. /****************************************************************************
  2.  *
  3.  *   AV8API.h
  4.  * 
  5.  *   Main interface   
  6.  *
  7.  ***************************************************************************/
  8. /**************************************************************************
  9.  *
  10.  *  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  11.  *  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  12.  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  13.  *  PURPOSE.
  14.  *
  15.  *  Copyright (c) 1998 TST International, Co.  All Rights Reserved.
  16.  * 
  17.  **************************************************************************/
  18. #ifndef AV8API_H
  19. #define AV8API_H
  20. //
  21. // Array VideoFlow API header file (an OM-1 API like interface)
  22. //
  23. #define VF_MAX_DEVICES 10
  24. #define VF_DISPLAYNAME "Device"
  25. #define VF_ILLEGAL_POS (-32000)
  26. // separate capabilities to be defined
  27. #define VF_CAP_ALL (-1)
  28. //
  29. // API commands
  30. //
  31. #define VF_CMD_OPEN 0x01
  32. #define VF_CMD_CLOSE 0x02
  33. #define VF_CMD_PLAY 0x03
  34. #define VF_CMD_PAUSE 0x04
  35. #define VF_CMD_STOP 0x05
  36. #define VF_CMD_SEEK 0x06
  37. #define VF_CMD_STEP 0x07
  38. #define VF_CMD_SET 0x09
  39. #define VF_CMD_GET 0x0A
  40. #define VF_CMD_TRANSCODE_SET 0x14
  41. #define VF_CMD_RECORD 0xF0
  42. #define VF_CMD_RESUME 0xF1
  43. #define VF_CMD_IS_OVERLAY 0x41
  44. #define VF_CMD_PAINT_OVERLAY 0x42
  45. #define VF_CMD_GET_OVERLAY_CAPS 0x43
  46. #define VF_CMD_USE_OVERLAY_CAPS 0x44
  47. #define VF_CMD_SET_OVERLAY_WND 0x45
  48. #define VF_CMD_SET_OVERLAY_POS 0x46
  49. #define VF_CMD_SET_OVERLAY_DST 0x47
  50. #define VF_CMD_SET_OVERLAY_SRC 0x48
  51. #define VF_CMD_UNLOAD_OVERLAY 0x49
  52. // rke: these are optional commands for multidevice support
  53. #define VF_CMD_ASSIGN 0x51
  54. #define VF_CMD_INFO 0x52
  55. #define VF_CMD_LOCK 0x53
  56. #define VF_CMD_UNLOCK 0x54
  57. #define VF_CMD_REFDATA 0x61
  58. //
  59. // driver errors/status
  60. #define VF_ERR_NOERR 0x0000
  61. #define VF_ERR_INVALID_FLAGS 0x0200 // invalid or incoherent flags
  62. #define VF_ERR_INDEX 0x0700 // get/set index invalid
  63. #define VF_ERR_VALUE 0x1200 // invalid value
  64. #define VF_ERR_DISK_FULL 0xffffffff
  65.   
  66. //
  67. // callback messages
  68. //
  69. #define VF_MSG_BUF_WRITE 0x03
  70. #define VF_MSG_BUF_CREATE 0x04
  71. #define VF_MSG_BUF_CLOSE 0x05
  72. #define VF_SUBMSG_OUTPUT 0x0002
  73. #define VF_MSGUSER_BUF_WRITE WM_USER + VF_MSG_BUF_WRITE
  74. #define VF_MSGUSER_BUF_CREATE WM_USER + VF_MSG_BUF_CREATE
  75. #define VF_MSGUSER_BUF_CLOSE WM_USER + VF_MSG_BUF_CLOSE
  76. //
  77. // callback structure
  78. //
  79. #pragma pack(4)
  80. typedef struct tagVF_CALLBACK_STRUCT
  81. {
  82. BYTE hStream; // stream handle
  83. WPARAM wSubMsg; // sub message
  84. } VF_CALLBACK_STRUCT, *PVF_CALLBACK_STRUCT, *LPVF_CALLBACK_STRUCT;
  85. #pragma pack(4)
  86. typedef struct tagVF_BUFWRITE_STRUCT
  87. {
  88. VF_CALLBACK_STRUCT vfcallback;
  89. BYTE *lpBuffer; // pointer to the driver buffer
  90. DWORD dwBufferSize; // size of the buffer in bytes
  91. DWORD dwBufferWrite; // encoded data length in bytes
  92. } VF_BUFWRITE_STRUCT, *PVF_BUFWRITE_STRUCT, *LPVF_BUFWRITE_STRUCT;
  93. typedef struct tagVF_TRANSCODE
  94. {
  95. WORD wAlgorithm;
  96. WORD wChannel;
  97. DWORD dwSampleRate;
  98. DWORD dwBitRate;
  99. WORD wMode;
  100. } VF_TRANSCODE;
  101. #pragma pack()
  102. // rke: definition of VF_CALLBACK (prototype for callback functions)
  103. typedef WORD (CALLBACK *VF_CALLBACK)(HANDLE hDriver, UINT msg, DWORD dwUser, 
  104.  DWORD dwParam1, DWORD dwParam2);
  105. /*
  106. // C sample callback function
  107. WORD CALLBACK MyCallback(HANDLE hDriver, UINT msg, DWORD dwUser, 
  108.  DWORD dwParam1, DWORD dwParam2)
  109. {
  110. // hDriver unused
  111. // dwUser unused
  112. //
  113. PVF_BUFWRITE_STRUCT pbw = (PVF_BUFWRITE_STRUCT)dwParam1;
  114. PVOID pvRefData = (PVOID)dwParam2;
  115. switch (msg) {
  116. case VF_MSG_BUF_CREATE + WM_USER:
  117. break;
  118. case VF_MSG_BUF_WRITE + WM_USER: 
  119. break;
  120. case VF_MSG_BUF_CLOSE + WM_USER:
  121. break;
  122. default:;
  123. }
  124. return 0;
  125. }
  126. // to test type compatibility
  127. VF_CALLBACK pCallback = MyCallback;
  128. */
  129. //
  130. // flags
  131. //
  132. //
  133. // open flags
  134. //
  135. #define VF_FLAG_UNKNOWN 0x0000
  136. // algorithm
  137. #define VF_FLAG_MPEG 0x0001
  138. #define VF_FLAG_H261 0x0002
  139. #define VF_FLAG_G711 0x0003
  140. // session
  141. #define VF_FLAG_ENCODE 0x0010
  142. #define VF_FLAG_DECODE 0x0020
  143. // source
  144. #define VF_FLAG_FILE 0x0100
  145. #define VF_FLAG_BUFFER 0x0400
  146. // output
  147. #define VF_FLAG_OUTFILE 0x2000
  148. #define VF_FLAG_OUTBUF 0x3000
  149. // stream type
  150. #define VF_FLAG_MPGAUD 0x0001
  151. #define VF_FLAG_MPGVID 0x0002
  152. #define VF_FLAG_MPGSYS 0x0005
  153. #define VF_FLAG_TYPE_H261 0x0007
  154. #define VF_FLAG_TYPE_G711 0x0008
  155. // state
  156. #define VF_FLAG_STOPPED 0x0002
  157. #define VF_FLAG_PLAYING 0x0004
  158. //
  159. // encoding flags
  160. //
  161. // Setup WMPG32 driver mode either VF_DRV_DIRECT or VF_DRV_TRANSCODE 
  162. // VF_DRV_DIRECT for Simapp. default mode
  163. // VF_DRV_TRANSCODE for Video for Windows
  164. #define VF_DRV_DIRECT 0x0001
  165. #define VF_DRV_TRANSCODE 0x0002
  166. // transcode set 
  167. #define VF_FLAG_TRANSCODE_DRV_MODE 0x0001
  168. #define VF_FLAG_TRANSCODE_AUDIO_ALGORITHM 0x0002
  169. #define VF_FLAG_TRANSCODE_AUDIO_CHANNEL 0x0003
  170. #define VF_FLAG_TRANSCODE_AUDIO_SAMPLERATE 0x0004
  171. #define VF_FLAG_TRANSCODE_AUDIO_BITRATE 0x0005
  172. #define VF_FLAG_TRANSCODE_AUDIO_MODE 0x0006
  173. // system setting
  174. // encode mode
  175. #define VF_FLAG_STM_NORMAL 0x0000
  176. #define VF_FLAG_STM_VCD 0x0001
  177. // video setting
  178. // picture rate
  179. #define VF_FLAG_VID_23967 0x0001
  180. #define VF_FLAG_VID_24 0x0002
  181. #define VF_FLAG_VID_25 0x0003
  182. #define VF_FLAG_VID_2997 0x0004
  183. //#define VF_FLAG_VID_30 0x0005
  184. //#define VF_FLAG_VID_50 0x0006
  185. //#define VF_FLAG_VID_5994 0x0007
  186. //#define VF_FLAG_VID_60 0x0008
  187. //#define VF_FLAG_VID_14985 0x0009
  188. //#define VF_FLAG_VID_999 0x000A
  189. #define VF_FLAG_VID_7498 0x000B
  190. // encode type
  191. //#define VF_FLAG_VID_IPB 0x0000 // mpeg IPB
  192. //#define VF_FLAG_VID_I 0x0001 // mpeg I only
  193. // video input source
  194. #define VF_FLAG_VID_COMPOSITE 0x0000
  195. #define VF_FLAG_VID_SVHS 0x0001
  196. //#define VF_FLAG_VID_EXTRA 0x0002
  197. // mode (input format)
  198. #define VF_FLAG_VID_AUTOFORMAT 0x0000 // used in VOne
  199. #define VF_FLAG_VID_NTSC 0x0001 // used in VOne
  200. #define VF_FLAG_VID_PAL 0x0003 // used in VOne
  201. //#define VF_FLAG_VID_PAL_M 0x0004
  202. //#define VF_FLAG_VID_PAL_N 0x0005
  203. //#define VF_FLAG_VID_SECAM 0x0006
  204. // Video Algorithm
  205. #define VF_FLAG_VID_MPEG 0x0000
  206. #define VF_FLAG_VID_H261 0x0001
  207. // audio setting
  208. // layer
  209. #define VF_FLAG_AUD_LAYER1 0x0001
  210. #define VF_FLAG_AUD_LAYER2 0x0002
  211. #define VF_FLAG_AUD_LAYER3 0x0004
  212. // bitrate
  213. #define VF_FLAG_AUD_32K                 0x00000001
  214. #define VF_FLAG_AUD_48K                 0x00000002
  215. #define VF_FLAG_AUD_56K                 0x00000003
  216. #define VF_FLAG_AUD_64K                 0x00000004
  217. #define VF_FLAG_AUD_80K                 0x00000005
  218. #define VF_FLAG_AUD_96K                 0x00000006
  219. #define VF_FLAG_AUD_112K                0x00000007
  220. #define VF_FLAG_AUD_128K                0x00000008
  221. #define VF_FLAG_AUD_160K                0x00000009
  222. #define VF_FLAG_AUD_192K                0x0000000A
  223. #define VF_FLAG_AUD_224K                0x0000000B
  224. #define VF_FLAG_AUD_256K                0x0000000C
  225. #define VF_FLAG_AUD_320K                0x0000000D
  226. #define VF_FLAG_AUD_384K                0x0000000E
  227. //bitrate -- Video Conferencing application
  228. //#define VF_FLAG_AUD_16K                 0x00000100
  229. //#define VF_FLAG_AUD_64000               0x00000101
  230. // sample
  231. #define VF_FLAG_AUD_SMP_44K             0x00000000
  232. #define VF_FLAG_AUD_SMP_48K             0x00000001
  233. #define VF_FLAG_AUD_SMP_32K             0x00000002
  234. // sample -- Video Conferencing application
  235. //#define VF_FLAG_AUD_SMP_22K             0x00000100
  236. //#define VF_FLAG_AUD_SMP_11K             0x00000101
  237. //#define VF_FLAG_AUD_SMP_8000            0x00000102
  238. // mode
  239. #define VF_FLAG_AUD_STEREO 0x0000
  240. #define VF_FLAG_AUD_JOINTSTEREO 0x0001
  241. #define VF_FLAG_AUD_DUALCHANNEL 0x0002
  242. #define VF_FLAG_AUD_SINGLECHANNEL 0x0003
  243. // input
  244. #define VF_FLAG_AUD_LINEIN 0x0000
  245. //#define VF_FLAG_AUD_CD 0x0001
  246. //#define VF_FLAG_AUD_MIC 0x0002
  247. // Audio Algorithm
  248. #define VF_FLAG_AUD_MPEG 0x0000
  249. //#define VF_FLAG_AUD_PCM 0x0001
  250. //#define VF_FLAG_AUD_G711ALAW 0x0002
  251. //#define VF_FLAG_AUD_G711ULAW 0x0003
  252. //#define VF_FLAG_AUD_G722 0x0004
  253. //#define VF_FLAG_AUD_G723 0x0005
  254. //#define VF_FLAG_AUD_G728 0x0006
  255. //#define VF_FLAG_AUD_G729 0x0007
  256. //#define VF_FLAG_AUD_PCMTOMPEG 0x0008
  257. #define VF_FLAG_AUD_NONE 0xFFFF
  258. // Audio Channel
  259. //#define VF_FLAG_AUD_1CHANNEL 0x0000
  260. //#define VF_FLAG_AUD_2CHANNEL 0x0001
  261. //
  262. // Index(set/get)
  263. //
  264. //#define VF_INDEX_DRV_PRODUCT 0x0101
  265. //#define VF_INDEX_DRV_VERSION 0x0102
  266. //#define VF_INDEX_DRV_AUD_SUP 0x0105
  267. //#define VF_INDEX_DRV_HRD_STAT 0x0110
  268. //#define VF_INDEX_DRV_CAPS 0x0111
  269. //#define VF_INDEX_DRV_PARSE_PRIV 0x0112
  270. //#define VF_INDEX_API_VERSION 0x0113
  271. #define VF_INDEX_SYS_WINDOW_HANDLE 0x0114
  272. #define VF_INDEX_STM_TYPE 0x0202
  273. #define VF_INDEX_STM_SOURCE 0x0203
  274. #define VF_INDEX_STM_MODE 0x0204
  275. #define VF_INDEX_STM_TIME_FMT 0x0205
  276. #define VF_INDEX_STM_POSITION 0x0206
  277. #define VF_INDEX_STM_FILESIZE 0x0207
  278. #define VF_INDEX_STM_USER 0x0208
  279. #define VF_INDEX_STM_ENCODEMODE 0x0210
  280. #define VF_INDEX_STM_PKTCTRL 0x0220
  281. #define VF_INDEX_STM_CURRENTPLAYTIME 0x0221
  282. #define VF_INDEX_STM_TOTALPLAYTIME 0x0222
  283. #define VF_INDEX_STM_STATUS 0x0223
  284. #define VF_INDEX_STM_BUFFERLEVEL 0x02F0 // private command
  285. #define VF_INDEX_VID_RATE 0x0402 // frame rate
  286. #define VF_INDEX_VID_SIZE 0x0403 // video size
  287. #define VF_INDEX_VID_POSITION 0x0404 // current video position
  288. #define VF_INDEX_VID_SRC_POS 0x0406 // overlay
  289. #define VF_INDEX_VID_SRC_SIZE 0x0407 // overlay
  290. #define VF_INDEX_VID_DEST_POS 0x0408 // overlay
  291. #define VF_INDEX_VID_DEST_SIZE 0x0409 // overlay
  292. #define VF_INDEX_VID_KEY_MIN 0x040A // overlay
  293. #define VF_INDEX_VID_KEY_MAX 0x040B // overlay
  294. #define VF_INDEX_VID_KEY_MASK 0x040C // overlay
  295. #define VF_INDEX_VID_KEY_COL 0x040D // overlay
  296. #define VF_INDEX_VID_KEY_MODE 0x040E // overlay
  297. #define VF_INDEX_VID_KEY_COLOR_SPACE 0x0410
  298. #define VF_INDEX_VID_CAP_POS 0x0411
  299. #define VF_INDEX_VID_CAP_SIZE 0x0412
  300. #define VF_INDEX_VID_STOP_MODE 0x0413
  301. #define VF_INDEX_VID_BITRATE 0x0414 // video bitrate
  302. #define VF_INDEX_VID_ENCODETYPE 0x0415 // encode type (IPB, I)
  303. #define VF_INDEX_VID_SOURCE 0x0416 // video input
  304. #define VF_INDEX_VID_MODE 0x0417 // video mode (NTSC, PAL)
  305. #define VF_INDEX_VID_INPUTSIZE 0x0420
  306. #define VF_INDEX_VID_INPUTOFFSET 0x0421
  307. #define VF_INDEX_VID_BRIGHTNESS 0x0422
  308. #define VF_INDEX_VID_CONTRAST 0x0423
  309. #define VF_INDEX_VID_HUE 0x0424
  310. #define VF_INDEX_VID_SATURATION 0x0425
  311. #define VF_INDEX_VID_CONSTRAIN 0x0430
  312. #define VF_INDEX_VID_OUTPUTSIZE 0x0431
  313. #define VF_INDEX_VID_OUTPUTOFFSET 0x0432
  314. #define VF_INDEX_VID_VBVSIZE 0x0433
  315. #define VF_INDEX_VID_VBVDELAY 0x0434
  316. #define VF_INDEX_VID_INITIALSMPTE 0x0435
  317. #define VF_INDEX_VID_INITIALDELAY 0x0436
  318. #define VF_INDEX_VID_IINTERVAL 0x0437
  319. #define VF_INDEX_VID_BINTERVAL 0x0438 // how many B frames between I, P frames
  320. #define VF_INDEX_VID_GOPINTERVAL 0x0439
  321. #define VF_INDEX_VID_SEQINTERVAL 0x043A
  322. #define VF_INDEX_VID_QMATRIX 0x0440
  323. #define VF_INDEX_VID_QMATRIXSCALE 0x0441
  324. #define VF_INDEX_VID_IPERCENTBITS 0x0450
  325. #define VF_INDEX_VID_PPERCENTBITS 0x0451
  326. #define VF_INDEX_VID_BPERCENTBITS 0x0452
  327. #define VF_INDEX_VID_LEAKPERCENT 0x0453
  328. #define VF_INDEX_VID_IRATECTRL 0x0454
  329. #define VF_INDEX_VID_PRATECTRL 0x0455
  330. #define VF_INDEX_VID_BRATECTRL 0x0456
  331. #define VF_INDEX_VID_IQGAIN 0x0457
  332. #define VF_INDEX_VID_PQGAIN 0x0458
  333. #define VF_INDEX_VID_BQGAIN 0x0459
  334. #define VF_INDEX_VID_INITIALAVEACT 0x045A
  335. #define VF_INDEX_VID_INITIALAGAIN 0x045B
  336. #define VF_INDEX_VID_THRESHOLDLUMA 0x0460
  337. #define VF_INDEX_VID_THRESHOLDCHROMA 0x0461
  338. #define VF_INDEX_VID_SCENEADAPT 0x0462
  339. #define VF_INDEX_VID_VARIABLEFRAMERATE 0x0463
  340. #define VF_INDEX_VID_VARIABLEBITRATE 0x0464
  341. #define VF_INDEX_VID_NUMBEROFFRAMES 0x0470
  342. #define VF_INDEX_VID_ALGORITHM 0x0480
  343. #define VF_INDEX_VID_LINECROP 0x0481
  344. #define VF_INDEX_VID_YOFFSET 0x0482
  345. #define VF_INDEX_VID_BUFFERLEVEL 0x04F0 // private command
  346. #define VF_INDEX_AUD_POSITION 0x0502
  347. #define VF_INDEX_AUD_VOLUME 0x0503
  348. #define VF_INDEX_AUD_VOLUMEL 0x0504
  349. #define VF_INDEX_AUD_VOLUMER 0x0505
  350. #define VF_INDEX_AUD_GAINL 0x0506
  351. #define VF_INDEX_AUD_GAINR 0x0507
  352. #define VF_INDEX_AUD_LAYER 0x0508
  353. #define VF_INDEX_AUD_BITRATE 0x0509
  354. #define VF_INDEX_AUD_SAMPLE 0x050A
  355. #define VF_INDEX_AUD_MODE 0x050B
  356. #define VF_INDEX_AUD_INPUT 0x050C
  357. #define VF_INDEX_AUD_ALGORITHM 0x050D
  358. #define VF_INDEX_AUD_CHANNEL 0x050E
  359. #define VF_INDEX_AUD_GAIN 0x050F
  360. #define VF_INDEX_AUD_BUFFERLEVEL 0x05F0 // private command
  361. #define VF_INDEX_OUTPUT 0xFFF0
  362. #define VF_INDEX_OUTFILE 0xFFF1
  363. #define VF_INDEX_OUTBUF 0xFFF2
  364. #define VF_INDEX_OUTHARD 0xFFF3
  365. #define VF_INDEX_OUTNULL 0xFFF4
  366. #ifdef _INC_WINDOWS
  367. // some macros for an easier writing of calls to the driver
  368. #define DRV_CMD DRV_USER + 100
  369. //#define DRV_ERR DRV_USER + 101  
  370. //#define WM_POSTMESSAGECALLBACK  WM_USER+5
  371. #ifdef _DEBUG
  372. // when debugging generate division by zero error if VFCmd is called with hVFDrv == 0
  373. #define VFCmd(hVFDrv, a,b,c,d) (hVFDrv ? SendDriverMessage(hVFDrv, DRV_CMD, MAKELPARAM(MAKEWORD(a,b),c),d) : (1/((long)hVFDrv)))
  374. #else
  375. #define VFCmd(hVFDrv, a,b,c,d) SendDriverMessage(hVFDrv, DRV_CMD, MAKELPARAM(MAKEWORD(a,b),c),d)
  376. #endif
  377. #ifndef MAKEWORD
  378. #define MAKEWORD(low,high) ((WORD)(((BYTE)(low)) | ((( WORD)((BYTE)(high))) <<  8)))
  379. #endif
  380. #define MAKEDWORD(a,b) MAKELPARAM(a,b)
  381. #define HVFAssign(hVFDrv,iDeviceIndex) VFCmd(hVFDrv,VF_CMD_ASSIGN,0,0,iDeviceIndex)
  382. #define HVFLock(hVFDrv,dwCapabilities) VFCmd(hVFDrv,VF_CMD_LOCK,0,0,dwCapabilities)
  383. #define HVFUnlock(hVFDrv,dwCapabilities) VFCmd(hVFDrv,VF_CMD_UNLOCK,0,0,dwCapabilities)
  384. #define HVFOpen(hVFDrv,wFlags,pscFileORpCallback) VFCmd(hVFDrv,VF_CMD_OPEN,0,wFlags,pscFileORpCallback)
  385. #define HVFClose(hVFDrv,bStream) VFCmd(hVFDrv,VF_CMD_CLOSE,bStream,0,0)
  386. #define HVFRefData(hVFDrv,bStream,dwRefData) VFCmd(hVFDrv,VF_CMD_REFDATA,bStream,0,(LONG)(dwRefData))
  387. #define HVFRecord(hVFDrv,bStream,wFlags,lPosition) VFCmd(hVFDrv,VF_CMD_RECORD,bStream,wFlags,lPosition)
  388. #define HVFPause(hVFDrv,bStream) VFCmd(hVFDrv,VF_CMD_PAUSE,bStream,0,0)
  389. #define HVFResume(hVFDrv,bStream) VFCmd(hVFDrv,VF_CMD_RESUME,bStream,0,0)
  390. #define HVFStop(hVFDrv,bStream) VFCmd(hVFDrv,VF_CMD_STOP,bStream,0,0)
  391. #define HVFSet(hVFDrv,bStream,wIndex,lValue) VFCmd(hVFDrv,VF_CMD_SET,bStream,wIndex,lValue)
  392. #define HVFGet(hVFDrv,bStream,wIndex) VFCmd(hVFDrv,VF_CMD_GET,bStream,wIndex,0)
  393. #define HVFIsOverlay(hVFDrv) VFCmd(hVFDrv,VF_CMD_IS_OVERLAY,0,0,0)
  394. #define HVFGetOverlayCaps(hVFDrv) VFCmd(hVFDrv,VF_CMD_GET_OVERLAY_CAPS,0,0,0)
  395. #define HVFUseOverlayCaps(hVFDrv, dwOverlayCaps) VFCmd(hVFDrv,VF_CMD_USE_OVERLAY_CAPS,0,0,(LONG)(dwOverlayCaps))
  396. #define HVFPaintOverlay(hVFDrv, pPaintStruct) VFCmd(hVFDrv,VF_CMD_PAINT_OVERLAY,0,0,(LONG)(pPaintStruct))
  397. #define HVFSetOverlayWnd(hVFDrv,hWnd) VFCmd(hVFDrv,VF_CMD_SET_OVERLAY_WND,0,0,(LONG)(hWnd))
  398. #define HVFSetOverlayDst(hVFDrv,wDstWidth,wDstHeight) VFCmd(hVFDrv,VF_CMD_SET_OVERLAY_DST,0,0,MAKELPARAM(wDstWidth,wDstHeight))
  399. #define HVFSetOverlayPos(hVFDrv,iXPos,iYPos) VFCmd(hVFDrv,VF_CMD_SET_OVERLAY_POS,0,0,MAKELPARAM(iXPos,iYPos))
  400. #define HVFSetOverlaySrc(hVFDrv,wSrcWidth,wSrcHeight) VFCmd(hVFDrv,VF_CMD_SET_OVERLAY_SRC,0,0,MAKELPARAM(wSrcWidth,wSrcHeight))
  401. #define HVFUnloadOverlay(hVFDrv) VFCmd(hVFDrv,VF_CMD_UNLOAD_OVERLAY,0,0,0)
  402. #define HVFTranscodeSet(hVFDrv,wIndex,lValue) VFCmd(hVFDrv,VF_CMD_TRANSCODE_SET,0,wIndex,lValue)
  403. // for compatibility
  404. // These macros have the effect that a variable or class member named 'hVFDrv' 
  405. // has to be defined in the context where these macros are used
  406. #define VFOpen(wFlags,pscFileORpCallback) VFCmd(hVFDrv,VF_CMD_OPEN,0,wFlags,pscFileORpCallback)
  407. #define VFClose(bStream) VFCmd(hVFDrv,VF_CMD_CLOSE,bStream,0,0)
  408. #define VFRecord(bStream,wFlags,lPosition) VFCmd(hVFDrv,VF_CMD_RECORD,bStream,wFlags,lPosition)
  409. #define VFPause(bStream) VFCmd(hVFDrv,VF_CMD_PAUSE,bStream,0,0)
  410. #define VFResume(bStream) VFCmd(hVFDrv,VF_CMD_RESUME,bStream,0,0)
  411. #define VFStop(bStream) VFCmd(hVFDrv,VF_CMD_STOP,bStream,0,0)
  412. #define VFSet(bStream,wIndex,lValue) VFCmd(hVFDrv,VF_CMD_SET,bStream,wIndex,lValue)
  413. #define VFGet(bStream,wIndex) VFCmd(hVFDrv,VF_CMD_GET,bStream,wIndex,0)
  414. #define VFTranscodeSet(wIndex,lValue) VFCmd(hVFDrv,VF_CMD_TRANSCODE_SET,0,wIndex,lValue)
  415. #endif // _INC_WINDOWS
  416. #endif