home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 January / VPR0001A.ISO / DRIVER / CANOPUS / PMPDK102 / pmpdk102_2.exe / DATA1.CAB / Sample_code / Vb / include / Movgear.bas < prev   
BASIC Source File  |  1999-10-01  |  14KB  |  296 lines

  1. Attribute VB_Name = "MOVGEAR"
  2. '
  3. ' movgear.bas
  4. '  Power Movie PCI Software Development Kit
  5. '   Copyright(C) 1997 Canopus Co., Ltd.
  6. '
  7. '    Rev 1.00.003
  8. '
  9.  
  10. Option Explicit
  11.  
  12. ' ------------------------------------------------------------------------------
  13. ' ここのセクションにあるシンボルは Visual Basic に添付の API Viewer を使用して
  14. ' 取り込んでいます。
  15.  
  16. ' RECT
  17. Type RECT
  18.     Left As Long
  19.     Top As Long
  20.     Right As Long
  21.     Bottom As Long
  22. End Type
  23.  
  24. ' RGBQUAD
  25. Type RGBQUAD
  26.     rgbBlue As Byte
  27.     rgbGreen As Byte
  28.     rgbRed As Byte
  29.     rgbReserved As Byte
  30. End Type
  31.  
  32. Const SEVERITY_ERROR = 1
  33. Const SEVERITY_SUCCESS = 0
  34.  
  35. ' ------------------------------------------------------------------------------
  36.  
  37. ' -------------------------------------------
  38. ' MGEPIXELFORMAT
  39. Global Const MGEPixelFormatRGB32 As Long = 1        ' x888
  40. Global Const MGEPixelFormatRGB24 As Long = 2        ' 888
  41. Global Const MGEPixelFormatRGB16 As Long = 3        ' 565
  42. Global Const MGEPixelFormatRGB15 As Long = 4        ' 555
  43. Global Const MGEPixelFormatPAL8 As Long = 5
  44. Global Const MGEPixelFormatMono As Long = 6
  45. Global Const MGEPixelFormatYUY2 As Long = 7         ' YUV 422
  46. Global Const MGEPixelFormatUYVY As Long = &H1000    ' Special format, do not use
  47.  
  48. ' -------------------------------------------
  49. ' MGEPFINFO
  50. Type MGEPFINFO
  51.     lSize As Long
  52.     lBytesPerPixel As Long
  53.     lFourCC As Long
  54.     lMaskRed As Long
  55.     lMaskGreen As Long
  56.     lMaskBlue As Long
  57. End Type
  58.  
  59. ' -------------------------------------------
  60. ' MGECOLORKEY
  61. Type MGECOLORKEY
  62.     lColorLow As Long
  63.     lColorHigh As Long
  64. End Type
  65.  
  66. ' -------------------------------------------
  67. ' MGEDEVICEINFO
  68. Type MGEDEVICEINFO
  69.     lSize As Long
  70.     lNumVideoDecoderChannel As Long
  71.     lNumVideoDecoderLine As Long
  72.     lNumVideoEncoderChannel As Long
  73.     lNumVideoEncoderLine As Long
  74.     strBoardName As String * 64
  75. End Type
  76.  
  77. ' -------------------------------------------
  78. ' MGEJPEGQUALITY
  79. Global Const MGEJPEGQuality5 = 5000    ' 1/5
  80. Global Const MGEJPEGQuality7 = 7000    ' 1/7
  81. Global Const MGEJPEGQuality10 = 10000  ' 1/10
  82. Global Const MGEJPEGQuality12 = 12000  ' 1/12
  83. Global Const MGEJPEGQuality15 = 15000  ' 1/15
  84. Global Const MGEJPEGQuality17 = 17000  ' 1/17
  85. Global Const MGEJPEGQuality20 = 20000  ' 1/20
  86. Global Const MGEJPEGQuality25 = 25000  ' 1/25
  87. Global Const MGEJPEGQuality30 = 30000  ' 1/30
  88. Global Const MGEJPEGQuality40 = 40000  ' 1/40
  89.  
  90. ' -------------------------------------------
  91. ' MGECHANNEL
  92. Global Const MGEChannel1 = 1
  93. Global Const MGEChannel2 = 2
  94. Global Const MGEChannel3 = 3
  95. Global Const MGEChannel4 = 4
  96. Global Const MGEChannel5 = 5
  97.  
  98. ' -------------------------------------------
  99. ' MGELINE
  100. Global Const MGELine1 = 1
  101. Global Const MGELine2 = 2
  102. Global Const MGELine3 = 3
  103. Global Const MGELine4 = 4
  104. Global Const MGELine5 = 5
  105.  
  106. ' -------------------------------------------
  107. ' MGEVDSTATUS
  108. Type MGEVDSTATUS
  109.     lSize As Long
  110.     lSignalState As Long
  111. End Type
  112.  
  113. ' -------------------------------------------
  114. ' MGEIMAGEINFO
  115. Type MGEIMAGEINFO
  116.     lSize As Long
  117.     lWidth As Long
  118.     lHeight As Long
  119.     lPlanes As Long
  120.     lBitCount As Long
  121. End Type
  122.  
  123. ' -------------------------------------------
  124. ' MGEPALINFO
  125. Type MGEPALINFO
  126.     lSize As Long
  127.     lNumOfEntries As Long  ' Number of entries in lpRGBPal
  128.     lpRGBPal() As RGBQUAD
  129. End Type
  130.  
  131. ' -------------------------------------------
  132. ' MGEVIDEOAMPPROPERTY
  133. Global Const MGEVideoAmpBrightness = 1
  134. Global Const MGEVideoAmpHue = 2
  135. Global Const MGEVideoAmpContrast = 3
  136. Global Const MGEVideoAmpSaturation = 4
  137. Global Const MGEVideoAmpSharpness = 5
  138. Global Const MGEVideoAmpColorEnable = 6
  139. Global Const MGEVideoAmpGamma = 7
  140. Global Const MGEVideoAmpWhiteBalance = 8
  141.  
  142. ' -------------------------------------------
  143. ' MGEVIDEOSTANDARD
  144. Global Const MGEVideoStandardNTSC = 1
  145. Global Const MGEVideoStandardPAL = 2
  146.  
  147. ' -------------------------------------------
  148. ' MGEVIDEOMODE
  149. Global Const MGEVideoModeFrame = 1
  150. Global Const MGEVideoModeOddField = 2
  151. Global Const MGEVideoModeEvenField = 3
  152.  
  153. ' -------------------------------------------
  154. ' MGESTREAMRECT
  155. Global Const MGEStreamRectCrop = 1
  156. Global Const MGEStreamRectFrame = 2
  157. Global Const MGEStreamRectWindow = 3
  158. Global Const MGEStreamRectView = 4
  159.  
  160. ' -------------------------------------------
  161. ' MGESTREAMSTATE
  162. Global Const MGEStreamStateNotComplete = 1
  163. Global Const MGEStreamStateStarted = 2
  164. Global Const MGEStreamStatePause = 3
  165. Global Const MGEStreamStateStop = 4
  166.  
  167. ' -------------------------------------------
  168. '
  169. Global Const MGEINVALIDHANDLE = 0
  170.  
  171. ' -------------------------------------------
  172. ' Set Cooperative Level flags
  173. Global Const MGE_SCL_EXCLUSIVE = 0
  174.  
  175. ' -------------------------------------------
  176. ' Set Overlay Mode flags
  177. Global Const MGE_SOM_COLORKEY = &H1
  178.  
  179. ' -------------------------------------------
  180. ' Signal Status
  181. Global Const MGE_SS_M_STABLE = &H1
  182. Global Const MGE_SS_STABLE = &H1           ' signal is stable
  183. Global Const MGE_SS_NOTSTABLE = &H0
  184. Global Const MGE_SS_M_COLOR = &H6
  185. Global Const MGE_SS_COLOR_UNKNOWN = &H0
  186. Global Const MGE_SS_COLOR_COLOR = &H2      ' signal is color(detect color burst)
  187. Global Const MGE_SS_COLOR_MONO = &H4
  188. Global Const MGE_SS_M_TYPE = &HF0
  189. Global Const MGE_SS_TYPE_UNKNOWN = &H0
  190. Global Const MGE_SS_TYPE_NTSC = &H10       ' signal is NTSC (60Hz)
  191. Global Const MGE_SS_TYPE_PAL = &H20        ' signal is PAL (50Hz)
  192.  
  193. ' -------------------------------------------
  194. ' Pre-defined color key value
  195. Global Const MGE_COLORKEY_BLACK = &H0&
  196. Global Const MGE_COLORKEY_RED = &HFF0000
  197. Global Const MGE_COLORKEY_GREEN = &HFF00&
  198. Global Const MGE_COLORKEY_YELLOW = &HFFFF00
  199. Global Const MGE_COLORKEY_BLUE = &HFF&
  200. Global Const MGE_COLORKEY_MAGENTA = &HFF00FF
  201. Global Const MGE_COLORKEY_CYAN = &HFFFF&
  202. Global Const MGE_COLORKEY_WHITE = &HFFFFFF
  203.  
  204. ' -------------------------------------------
  205. ' effect
  206. Global Const MGE_EF_M_MIRROR = &H1
  207. Global Const MGE_EF_MIRROR_ON = &H1
  208. Global Const MGE_EF_MIRROR_OFF = &H0
  209. Global Const MGE_EF_M_UPSIDEDOWN = &H2
  210. Global Const MGE_EF_UD_ON = &H2
  211. Global Const MGE_EF_UD_OFF = &H0
  212. Global Const MGE_EF_M_BALL = &H10000
  213. Global Const MGE_EF_BALL_ON = &H10000
  214. Global Const MGE_EF_BALL_OFF = &H0
  215.  
  216. ' -------------------------------------------
  217. ' Initialize/Uninitialize/MISC
  218. Declare Function MGE_Initialize Lib "mge.dll" (ByVal dwReserved As Long, ByVal hWnd As Long, lphmge As Long) As Long
  219. Declare Function MGE_Uninitialize Lib "mge.dll" (ByVal hmge As Long) As Long
  220. Declare Function MGE_SetCooperativeLevel Lib "mge.dll" (ByVal hmge As Long, ByVal dwLevel As Long) As Long
  221. Declare Function MGE_GetDeviceInfo Lib "mge.dll" (ByVal hmge As Long, lpmgedi As Long) As Long
  222. Declare Function MGE_SetVideoStandard Lib "mge.dll" (ByVal hmge As Long, ByVal mgevs As Long) As Long
  223. Declare Function MGE_GetVideoStandard Lib "mge.dll" (ByVal hmge As Long, lpmgevs As Long) As Long
  224. Declare Function MGE_Update Lib "mge.dll" (ByVal hmge As Long) As Long
  225. Declare Function MGE_SaveConfiguration Lib "mge.dll" (ByVal hmge As Long, ByVal hKey As Long, ByVal lpszBase As String) As Long
  226. Declare Function MGE_LoadConfiguration Lib "mge.dll" (ByVal hmge As Long, ByVal hKey As Long, ByVal lpszBase As String) As Long
  227.  
  228. ' -------------------------------------------
  229. ' Surface
  230. Declare Function MGE_CreateSuperOvlSurface Lib "mge.dll" (ByVal hmge As Long, lphmgesrf As Long, ByVal hWnd As Long, ByVal dwWidth As Long, ByVal dwHeight As Long) As Long
  231. Declare Function MGE_CreateDDrawOvlSurface Lib "mge.dll" (ByVal hmge As Long, lphmgesrf As Long, ByVal hWnd As Long, ByVal dwWidth As Long, ByVal dwHeight As Long) As Long
  232. Declare Function MGE_CreateMemorySurface Lib "mge.dll" (ByVal hmge As Long, lphmgesrf As Long, ByVal dwWidth As Long, ByVal dwHeight As Long, ByVal lPitch As Long, ByVal mgefFormat As Long) As Long
  233. Declare Function MGE_DestroySurface Lib "mge.dll" (ByVal hmgesrfSurface As Long) As Long
  234. Declare Function MGE_SurfaceSetColorKey Lib "mge.dll" (ByVal hmgesrfSurface As Long, lpmgck As MGECOLORKEY) As Long
  235. Declare Function MGE_SurfaceGetColorKey Lib "mge.dll" (ByVal hmgesrfSurface As Long, lpmgck As MGECOLORKEY) As Long
  236. Declare Function MGE_SurfaceSetOverlayMode Lib "mge.dll" (ByVal hmgesrfSurface As Long, ByVal dwMode As Long) As Long
  237. Declare Function MGE_SurfaceGetOverlayMode Lib "mge.dll" (ByVal hmgesrfSurface As Long, lpdwMode As Long) As Long
  238. Declare Function MGE_SurfaceStartOverlay Lib "mge.dll" (ByVal hmgesrfSurface As Long) As Long
  239. Declare Function MGE_SurfaceStopOverlay Lib "mge.dll" (ByVal hmgesrfSurface As Long) As Long
  240. Declare Function MGE_SurfaceSetBitmapBits Lib "mge.dll" (ByVal hmgesrfSurface As Long, lpData As Any, ByVal mgpfFormat As Long, lppi As Long, ByVal lPitch As Long, lprc As RECT) As Long
  241. Declare Function MGE_SurfaceGetBitmapBits Lib "mge.dll" (ByVal hmgesrfSurface As Long, lpData As Any, ByVal mgpfFormat As Long, lppi As Long, ByVal lPitch As Long, lprc As RECT) As Long
  242. Declare Function MGE_SurfaceFillBuffer Lib "mge.dll" (ByVal hmgesrfSurface As Long, lprc As RECT, ByVal dwFillColor As Long) As Long
  243. Declare Function MGE_SurfaceLoadDIB Lib "mge.dll" Alias "MGE_SurfaceLoadDIBA" (ByVal hmgesrfSurface As Long, ByVal lpszFileName As String, lprc As RECT) As Long
  244. Declare Function MGE_SurfaceSaveDIB Lib "mge.dll" Alias "MGE_SurfaceSaveDIBA" (ByVal hmgesrfSurface As Long, ByVal lpszFileName As String, lprc As RECT, ByVal mgpfFormat As Long) As Long
  245. Declare Function MGE_SurfaceLoadJPEG Lib "mge.dll" Alias "MGE_SurfaceLoadJPEGA" (ByVal hmgesrfSurface As Long, ByVal lpszFileName As String, lprc As RECT) As Long
  246. Declare Function MGE_SurfaceSaveJPEG Lib "mge.dll" Alias "MGE_SurfaceSaveJPEGA" (ByVal hmgesrfSurface As Long, ByVal lpszFileName As String, lprc As RECT, ByVal mgjqQuality As Long) As Long
  247.  
  248. ' -------------------------------------------
  249. ' Video Decoder
  250. Declare Function MGE_CreateVideoDecoder Lib "mge.dll" (ByVal hmge As Long, ByVal mgcChannel As Long, lphmgevs As Long) As Long
  251. Declare Function MGE_DestroyVideoDecoder Lib "mge.dll" (ByVal hmgevs As Long) As Long
  252. Declare Function MGE_VDGetStatus Lib "mge.dll" (ByVal hmgevs As Long, ByVal mglLine As Long, ByVal lpmgevds As Long) As Long
  253. Declare Function MGE_VDSetParam Lib "mge.dll" (ByVal hmgves As Long, ByVal mglLine As Long, ByVal mgvap As Long, ByVal dwValue As Long) As Long
  254. Declare Function MGE_VDGetParam Lib "mge.dll" (ByVal hmgves As Long, ByVal mglLine As Long, ByVal mgvap As Long, lpdwValue As Long) As Long
  255. Declare Function MGE_VDGetParamRange Lib "mge.dll" (ByVal hmgves As Long, ByVal mglLine As Long, ByVal mgvap As Long, lpdwMin As Long, lpdwMax As Long, lpdwDef As Long) As Long
  256. Declare Function MGE_VDSetLine Lib "mge.dll" (ByVal hmgves As Long, ByVal mglLine As Long) As Long
  257. Declare Function MGE_VDGetLine Lib "mge.dll" (ByVal hmgves As Long, lpmglLine As Long) As Long
  258. Declare Function MGE_VDSaveConfiguration Lib "mge.dll" (ByVal hmgves As Long, ByVal hKey As Long, ByVal lpszBase As String) As Long
  259. Declare Function MGE_VDLoadConfiguration Lib "mge.dll" (ByVal hmgves As Long, ByVal hKey As Long, ByVal lpszBase As String) As Long
  260.  
  261. ' -------------------------------------------
  262. ' Video Encoder
  263. Declare Function MGE_CreateVideoEncoder Lib "mge.dll" (ByVal hmge As Long, ByVal mgcChannel As Long, lphmgevd As Long) As Long
  264. Declare Function MGE_DestroyVideoEncoder Lib "mge.dll" (ByVal hmgevd As Long) As Long
  265. Declare Function MGE_VESetLine Lib "mge.dll" (ByVal hmgevd As Long, ByVal mglLine As Long) As Long
  266. Declare Function MGE_VEGetLine Lib "mge.dll" (ByVal hmgevd As Long, lpmglLine As Long) As Long
  267. Declare Function MGE_VESaveConfiguration Lib "mge.dll" (ByVal hmgevd As Long, ByVal hKey As Long, ByVal lpszBase As String) As Long
  268. Declare Function MGE_VELoadConfiguration Lib "mge.dll" (ByVal hmgevd As Long, ByVal hKey As Long, ByVal lpszBase As String) As Long
  269.  
  270. ' -------------------------------------------
  271. ' Video Stream
  272. Declare Function MGE_CreateVideoInStream Lib "mge.dll" (ByVal hmgevs As Long, lphmgestm As Long) As Long
  273. Declare Function MGE_CreateVideoOutStream Lib "mge.dll" (ByVal hmgevd As Long, lphmgestm As Long) As Long
  274. Declare Function MGE_DestroyVideoStream Lib "mge.dll" (ByVal hmgestm As Long) As Long
  275. Declare Function MGE_VStreamConnect Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal hmgesrfSurface As Long) As Long
  276. Declare Function MGE_VStreamDisconnect Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal hmgesrfSurface As Long) As Long
  277. Declare Function MGE_VStreamReplace Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal hmgesrfSurface As Long) As Long
  278. Declare Function MGE_VStreamSetVideoMode Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal mgevm As Long, ByVal fImmediate As Boolean) As Long
  279. Declare Function MGE_VStreamGetVideoMode Lib "mge.dll" (ByVal hmgestmStream As Long, lpmgevm As Long) As Long
  280. Declare Function MGE_VStreamSetRect Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal mgestmrc As Long, lprc As RECT, ByVal fImmediate As Boolean) As Long
  281. Declare Function MGE_VStreamGetRect Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal mgestmrc As Long, lprc As RECT) As Long
  282. Declare Function MGE_VStreamGetRectRange Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal mgestmrc As Long, lprcMin As RECT, lprcMax As RECT, lprcDef As RECT) As Long
  283. Declare Function MGE_VStreamStart Lib "mge.dll" (ByVal hmgestmStream As Long) As Long
  284. Declare Function MGE_VStreamPause Lib "mge.dll" (ByVal hmgestmStream As Long) As Long
  285. Declare Function MGE_VStreamRestart Lib "mge.dll" (ByVal hmgestmStream As Long) As Long
  286. Declare Function MGE_VStreamStop Lib "mge.dll" (ByVal hmgestmStream As Long) As Long
  287. Declare Function MGE_VStreamGetState Lib "mge.dll" (ByVal hmgestmStream As Long, lpmgess As Long) As Long
  288. Declare Function MGE_VStreamSetEffect Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal dwEffect As Long, ByVal fImmediate As Boolean) As Long
  289. Declare Function MGE_VStreamGetEffect Lib "mge.dll" (ByVal hmgestmStream As Long, lpdwEffect As Long) As Long
  290.  
  291. ' -------------------------------------------
  292. ' Misc
  293. Declare Function MGE_GetPixelFormatInfo Lib "mge.dll" (ByVal mgepfFormat As Long, lpmgfi As MGEPFINFO) As Long
  294. Declare Function MGE_GetImageInfo Lib "mge.dll" Alias "MGE_GetImageInfoA" (ByVal lpszFileName As String, lpmgii As MGEIMAGEINFO) As Long
  295.  
  296.