Global Const MGEPixelFormatRGB32 As Long = 1 ' x888
Global Const MGEPixelFormatRGB24 As Long = 2 ' 888
Global Const MGEPixelFormatRGB16 As Long = 3 ' 565
Global Const MGEPixelFormatRGB15 As Long = 4 ' 555
Global Const MGEPixelFormatPAL8 As Long = 5
Global Const MGEPixelFormatMono As Long = 6
Global Const MGEPixelFormatYUY2 As Long = 7 ' YUV 422
Global Const MGEPixelFormatUYVY As Long = &H1000 ' Special format, do not use
' -------------------------------------------
' MGEPFINFO
Type MGEPFINFO
lSize As Long
lBytesPerPixel As Long
lFourCC As Long
lMaskRed As Long
lMaskGreen As Long
lMaskBlue As Long
End Type
' -------------------------------------------
' MGECOLORKEY
Type MGECOLORKEY
lColorLow As Long
lColorHigh As Long
End Type
' -------------------------------------------
' MGEDEVICEINFO
Type MGEDEVICEINFO
lSize As Long
lNumVideoDecoderChannel As Long
lNumVideoDecoderLine As Long
lNumVideoEncoderChannel As Long
lNumVideoEncoderLine As Long
strBoardName As String * 64
End Type
' -------------------------------------------
' MGEJPEGQUALITY
Global Const MGEJPEGQuality5 = 5000 ' 1/5
Global Const MGEJPEGQuality7 = 7000 ' 1/7
Global Const MGEJPEGQuality10 = 10000 ' 1/10
Global Const MGEJPEGQuality12 = 12000 ' 1/12
Global Const MGEJPEGQuality15 = 15000 ' 1/15
Global Const MGEJPEGQuality17 = 17000 ' 1/17
Global Const MGEJPEGQuality20 = 20000 ' 1/20
Global Const MGEJPEGQuality25 = 25000 ' 1/25
Global Const MGEJPEGQuality30 = 30000 ' 1/30
Global Const MGEJPEGQuality40 = 40000 ' 1/40
' -------------------------------------------
' MGECHANNEL
Global Const MGEChannel1 = 1
Global Const MGEChannel2 = 2
Global Const MGEChannel3 = 3
Global Const MGEChannel4 = 4
Global Const MGEChannel5 = 5
' -------------------------------------------
' MGELINE
Global Const MGELine1 = 1
Global Const MGELine2 = 2
Global Const MGELine3 = 3
Global Const MGELine4 = 4
Global Const MGELine5 = 5
' -------------------------------------------
' MGEVDSTATUS
Type MGEVDSTATUS
lSize As Long
lSignalState As Long
End Type
' -------------------------------------------
' MGEIMAGEINFO
Type MGEIMAGEINFO
lSize As Long
lWidth As Long
lHeight As Long
lPlanes As Long
lBitCount As Long
End Type
' -------------------------------------------
' MGEPALINFO
Type MGEPALINFO
lSize As Long
lNumOfEntries As Long ' Number of entries in lpRGBPal
lpRGBPal() As RGBQUAD
End Type
' -------------------------------------------
' MGEVIDEOAMPPROPERTY
Global Const MGEVideoAmpBrightness = 1
Global Const MGEVideoAmpHue = 2
Global Const MGEVideoAmpContrast = 3
Global Const MGEVideoAmpSaturation = 4
Global Const MGEVideoAmpSharpness = 5
Global Const MGEVideoAmpColorEnable = 6
Global Const MGEVideoAmpGamma = 7
Global Const MGEVideoAmpWhiteBalance = 8
' -------------------------------------------
' MGEVIDEOSTANDARD
Global Const MGEVideoStandardNTSC = 1
Global Const MGEVideoStandardPAL = 2
' -------------------------------------------
' MGEVIDEOMODE
Global Const MGEVideoModeFrame = 1
Global Const MGEVideoModeOddField = 2
Global Const MGEVideoModeEvenField = 3
' -------------------------------------------
' MGESTREAMRECT
Global Const MGEStreamRectCrop = 1
Global Const MGEStreamRectFrame = 2
Global Const MGEStreamRectWindow = 3
Global Const MGEStreamRectView = 4
' -------------------------------------------
' MGESTREAMSTATE
Global Const MGEStreamStateNotComplete = 1
Global Const MGEStreamStateStarted = 2
Global Const MGEStreamStatePause = 3
Global Const MGEStreamStateStop = 4
' -------------------------------------------
'
Global Const MGEINVALIDHANDLE = 0
' -------------------------------------------
' Set Cooperative Level flags
Global Const MGE_SCL_EXCLUSIVE = 0
' -------------------------------------------
' Set Overlay Mode flags
Global Const MGE_SOM_COLORKEY = &H1
' -------------------------------------------
' Signal Status
Global Const MGE_SS_M_STABLE = &H1
Global Const MGE_SS_STABLE = &H1 ' signal is stable
Global Const MGE_SS_NOTSTABLE = &H0
Global Const MGE_SS_M_COLOR = &H6
Global Const MGE_SS_COLOR_UNKNOWN = &H0
Global Const MGE_SS_COLOR_COLOR = &H2 ' signal is color(detect color burst)
Global Const MGE_SS_COLOR_MONO = &H4
Global Const MGE_SS_M_TYPE = &HF0
Global Const MGE_SS_TYPE_UNKNOWN = &H0
Global Const MGE_SS_TYPE_NTSC = &H10 ' signal is NTSC (60Hz)
Global Const MGE_SS_TYPE_PAL = &H20 ' signal is PAL (50Hz)
' -------------------------------------------
' Pre-defined color key value
Global Const MGE_COLORKEY_BLACK = &H0&
Global Const MGE_COLORKEY_RED = &HFF0000
Global Const MGE_COLORKEY_GREEN = &HFF00&
Global Const MGE_COLORKEY_YELLOW = &HFFFF00
Global Const MGE_COLORKEY_BLUE = &HFF&
Global Const MGE_COLORKEY_MAGENTA = &HFF00FF
Global Const MGE_COLORKEY_CYAN = &HFFFF&
Global Const MGE_COLORKEY_WHITE = &HFFFFFF
' -------------------------------------------
' effect
Global Const MGE_EF_M_MIRROR = &H1
Global Const MGE_EF_MIRROR_ON = &H1
Global Const MGE_EF_MIRROR_OFF = &H0
Global Const MGE_EF_M_UPSIDEDOWN = &H2
Global Const MGE_EF_UD_ON = &H2
Global Const MGE_EF_UD_OFF = &H0
Global Const MGE_EF_M_BALL = &H10000
Global Const MGE_EF_BALL_ON = &H10000
Global Const MGE_EF_BALL_OFF = &H0
' -------------------------------------------
' Initialize/Uninitialize/MISC
Declare Function MGE_Initialize Lib "mge.dll" (ByVal dwReserved As Long, ByVal hWnd As Long, lphmge As Long) As Long
Declare Function MGE_Uninitialize Lib "mge.dll" (ByVal hmge As Long) As Long
Declare Function MGE_SetCooperativeLevel Lib "mge.dll" (ByVal hmge As Long, ByVal dwLevel As Long) As Long
Declare Function MGE_GetDeviceInfo Lib "mge.dll" (ByVal hmge As Long, lpmgedi As Long) As Long
Declare Function MGE_SetVideoStandard Lib "mge.dll" (ByVal hmge As Long, ByVal mgevs As Long) As Long
Declare Function MGE_GetVideoStandard Lib "mge.dll" (ByVal hmge As Long, lpmgevs As Long) As Long
Declare Function MGE_Update Lib "mge.dll" (ByVal hmge As Long) As Long
Declare Function MGE_SaveConfiguration Lib "mge.dll" (ByVal hmge As Long, ByVal hKey As Long, ByVal lpszBase As String) As Long
Declare Function MGE_LoadConfiguration Lib "mge.dll" (ByVal hmge As Long, ByVal hKey As Long, ByVal lpszBase As String) As Long
' -------------------------------------------
' Surface
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
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
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
Declare Function MGE_DestroySurface Lib "mge.dll" (ByVal hmgesrfSurface As Long) As Long
Declare Function MGE_SurfaceSetColorKey Lib "mge.dll" (ByVal hmgesrfSurface As Long, lpmgck As MGECOLORKEY) As Long
Declare Function MGE_SurfaceGetColorKey Lib "mge.dll" (ByVal hmgesrfSurface As Long, lpmgck As MGECOLORKEY) As Long
Declare Function MGE_SurfaceSetOverlayMode Lib "mge.dll" (ByVal hmgesrfSurface As Long, ByVal dwMode As Long) As Long
Declare Function MGE_SurfaceGetOverlayMode Lib "mge.dll" (ByVal hmgesrfSurface As Long, lpdwMode As Long) As Long
Declare Function MGE_SurfaceStartOverlay Lib "mge.dll" (ByVal hmgesrfSurface As Long) As Long
Declare Function MGE_SurfaceStopOverlay Lib "mge.dll" (ByVal hmgesrfSurface As Long) As Long
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
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
Declare Function MGE_SurfaceFillBuffer Lib "mge.dll" (ByVal hmgesrfSurface As Long, lprc As RECT, ByVal dwFillColor As Long) As Long
Declare Function MGE_SurfaceLoadDIB Lib "mge.dll" Alias "MGE_SurfaceLoadDIBA" (ByVal hmgesrfSurface As Long, ByVal lpszFileName As String, lprc As RECT) As Long
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
Declare Function MGE_SurfaceLoadJPEG Lib "mge.dll" Alias "MGE_SurfaceLoadJPEGA" (ByVal hmgesrfSurface As Long, ByVal lpszFileName As String, lprc As RECT) As Long
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
' -------------------------------------------
' Video Decoder
Declare Function MGE_CreateVideoDecoder Lib "mge.dll" (ByVal hmge As Long, ByVal mgcChannel As Long, lphmgevs As Long) As Long
Declare Function MGE_DestroyVideoDecoder Lib "mge.dll" (ByVal hmgevs As Long) As Long
Declare Function MGE_VDGetStatus Lib "mge.dll" (ByVal hmgevs As Long, ByVal mglLine As Long, ByVal lpmgevds As Long) As Long
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
Declare Function MGE_VDGetParam Lib "mge.dll" (ByVal hmgves As Long, ByVal mglLine As Long, ByVal mgvap As Long, lpdwValue As Long) As Long
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
Declare Function MGE_VDSetLine Lib "mge.dll" (ByVal hmgves As Long, ByVal mglLine As Long) As Long
Declare Function MGE_VDGetLine Lib "mge.dll" (ByVal hmgves As Long, lpmglLine As Long) As Long
Declare Function MGE_VDSaveConfiguration Lib "mge.dll" (ByVal hmgves As Long, ByVal hKey As Long, ByVal lpszBase As String) As Long
Declare Function MGE_VDLoadConfiguration Lib "mge.dll" (ByVal hmgves As Long, ByVal hKey As Long, ByVal lpszBase As String) As Long
' -------------------------------------------
' Video Encoder
Declare Function MGE_CreateVideoEncoder Lib "mge.dll" (ByVal hmge As Long, ByVal mgcChannel As Long, lphmgevd As Long) As Long
Declare Function MGE_DestroyVideoEncoder Lib "mge.dll" (ByVal hmgevd As Long) As Long
Declare Function MGE_VESetLine Lib "mge.dll" (ByVal hmgevd As Long, ByVal mglLine As Long) As Long
Declare Function MGE_VEGetLine Lib "mge.dll" (ByVal hmgevd As Long, lpmglLine As Long) As Long
Declare Function MGE_VESaveConfiguration Lib "mge.dll" (ByVal hmgevd As Long, ByVal hKey As Long, ByVal lpszBase As String) As Long
Declare Function MGE_VELoadConfiguration Lib "mge.dll" (ByVal hmgevd As Long, ByVal hKey As Long, ByVal lpszBase As String) As Long
' -------------------------------------------
' Video Stream
Declare Function MGE_CreateVideoInStream Lib "mge.dll" (ByVal hmgevs As Long, lphmgestm As Long) As Long
Declare Function MGE_CreateVideoOutStream Lib "mge.dll" (ByVal hmgevd As Long, lphmgestm As Long) As Long
Declare Function MGE_DestroyVideoStream Lib "mge.dll" (ByVal hmgestm As Long) As Long
Declare Function MGE_VStreamConnect Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal hmgesrfSurface As Long) As Long
Declare Function MGE_VStreamDisconnect Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal hmgesrfSurface As Long) As Long
Declare Function MGE_VStreamReplace Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal hmgesrfSurface As Long) As Long
Declare Function MGE_VStreamSetVideoMode Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal mgevm As Long, ByVal fImmediate As Boolean) As Long
Declare Function MGE_VStreamGetVideoMode Lib "mge.dll" (ByVal hmgestmStream As Long, lpmgevm As Long) As Long
Declare Function MGE_VStreamSetRect Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal mgestmrc As Long, lprc As RECT, ByVal fImmediate As Boolean) As Long
Declare Function MGE_VStreamGetRect Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal mgestmrc As Long, lprc As RECT) As Long
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
Declare Function MGE_VStreamStart Lib "mge.dll" (ByVal hmgestmStream As Long) As Long
Declare Function MGE_VStreamPause Lib "mge.dll" (ByVal hmgestmStream As Long) As Long
Declare Function MGE_VStreamRestart Lib "mge.dll" (ByVal hmgestmStream As Long) As Long
Declare Function MGE_VStreamStop Lib "mge.dll" (ByVal hmgestmStream As Long) As Long
Declare Function MGE_VStreamGetState Lib "mge.dll" (ByVal hmgestmStream As Long, lpmgess As Long) As Long
Declare Function MGE_VStreamSetEffect Lib "mge.dll" (ByVal hmgestmStream As Long, ByVal dwEffect As Long, ByVal fImmediate As Boolean) As Long
Declare Function MGE_VStreamGetEffect Lib "mge.dll" (ByVal hmgestmStream As Long, lpdwEffect As Long) As Long
' -------------------------------------------
' Misc
Declare Function MGE_GetPixelFormatInfo Lib "mge.dll" (ByVal mgepfFormat As Long, lpmgfi As MGEPFINFO) As Long
Declare Function MGE_GetImageInfo Lib "mge.dll" Alias "MGE_GetImageInfoA" (ByVal lpszFileName As String, lpmgii As MGEIMAGEINFO) As Long