;******************************************************************************
;
;   File:           XIStream.inf
;
;   Copyright (C) 2012 Magewell Electronics Co., Ltd. (Nanjing, China)
;
;******************************************************************************/

[Version]
signature = "$Windows NT$"
Class     = Media
ClassGUID = {4d36e96c-e325-11ce-bfc1-08002be10318}
Provider  = %MAGEWELL%
CatalogFile = XI102XE_HD.cat
DriverVer = 05/21/2014,1.1.0.818

[SourceDisksNames]
1="Install disk",,,,disk1
2="Install disk",,,\x86,disk2

[SourceDisksNames.amd64]
1="Install disk",,,,disk1
2="Install disk",,,\x64,disk2

[SourceDisksFiles]
XI102XE_HD.sys = 2
XIStreamFirmware.dll = 1
XIStreamHDCapture.dll = 1
XIStreamConfig.dll=1
XIStreamFirmware_x64.dll = 1
XIStreamHDCapture_x64.dll = 1
XIStreamConfig_x64.dll=1

[DestinationDirs]
XI102XE_HD.Drivers		= 12
XI102XE_HD.PropPages32	= 11
XI102XE_HD.PropPages64	= 11
XI102XE_HD.PropPagesWOW = 10,SysWOW64

[XI102XE_HD.Drivers]
XI102XE_HD.sys

[XI102XE_HD.PropPages32]
XIStreamFirmware.dll
XIStreamHDCapture.dll
XIStreamConfig.dll

[XI102XE_HD.PropPages64]
XIStreamFirmware_x64.dll
XIStreamHDCapture_x64.dll
XIStreamConfig_x64.dll

[XI102XE_HD.PropPagesWOW]
XIStreamFirmware.dll
XIStreamHDCapture.dll
XIStreamConfig.dll

[XI102XE_HD.KnownFiles]
XI102XE_HD.sys=force
XIStreamFirmware.dll=force
XIStreamHDCapture.dll=force
XIStreamConfig.dll=force
XIStreamFirmware_x64.dll=force
XIStreamHDCapture_x64.dll=force
XIStreamConfig_x64.dll=force

[Manufacturer]
%MAGEWELL% = MAGEWELL,ntx86,ntamd64

[MAGEWELL.ntx86]
%XI102XE_HD.DeviceDesc% = XI102XE_HD.Device, PCI\VEN_1172&DEV_D102&SUBSYS_D1021172

[MAGEWELL.ntamd64]
%XI102XE_HD.DeviceDesc% = XI102XE_HD.Device, PCI\VEN_1172&DEV_D102&SUBSYS_D1021172

;---------------------------------------------------------------
;                DDInstall
;---------------------------------------------------------------

[XI102XE_HD.Device.ntx86]
Include    = ks.inf, kscaptur.inf, ksfilter.inf, wdmaudio.inf
Needs      = KS.Registration,KSCAPTUR.Registration.NT, WDMAUDIO.Registration
AddReg	   = XI102XE_HD.AddReg
CopyFiles  = XI102XE_HD.Drivers,XI102XE_HD.PropPages32
KnownFiles = XI102XE_HD.KnownFiles
RegisterDlls= XI102XE_HD.RegSvr

[XI102XE_HD.Device.ntamd64]
Include    = ks.inf, kscaptur.inf, ksfilter.inf, wdmaudio.inf
Needs      = KS.Registration,KSCAPTUR.Registration.NT, WDMAUDIO.Registration
AddReg	   = XI102XE_HD.AddReg, XI102XE_HD.AddReg64
CopyFiles  = XI102XE_HD.Drivers,XI102XE_HD.PropPages64,XI102XE_HD.PropPagesWOW
KnownFiles = XI102XE_HD.KnownFiles
RegisterDlls= XI102XE_HD.RegSvr64

[XI102XE_HD.RegSvr]
11,,XIStreamFirmware.dll,1
11,,XIStreamHDCapture.dll,1
11,,XIStreamConfig.dll,1

[XI102XE_HD.RegSvr64]
11,,XIStreamFirmware_x64.dll,1
11,,XIStreamHDCapture_x64.dll,1
11,,XIStreamConfig_x64.dll,1
10,SysWOW64,XIStreamFirmware.dll,1
10,SysWOW64,XIStreamHDCapture.dll,1
10,SysWOW64,XIStreamConfig.dll,1

;---------------------------------------------------------------
;                Interfaces
;---------------------------------------------------------------

