;******************************************************************************
;
;   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 = XI200DE_HDMI.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]
XI200DE_HDMI.sys = 2
XIStreamFirmware.dll = 1
XIStreamHDCapture.dll = 1
XIStreamConfig.dll=1
XIStreamHDMI.dll=1
XIStreamFirmware_x64.dll = 1
XIStreamHDCapture_x64.dll = 1
XIStreamConfig_x64.dll=1
XIStreamHDMI_x64.dll=1

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

[XI200DE_HDMI.Drivers]
XI200DE_HDMI.sys

[XI200DE_HDMI.PropPages32]
XIStreamFirmware.dll
XIStreamHDCapture.dll
XIStreamConfig.dll
XIStreamHDMI.dll

[XI200DE_HDMI.PropPages64]
XIStreamFirmware_x64.dll
XIStreamHDCapture_x64.dll
XIStreamConfig_x64.dll
XIStreamHDMI_x64.dll

[XI200DE_HDMI.PropPagesWOW]
XIStreamFirmware.dll
XIStreamHDCapture.dll
XIStreamConfig.dll
XIStreamHDMI.dll

[XI200DE_HDMI.KnownFiles]
XI200DE_HDMI.sys=force
XIStreamFirmware.dll=force
XIStreamHDCapture.dll=force
XIStreamConfig.dll=force
XIStreamHDMI.dll=force
XIStreamFirmware_x64.dll=force
XIStreamHDCapture_x64.dll=force
XIStreamConfig_x64.dll=force
XIStreamHDMI_x64.dll=force

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

[MAGEWELL.ntx86]
%XI200DE_HDMI.DeviceDesc% = XI200DE_HDMI.Device, PCI\VEN_1172&DEV_D200&SUBSYS_D2001172

[MAGEWELL.ntamd64]
%XI200DE_HDMI.DeviceDesc% = XI200DE_HDMI.Device, PCI\VEN_1172&DEV_D200&SUBSYS_D2001172

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

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

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

[XI200DE_HDMI.RegSvr]
11,,XIStreamFirmware.dll,1
11,,XIStreamHDCapture.dll,1
11,,XIStreamConfig.dll,1
11,,XIStreamHDMI.dll,1

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

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

[XI200DE_HDMI.Device.ntx86.Interfaces]
AddInterface = %KSCATEGORY_CAPTURE%,"HDVideo1",HDVideo1,
AddInterface = %KSCATEGORY_VIDEO%,"HDVideo1",HDVideo1,
AddInterface = %KSCATEGORY_CAPTURE%,"HDVideo2",HDVideo2,
AddInterface = %KSCATEGORY_VIDEO%,"HDVideo2",HDVideo2,
AddInterface = %KSCATEGORY_CAPTURE%,"HDMIAudio1",HDMIAudio1,
AddInterface = %KSCATEGORY_AUDIO%,"HDMIAudio1",HDMIAudio1,
AddInterface = %KSCATEGORY_CAPTURE%,"HDMIAudio2",HDMIAudio2,
AddInterface = %KSCATEGORY_AUDIO%,"HDMIAudio2",HDMIAudio2,

[XI200DE_HDMI.Device.ntamd64.Interfaces]
AddInterface = %KSCATEGORY_CAPTURE%,"HDVideo1",HDVideo1,
AddInterface = %KSCATEGORY_VIDEO%,"HDVideo1",HDVideo1,
AddInterface = %KSCATEGORY_CAPTURE%,"HDVideo2",HDVideo2,
AddInterface = %KSCATEGORY_VIDEO%,"HDVideo2",HDVideo2,
AddInterface = %KSCATEGORY_CAPTURE%,"HDMIAudio1",HDMIAudio1,
AddInterface = %KSCATEGORY_AUDIO%,"HDMIAudio1",HDMIAudio1,
AddInterface = %KSCATEGORY_CAPTURE%,"HDMIAudio2",HDMIAudio2,
AddInterface = %KSCATEGORY_AUDIO%,"HDMIAudio2",HDMIAudio2,

[HDVideo1]
AddReg = HDVideo1.AddReg