[XI102XE_HD.Device.ntx86.Interfaces]
AddInterface = %KSCATEGORY_CAPTURE%,"HDVideo",HDVideo,
AddInterface = %KSCATEGORY_VIDEO%,"HDVideo",HDVideo,
AddInterface = %KSCATEGORY_CAPTURE%,"SDIVideo1",SDIVideo1,
AddInterface = %KSCATEGORY_VIDEO%,"SDIVideo1",SDIVideo1,
AddInterface = %KSCATEGORY_CAPTURE%,"SDIVideo2",SDIVideo2,
AddInterface = %KSCATEGORY_VIDEO%,"SDIVideo2",SDIVideo2,
AddInterface = %KSCATEGORY_CAPTURE%,"HDMIAudio",HDMIAudio,
AddInterface = %KSCATEGORY_AUDIO%,"HDMIAudio",HDMIAudio,
AddInterface = %KSCATEGORY_CAPTURE%,"SDIAudio1",SDIAudio1,
AddInterface = %KSCATEGORY_AUDIO%,"SDIAudio1",SDIAudio1,
AddInterface = %KSCATEGORY_CAPTURE%,"SDIAudio2",SDIAudio2,
AddInterface = %KSCATEGORY_AUDIO%,"SDIAudio2",SDIAudio2,
AddInterface = %KSCATEGORY_CAPTURE%,"HDCombined",HDCombined,
AddInterface = %KSCATEGORY_VIDEO%,"HDCombined",HDCombined,

[XI102XE_HD.Device.ntamd64.Interfaces]
AddInterface = %KSCATEGORY_CAPTURE%,"HDVideo",HDVideo,
AddInterface = %KSCATEGORY_VIDEO%,"HDVideo",HDVideo,
AddInterface = %KSCATEGORY_CAPTURE%,"SDIVideo1",SDIVideo1,
AddInterface = %KSCATEGORY_VIDEO%,"SDIVideo1",SDIVideo1,
AddInterface = %KSCATEGORY_CAPTURE%,"SDIVideo2",SDIVideo2,
AddInterface = %KSCATEGORY_VIDEO%,"SDIVideo2",SDIVideo2,
AddInterface = %KSCATEGORY_CAPTURE%,"HDMIAudio",HDMIAudio,
AddInterface = %KSCATEGORY_AUDIO%,"HDMIAudio",HDMIAudio,
AddInterface = %KSCATEGORY_CAPTURE%,"SDIAudio1",SDIAudio1,
AddInterface = %KSCATEGORY_AUDIO%,"SDIAudio1",SDIAudio1,
AddInterface = %KSCATEGORY_CAPTURE%,"SDIAudio2",SDIAudio2,
AddInterface = %KSCATEGORY_AUDIO%,"SDIAudio2",SDIAudio2,
AddInterface = %KSCATEGORY_CAPTURE%,"HDCombined",HDCombined,
AddInterface = %KSCATEGORY_VIDEO%,"HDCombined",HDCombined,

[HDVideo]
AddReg = HDVideo.AddReg

[SDIVideo1]
AddReg = SDIVideo1.AddReg

[SDIVideo2]
AddReg = SDIVideo2.AddReg

[HDMIAudio]
AddReg = HDMIAudio.AddReg

[SDIAudio1]
AddReg = SDIAudio1.AddReg

[SDIAudio2]
AddReg = SDIAudio2.AddReg

[HDCombined]
AddReg = HDCombined.AddReg

[XI102XE_HD.AddReg]
HKR,,AssociatedFilters,,"wdmaud,swmidi,redbook"
HKR,,Driver,,XI102XE_HD.sys
HKR,Drivers,SubClasses,,"wave,mixer"
HKR,Drivers\wave\wdmaud.drv,Driver,,wdmaud.drv
HKR,Drivers\mixer\wdmaud.drv,Driver,,wdmaud.drv
HKR,Drivers\wave\wdmaud.drv,Description,,%XI102XE_HD.AudioCapture%
HKR,Drivers\mixer\wdmaud.drv,Description,,%XI102XE_HD.AudioCapture%

HKLM, %MediaCategories%\{929AC461-E76D-44fa-90B5-ED4EE33157B1},Name,,"HDMI In"
HKLM, %MediaCategories%\{929AC581-E76D-44fa-90B5-ED4EE33157B1},Name,,"SDI In 1"
HKLM, %MediaCategories%\{929AC582-E76D-44fa-90B5-ED4EE33157B1},Name,,"SDI In 2"

; 0 - HDMI/DVI, 1 - RGB (VGA), 2 - YPbPr (Component), 3 - CVBS/S-Video
HKLM, System\CurrentControlSet\Services\XI102XE_HD,HDCaptureMode,0x00010001,1

; 0 - No Deinterlace, 1 - Blend Detinerlace, 2 - Motion Adaptive Deinterlace
HKLM, System\CurrentControlSet\Services\XI102XE_HD,HDDeinterlace,0x00010001,1
; 0 - Do not keep aspect ratio, 1 - Add black border to keep aspect ratio, 2 - Clip border to keep aspect ratio
HKLM, System\CurrentControlSet\Services\XI102XE_HD,HDScale,0x00010001,1
; 0 - Color bar, 1 - Blue screen, 2 - Black screen
HKLM, System\CurrentControlSet\Services\XI102XE_HD,HDStatusImageMode,0x00010001,0
; 0 - Single stream, 1 - SimuStream with same video format, 2 - SimuStream with arbitrary video format
HKLM, System\CurrentControlSet\Services\XI102XE_HD,HDSimuStreamType,0x00010001,1

HKLM, System\CurrentControlSet\Services\XI102XE_HD,ActivePixelThreshold,0x00010001,64
HKLM, System\CurrentControlSet\Services\XI102XE_HD,SOGTriLevel,0x00010001,0

; 0 - No Deinterlace, 1 - Blend Detinerlace, 2 - Motion Adaptive Deinterlace
HKLM, System\CurrentControlSet\Services\XI102XE_HD,SDIDeinterlace,0x00010001,1
; 0 - Do not keep aspect ratio, 1 - Add black border to keep aspect ratio, 2 - Clip border to keep aspect ratio
HKLM, System\CurrentControlSet\Services\XI102XE_HD,SDIScale,0x00010001,1
; 0 - Color bar, 1 - Blue screen, 2 - Black screen
HKLM, System\CurrentControlSet\Services\XI102XE_HD,SDIStatusImageMode,0x00010001,0
; 0 - Single stream, 1 - SimuStream with same video format, 2 - SimuStream with arbitrary video format
HKLM, System\CurrentControlSet\Services\XI102XE_HD,SDISimuStreamType,0x00010001,1

; Disable extra formats with different size: 1
HKLM, System\CurrentControlSet\Services\XI102XE_HD,DisableExtraFormats,0x00010001,0
; Disable color space outputs: RGB24/0x04, RGB32/0x08, YUY2/0x60, UYVY/0x100, I420/0x1400, NV12/0x4000
HKLM, System\CurrentControlSet\Services\XI102XE_HD,DisableColorSpaceMasks,0x00010001,0
HKLM, System\CurrentControlSet\Services\XI102XE_HD,EnablePreviewPin,0x00010001,0

; 0 - Auto 601/709, 1 - Force 709, 2 - Force 601
HKLM, System\CurrentControlSet\Services\XI102XE_HD,YUVMode,0x00010001,0

HKLM, System\CurrentControlSet\Services\XI102XE_HD,EnableCombinedVideo,0x00010001,0

[XI102XE_HD.AddReg64]
HKLM, %RunOnce%, "XIStreamFirmware.dll",,"%11%\regsvr32.exe /s %10%\SysWOW64\XIStreamFirmware.dll"
HKLM, %RunOnce%, "XIStreamHDCapture.dll",,"%11%\regsvr32.exe /s %10%\SysWOW64\XIStreamHDCapture.dll"
HKLM, %RunOnce%, "XIStreamConfig.dll",,"%11%\regsvr32.exe /s %10%\SysWOW64\XIStreamConfig.dll"