[HDVideo2]
AddReg = HDVideo2.AddReg

[HDMIAudio1]
AddReg = HDMIAudio1.AddReg

[HDMIAudio2]
AddReg = HDMIAudio2.AddReg

[XI200DE_HDMI.AddReg]
HKR,,AssociatedFilters,,"wdmaud,swmidi,redbook"
HKR,,Driver,,XI200DE_HDMI.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,,%XI200DE_HDMI.AudioCapture%
HKR,Drivers\mixer\wdmaud.drv,Description,,%XI200DE_HDMI.AudioCapture%

HKLM, %MediaCategories%\{929AC462-E76D-44fa-90B5-ED4EE33157B1},Name,,"HDMI In 1"
HKLM, %MediaCategories%\{929AC463-E76D-44fa-90B5-ED4EE33157B1},Name,,"HDMI In 2"

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

; 0 - No Deinterlace, 1 - Blend Detinerlace, 2 - Motion Adaptive Deinterlace
HKLM, System\CurrentControlSet\Services\XI200DE_HDMI,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\XI200DE_HDMI,HDScale,0x00010001,1
; 0 - Color bar, 1 - Blue screen, 2 - Black screen
HKLM, System\CurrentControlSet\Services\XI200DE_HDMI,HDStatusImageMode,0x00010001,0
; 0 - Single stream, 1 - SimuStream with same video format, 2 - SimuStream with arbitrary video format
HKLM, System\CurrentControlSet\Services\XI200DE_HDMI,HDSimuStreamType,0x00010001,1

HKLM, System\CurrentControlSet\Services\XI200DE_HDMI,ActivePixelThreshold,0x00010001,64

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

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

[XI200DE_HDMI.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"
HKLM, %RunOnce%, "XIStreamHDMI.dll",,"%11%\regsvr32.exe /s %10%\SysWOW64\XIStreamHDMI.dll"

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

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

[HDMIAudio1.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%XI200DE_HDMI.HDMIAudio1%

[HDMIAudio2.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%XI200DE_HDMI.HDMIAudio2%

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

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

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

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

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

[Strings]
SERVICE_KERNEL_DRIVER 	= 1
SERVICE_DEMAND_START   	= 3
SERVICE_ERROR_NORMAL  	= 1
MAGEWELL           		= "Magewell Electronics Co., Ltd. (Nanjing, China)"
XI200DE_HDMI.ServiceDesc	= "XI200DE-HDMI Card Driver"
XI200DE_HDMI.DeviceDesc 	= "XI200DE-HDMI 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}"
XI200DE_HDMI.AudioCapture	= "XI200DE-HDMI Audio Capture"
XI200DE_HDMI.HDVideo1   = "HD Video 1 (XI200DE-HDMI Card)"
XI200DE_HDMI.HDVideo2   = "HD Video 2 (XI200DE-HDMI Card)"
XI200DE_HDMI.HDMIAudio1	= "HDMI In 1 (XI200DE-HDMI Card)"
XI200DE_HDMI.HDMIAudio2	= "HDMI In 2 (XI200DE-HDMI Card)"
MediaCategories			= "SYSTEM\CurrentControlSet\Control\MediaCategories"
VideoStreamConfigPropertyPage.CLSID="{71F96467-78F3-11d0-A18C-00A0C9118956}"
RunOnce                 = "Software\Microsoft\Windows\CurrentVersion\RunOnce"

[Templates]
TemplateCount = 5
TemplateString1 = Strings, XI200DE_HDMI.DeviceDesc, XI200DE-HDMI Card %d
TemplateString2 = Strings, XI200DE_HDMI.HDVideo1, HD Video 1 (XI200DE-HDMI Card %d)
TemplateString3 = Strings, XI200DE_HDMI.HDVideo2, HD Video 2 (XI200DE-HDMI Card %d)
TemplateString4 = Strings, XI200DE_HDMI.HDMIAudio1, HDMI In 1 (XI200DE-HDMI Card %d)
TemplateString5 = Strings, XI200DE_HDMI.HDMIAudio2, HDMI In 2 (XI200DE-HDMI Card %d)