[HDVideo.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%XI102XE_HD.HDVideo%
HKR,PageAliases,%VideoStreamConfigPropertyPage.CLSID%,1,0xDD, 0x6E, 0x32, 0x8B, 0x4F, 0xA8, 0xB8, 0x41, 0x8E, 0x1E, 0x5B, 0x4A, 0xD1, 0xBC, 0xE5, 0xAB

[SDIVideo1.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%XI102XE_HD.SDIVideo1%
HKR,PageAliases,%VideoStreamConfigPropertyPage.CLSID%,1,0xDD, 0x6E, 0x32, 0x8B, 0x4F, 0xA8, 0xB8, 0x41, 0x8E, 0x1E, 0x5B, 0x4A, 0xD1, 0xBC, 0xE5, 0xAB

[SDIVideo2.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%XI102XE_HD.SDIVideo2%
HKR,PageAliases,%VideoStreamConfigPropertyPage.CLSID%,1,0xDD, 0x6E, 0x32, 0x8B, 0x4F, 0xA8, 0xB8, 0x41, 0x8E, 0x1E, 0x5B, 0x4A, 0xD1, 0xBC, 0xE5, 0xAB

[HDMIAudio.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%XI102XE_HD.HDMIAudio%

[SDIAudio1.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%XI102XE_HD.SDIAudio1%

[SDIAudio2.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%XI102XE_HD.SDIAudio2%

[HDCombined.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%XI102XE_HD.HDCombined%
HKR,PageAliases,%VideoStreamConfigPropertyPage.CLSID%,1,0xDD, 0x6E, 0x32, 0x8B, 0x4F, 0xA8, 0xB8, 0x41, 0x8E, 0x1E, 0x5B, 0x4A, 0xD1, 0xBC, 0xE5, 0xAB

;---------------------------------------------------------------
;                Services
;---------------------------------------------------------------

[XI102XE_HD.Device.ntx86.Services]
AddService = XI102XE_HD,0x00000002,XI102XE_HD.ServiceInstall

[XI102XE_HD.Device.ntamd64.Services]
AddService = XI102XE_HD,0x00000002,XI102XE_HD.ServiceInstall

[XI102XE_HD.ServiceInstall]
DisplayName   = %XI102XE_HD.ServiceDesc%
ServiceType   = %SERVICE_KERNEL_DRIVER%
StartType     = %SERVICE_DEMAND_START%
ErrorControl  = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\XI102XE_HD.sys

;---------------------------------------------------------------
;                Services
;---------------------------------------------------------------

[Strings]
SERVICE_KERNEL_DRIVER 	= 1
SERVICE_DEMAND_START   	= 3
SERVICE_ERROR_NORMAL  	= 1
MAGEWELL           		= "Magewell Electronics Co., Ltd. (Nanjing, China)"
XI102XE_HD.ServiceDesc	= "XI102XE-HD Card Driver"
XI102XE_HD.DeviceDesc 	= "XI102XE-HD Card"
KSCATEGORY_CAPTURE		= "{65E8773D-8F56-11D0-A3B9-00A0C9223196}"
KSCATEGORY_VIDEO		= "{6994AD05-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_AUDIO		= "{6994AD04-93EF-11D0-A3CC-00A0C9223196}"
Proxy.CLSID				= "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
XI102XE_HD.AudioCapture	= "XI102XE-HD Audio Capture"
XI102XE_HD.HDVideo      = "HD Video (XI102XE-HD Card)"
XI102XE_HD.SDIVideo1    = "SDI Video 1 (XI102XE-HD Card)"
XI102XE_HD.SDIVideo2    = "SDI Video 2 (XI102XE-HD Card)"
XI102XE_HD.HDMIAudio	= "HDMI In (XI102XE-HD Card)"
XI102XE_HD.SDIAudio1	= "SDI In 1 (XI102XE-HD Card)"
XI102XE_HD.SDIAudio2	= "SDI In 2 (XI102XE-HD Card)"
XI102XE_HD.HDCombined 	= "HD Video Combined (XI102XE-HD Card)"
MediaCategories			= "SYSTEM\CurrentControlSet\Control\MediaCategories"
VideoStreamConfigPropertyPage.CLSID="{71F96467-78F3-11d0-A18C-00A0C9118956}"
RunOnce                 = "Software\Microsoft\Windows\CurrentVersion\RunOnce"

[Templates]
TemplateCount = 8
TemplateString1 = Strings, XI102XE_HD.DeviceDesc, XI102XE-HD Card %d
TemplateString2 = Strings, XI102XE_HD.HDVideo, HD Video (XI102XE-HD Card %d)
TemplateString3 = Strings, XI102XE_HD.SDIVideo1, SDI Video 1 (XI102XE-HD Card %d)
TemplateString4 = Strings, XI102XE_HD.SDIVideo2, SDI Video 2 (XI102XE-HD Card %d)
TemplateString5 = Strings, XI102XE_HD.HDMIAudio, HDMI In (XI102XE-HD Card %d)
TemplateString6 = Strings, XI102XE_HD.SDIAudio1, SDI In 1 (XI102XE-HD Card %d)
TemplateString7 = Strings, XI102XE_HD.SDIAudio2, SDI In 2 (XI102XE-HD Card %d)
TemplateString8 = Strings, XI102XE_HD.HDCombined, HD Video Combined (XI102XE-HD Card %d)
