;===============================================================================
; Elgato Game Capture 4K60 S+
; Driver Install Script (64 bit)
; Copyright (c) 2018-20, Corsair Memory, Inc.
;-------------------------------------------------------------------------------
; History:
;-------------------------------------------------------------------------------
; 28-Aug-18 FMB 1.1.0.181.4   First customized INF file
; 29-Aug-18 FMB 1.1.0.181.5   ROOTFS/KERNEL/MCU/FPGA firmware upgrading support 
;                             (works with qcap_usbd 0.2.0)
; 05-Sep-18 FMB 1.1.0.182.0   CustomAnalogVideoFlexibleFpsPatchProperty -> 0 (Yxxx-328)
;                             H264/HEVC encoder selected by DirectShow media type 
;                             (works with qcap_usbd 0.3.0)
; 23-Oct-18 FMB 1.1.0.183.0   Removed unused media types, fixed A/V sync issue, EDID r/w
; 13-Nov-18 FMB 1.1.0.183.4   Firmware update, reading HDR meta data, interlaced
; 15-Nov-18 FMB 1.1.0.183.4   Fixed firmware auto-update
; 15-Nov-18 FMB 1.1.0.183.5   Fixed switching audio input, encoder settings
;                             Changed HDCP mode (no key)
; 29-Nov-18 FMB 1.1.0.183.5   Audio volume adjustment
;                             Profile/level encoder settings
; 10-Dec-18 FMB 1.1.0.183.7   Store encoder type persistently
;                             Allow to set firmware update folder  via custom interface
; 14-Dec-18 FMB 1.1.0.183.8   Added setting for stream type (H.264/HEVC) on property page
; 19-Dec-18 FMB 1.1.0.183.9   HDCP flag support
; 19-Dec-19 FMB 1.1.0.183.9#1 Allows to set VID/PID and product name
; 29-Mar-19 FMB 1.1.0.184     Support for custom commands
; 17-May-19 FMB 1.1.0.185.0#1 Fixed irregular audio timestamps (Yxxx-551)
; 16-Jul-19 FMB 1.1.0.185.4   Added interface for HDMI color range (Yxxx-496)
; 17-Jul-19 FMB 1.1.0.185.8   Added interface for EDID modes (Yxxx-549)
; 18-Aug-19 MS  1.1.0.185.8   Changed name from 4K60 S into 4K60 S+
; 28-Aug-19 FMB 1.1.0.186.3   More changes
; 11-Sep-19 FMB 1.1.0.186.5   Fixed visibility of certain settings on property page 
;                             Fixed wrong audio timestamps
; 11-Sep-19 FMB 1.1.0.186.5#1 Added PC power states (Yxxx-610)
;                             Fixed reading HDMI color range (Yxxx-496)
; 17-Sep-19 FMB 1.1.0.186.5#2 Allow reading back EDID mode (Yxxx-549)
;                             Fixed wrong audio chunk durations (Yxxx-606)
; 20-Sep-19 FMB 1.1.0.186.5#4 Fixed irregular audio timestamps (Yxxx-606)
;                             Fixed broken firmware update (Yxxx-616)
; 20-Sep-19 FMB 1.1.0.186.5#4 Fixed irregular audio timestamps (Yxxx-606)
;                             Fixed broken firmware update (Yxxx-616)
; 25-Sep-19 FMB 1.1.0.186.5#5 Fixed visibility of certain settings on property page (Yxxx-434)
; 23-Oct-19 MS  1.1.0.187.1   Check and update EDID when booting into USB mode (Yxxx-621)
;                             Show "mix" as audio input on property page (Yxxx-619)
; 28-Oct-19 MS  1.1.0.187.1#1 Fixed driver not loading (Yxxx-635)
; 30-Oct-19 MS  1.1.0.187.1#2 Fixed wrong strings for audio input on property page (Yxxx-639)
; 07-Nov-19 MS  1.1.0.187.1#3 Fixed reading EDID and EDID mode (Yxxx-644/Yxxx-645)
; 18-Nov-19 MS  1.1.0.187.1#4 Added Symbol files (Yxxx-642)
; 18-Dec-19 FMB 1.1.0.187.1#5 Reload last used EDID when driver is loaded (Yxxx-621)
; 20-Dec-19 FMB 1.1.0.187.1#6 Check EDID before update (Yxxx-621)
; 23-Dec-19 FMB 1.1.0.188.0   Improved speed of EDID reading (Yxxx-640)
;                             Hide compression settings from property page (Yxxx-666)
; 15-Jan-20 FMB 1.1.0.188.2#1 Always start up with H.264 (Yxxx-666)
; 17-Jan-20 FMB 1.1.0.188.2#2 Fixed intermittent USB reconnects (Yxxx-673)
; 21-Jan-20 FMB 1.1.0.188.2#3 New USB notification framework (Yxxx-673)
; 23-Jan-20 FMB 1.1.0.188.4   New USB notification framework. Finalized. (Yxxx-673)
; 03-Feb-20 FMB 1.1.0.188.4#2 Fixed bluescreens introduced with new USB notification framework (Yxxx-680)
; 05-Feb-20 FMB 1.1.0.188.4#3 Fixed bluescreens introduced with new USB notification framework (Yxxx-680/681/682)
; 20-Feb-20 FMB 1.1.0.188.6#0 Fixed setting default bitrate value (Yxxx-690)
; 27-Feb-20 FMB 1.1.0.189.0   Driver version updated only (Yxxx-693)
; 30-Apr-20 FMB 1.1.0.189.6   Multi-app support (Yxxx-704)
;                             Support for 4 instances (EGH-479)
; 30-Apr-20 FMB 1.1.0.189.7   Support for HW Rev. 2 (Yxxx-709)
;                             Multi-app support (disabled again, Yxxx-704)
;------------------------------------------------------------------------------
; Notes:
;------------------------------------------------------------------------------
; VersionTag = 1.1.0.189.7
;==============================================================================

[Version]
Signature   = "$CHICAGO$"
Class       = Media
ClassGUID   = {4d36e96c-e325-11ce-bfc1-08002be10318}
Provider    = %Provider%
DriverVer   = 05/08/2020, 1.1.0.189
CatalogFile = GameCapture4K60S+.cat


[SourceDisksNames]
1 = %DiskName%,,

[SourceDisksFiles]
UB3400.X64.SYS = 1
UB3400.X64.AX  = 1
UB3400.C64.AX  = 1
UB3400.X86.AX  = 1
UB3400.C86.AX  = 1
UB3400.HEX     = 1

[DestinationDirs]
GameCapture.CopySys       = 12          ; driver files
GameCapture.CopyDll32     = 10,SysWow64 ; 32-bit DLLs
GameCapture.CopyDll64     = 11          ; 64-bit DLLs

[ControlFlags]
ExcludeFromSelect = *


[Manufacturer]
%Provider% = Elgato, NTamd64

[Elgato.NTamd64]
%GameCapture.DeviceDesc%  = GameCapture, USB\VID_0FD9&PID_0068 ; Game Capture 4K60 S+
%GameCapture.DeviceDesc%  = GameCapture, USB\VID_0FD9&PID_0075 ; Game Capture 4K60 S+ Rev. 2 (Yxxx-709)

[GameCapture.NTamd64]
Include       = ks.inf, kscaptur.inf, ksfilter.inf, bda.inf, wdmaudio.inf
Needs         = KS.Registration, KSCAPTUR.Registration.NT, BDA.Installation.NT, WDMAUDIO.Registration.NT
AddReg        = GameCapture.AddReg, UB3400.AddReg
CopyFiles     = GameCapture.CopySys, GameCapture.CopyDll32, GameCapture.CopyDll64

;FMB NOTE: flag 0x00000004 = COPYFLG_NOVERSIONCHECK
[GameCapture.CopySys]
UB3400.X64.SYS  , , , 0x00000004

[GameCapture.CopyDll32]
UB3400.X86.AX   , , , 0x00000004
UB3400.C86.AX   , , , 0x00000004

[GameCapture.CopyDll64]
UB3400.X64.AX   , , , 0x00000004
UB3400.C64.AX   , , , 0x00000004

;===============================================================
;                R e g i s t r y
;===============================================================

[GameCapture.AddReg]
HKR,,DevLoader,,*NTKERN
HKR,,NTMPDriver,,UB3400.X64.SYS
HKR,,HardwareConfig,1,1
HKR,,USDClass,,"{0527D1D0-88C2-11D2-82C7-00C04F8EC183}"
HKR,,PageOutWhenUnopened,3,01

; ICopyProtNotifyProperty
;
HKCR,Wow6432Node\CLSID\{868DE3D7-1ED1-4698-AF07-0A4B57662572}, , , %CPNOTIFY.PROPERTY.INTERFACE.NAME%
HKCR,Wow6432Node\CLSID\{868DE3D7-1ED1-4698-AF07-0A4B57662572}\InprocServer32, , , UB3400.C86.AX
HKCR,Wow6432Node\CLSID\{868DE3D7-1ED1-4698-AF07-0A4B57662572}\InprocServer32, ThreadingModel, , Both
HKCR,CLSID\{868DE3D7-1ED1-4698-AF07-0A4B57662572}, , , %CPNOTIFY.PROPERTY.INTERFACE.NAME%
HKCR,CLSID\{868DE3D7-1ED1-4698-AF07-0A4B57662572}\InprocServer32, , , UB3400.C64.AX
HKCR,CLSID\{868DE3D7-1ED1-4698-AF07-0A4B57662572}\InprocServer32, ThreadingModel, , Both
HKLM,System\CurrentControlSet\Control\MediaInterfaces\{868DE3D7-1ED1-4698-AF07-0A4B57662572}, , , %CPNOTIFY.PROPERTY.INTERFACE.NAME%
HKLM,System\CurrentControlSet\Control\MediaInterfaces\{868DE3D7-1ED1-4698-AF07-0A4B57662572}, IID, 1, 00,00,00,00, 00,00, 00,00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

; ICustomProperty
;
HKCR,Wow6432Node\CLSID\{D1E5209F-68FD-4529-BEE0-5E7A1F479224}, , , %CUSTOM.PROPERTY.INTERFACE.NAME%
HKCR,Wow6432Node\CLSID\{D1E5209F-68FD-4529-BEE0-5E7A1F479224}\InprocServer32, , , UB3400.X86.AX
HKCR,Wow6432Node\CLSID\{D1E5209F-68FD-4529-BEE0-5E7A1F479224}\InprocServer32, ThreadingModel, , Both
HKCR,CLSID\{D1E5209F-68FD-4529-BEE0-5E7A1F479224}, , , %CUSTOM.PROPERTY.INTERFACE.NAME%
HKCR,CLSID\{D1E5209F-68FD-4529-BEE0-5E7A1F479224}\InprocServer32, , , UB3400.X64.AX
HKCR,CLSID\{D1E5209F-68FD-4529-BEE0-5E7A1F479224}\InprocServer32, ThreadingModel, , Both
HKLM,System\CurrentControlSet\Control\MediaInterfaces\{D1E5209F-68FD-4529-BEE0-5E7A1F479224}, , , %CUSTOM.PROPERTY.INTERFACE.NAME%
HKLM,System\CurrentControlSet\Control\MediaInterfaces\{D1E5209F-68FD-4529-BEE0-5E7A1F479224}, IID, 1, 9F,20,E5,D1, FD,68, 29,45, 0xBE, 0xE0, 0x5E, 0x7A, 0x1F, 0x47, 0x92, 0x24

; CCustomPropertyPage
;
HKCR,Wow6432Node\CLSID\{15E3F6CE-F3DD-454A-8DEA-E4A380FCCB24}, , , %CUSTOM.PROPERTY.PAGE.NAME%
HKCR,Wow6432Node\CLSID\{15E3F6CE-F3DD-454A-8DEA-E4A380FCCB24}\InprocServer32, , , UB3400.X86.AX
HKCR,Wow6432Node\CLSID\{15E3F6CE-F3DD-454A-8DEA-E4A380FCCB24}\InprocServer32, ThreadingModel, , Both
HKCR,CLSID\{15E3F6CE-F3DD-454A-8DEA-E4A380FCCB24}, , , %CUSTOM.PROPERTY.PAGE.NAME%
HKCR,CLSID\{15E3F6CE-F3DD-454A-8DEA-E4A380FCCB24}\InprocServer32, , , UB3400.X64.AX
HKCR,CLSID\{15E3F6CE-F3DD-454A-8DEA-E4A380FCCB24}\InprocServer32, ThreadingModel, , Both
HKLM,System\CurrentControlSet\Control\MediaSets\{D1E5209F-68FD-4529-BEE0-5E7A1F479224}\PropertyPages\{15E3F6CE-F3DD-454A-8DEA-E4A380FCCB24}, , , %CUSTOM.PROPERTY.PAGE.NAME%

[UB3400.AddReg]
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\{6F814BE9-9AF6-43CF-9249-C0345A010024},Name,0,"Video Capture"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\{6F814BE9-9AF6-43CF-9249-C0345A010024},Display,1,00,00,00,00
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\{6F814BE9-9AF6-43CF-9249-C0345A010124},Name,0,"Audio Capture"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\{6F814BE9-9AF6-43CF-9249-C0345A010124},Display,1,00,00,00,00
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\{6F814BE9-9AF6-43CF-9249-C0345A010524},Name,0,"Video Preview"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\{6F814BE9-9AF6-43CF-9249-C0345A010524},Display,1,00,00,00,00
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\{6F814BE9-9AF6-43CF-9249-C0345A010624},Name,0,"Audio Preview"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\{6F814BE9-9AF6-43CF-9249-C0345A010624},Display,1,00,00,00,00

HKR,,AnalogVideoCompressionKeyframeRatePropertyA,      0x00010001,0x00000020 ; 0x00000020 =      32 (0 ~   255)
HKR,,AnalogVideoCompressionQualityPropertyA,           0x00010001,0x00001770 ; 0x00000FA0 =    4000 (0 ~ 10000)
HKR,,AnalogVideoCompressionKeyframeRatePropertyB,      0x00010001,0x00000020 ; 0x00000020 =      32 (0 ~   255)
HKR,,AnalogVideoCompressionQualityPropertyB,           0x00010001,0x00001770 ; 0x00000FA0 =    4000 (0 ~ 10000)
HKR,,AnalogVideoCompressionKeyframeRatePropertyC,      0x00010001,0x00000020 ; 0x00000020 =      32 (0 ~   255)
HKR,,AnalogVideoCompressionQualityPropertyC,           0x00010001,0x00001770 ; 0x00000FA0 =    4000 (0 ~ 10000)
HKR,,AnalogVideoCompressionKeyframeRatePropertyD,      0x00010001,0x00000020 ; 0x00000020 =      32 (0 ~   255)
HKR,,AnalogVideoCompressionQualityPropertyD,           0x00010001,0x00001770 ; 0x00000FA0 =    4000 (0 ~ 10000)
HKR,,AnalogVideoCompressionKeyframeRatePropertyE,      0x00010001,0x00000020 ; 0x00000020 =      32 (0 ~   255)
HKR,,AnalogVideoCompressionQualityPropertyE,           0x00010001,0x00001770 ; 0x00000FA0 =    4000 (0 ~ 10000)
HKR,,AnalogVideoCompressionKeyframeRatePropertyF,      0x00010001,0x00000020 ; 0x00000020 =      32 (0 ~   255)
HKR,,AnalogVideoCompressionQualityPropertyF,           0x00010001,0x00001770 ; 0x00000FA0 =    4000 (0 ~ 10000)
HKR,,AnalogVideoCompressionKeyframeRatePropertyG,      0x00010001,0x00000020 ; 0x00000020 =      32 (0 ~   255)
HKR,,AnalogVideoCompressionQualityPropertyG,           0x00010001,0x00001770 ; 0x00000FA0 =    4000 (0 ~ 10000)
HKR,,AnalogVideoCompressionKeyframeRatePropertyH,      0x00010001,0x00000020 ; 0x00000020 =      32 (0 ~   255)
HKR,,AnalogVideoCompressionQualityPropertyH,           0x00010001,0x00001770 ; 0x00000FA0 =    4000 (0 ~ 10000)

HKR,,CustomAnalogVideoDeinterlaceTypePropertyA,        0x00010001,0x00000001 ; 0 = OFF / 1 = ON
HKR,,CustomAnalogVideoDeinterlaceTypePropertyB,        0x00010001,0x00000001 ; 0 = OFF / 1 = ON
HKR,,CustomAnalogVideoDeinterlaceTypePropertyC,        0x00010001,0x00000001 ; 0 = OFF / 1 = ON
HKR,,CustomAnalogVideoDeinterlaceTypePropertyD,        0x00010001,0x00000001 ; 0 = OFF / 1 = ON
HKR,,CustomAnalogVideoDeinterlaceTypePropertyE,        0x00010001,0x00000001 ; 0 = OFF / 1 = ON
HKR,,CustomAnalogVideoDeinterlaceTypePropertyF,        0x00010001,0x00000001 ; 0 = OFF / 1 = ON
HKR,,CustomAnalogVideoDeinterlaceTypePropertyG,        0x00010001,0x00000001 ; 0 = OFF / 1 = ON
HKR,,CustomAnalogVideoDeinterlaceTypePropertyH,        0x00010001,0x00000001 ; 0 = OFF / 1 = ON

HKR,,CustomEncoderVideoBitRateModePropertyA,           0x00010001,         1 ; 0 - VBR, 1 - CBR
HKR,,CustomEncoderVideoBitRateModePropertyB,           0x00010001,0x00000000 ; 0x00000000 =       0 (0 ~     2)
HKR,,CustomEncoderVideoBitRateModePropertyC,           0x00010001,0x00000000 ; 0x00000000 =       0 (0 ~     2)
HKR,,CustomEncoderVideoBitRateModePropertyD,           0x00010001,0x00000000 ; 0x00000000 =       0 (0 ~     2)
HKR,,CustomEncoderVideoBitRateModePropertyE,           0x00010001,0x00000000 ; 0x00000000 =       0 (0 ~     2)
HKR,,CustomEncoderVideoBitRateModePropertyF,           0x00010001,0x00000000 ; 0x00000000 =       0 (0 ~     2)
HKR,,CustomEncoderVideoBitRateModePropertyG,           0x00010001,0x00000000 ; 0x00000000 =       0 (0 ~     2)
HKR,,CustomEncoderVideoBitRateModePropertyH,           0x00010001,0x00000000 ; 0x00000000 =       0 (0 ~     2)

HKR,,CustomEncoderVideoBitRatePropertyA,               0x00010001, 140000000  ; 140000000 = 4194304 (0 ~      )
HKR,,CustomEncoderVideoBitRatePropertyB,               0x00010001,0x00400000 ; 0x00400000 = 4194304 (0 ~      )
HKR,,CustomEncoderVideoBitRatePropertyC,               0x00010001,0x00400000 ; 0x00400000 = 4194304 (0 ~      )
HKR,,CustomEncoderVideoBitRatePropertyD,               0x00010001,0x00400000 ; 0x00400000 = 4194304 (0 ~      )
HKR,,CustomEncoderVideoBitRatePropertyE,               0x00010001,0x00400000 ; 0x00100000 = 4194304 (0 ~      )
HKR,,CustomEncoderVideoBitRatePropertyF,               0x00010001,0x00400000 ; 0x00100000 = 4194304 (0 ~      )
HKR,,CustomEncoderVideoBitRatePropertyG,               0x00010001,0x00400000 ; 0x00100000 = 4194304 (0 ~      )
HKR,,CustomEncoderVideoBitRatePropertyH,               0x00010001,0x00400000 ; 0x00100000 = 4194304 (0 ~      )


HKR,,CustomAnalogAudioVolumeProperty,                  0x00010001,       176 ; Audio volume. Max = 176.
HKR,,CustomAnalogVideoFlexibleResolutionPatchProperty, 0x00010001,0x00000001 ; 0 = DISABLE / 1 = ENABLE
HKR,,CustomAnalogVideoFlexibleFpsPatchProperty,        0x00010001,0x00000000 ; 0 = DISABLE / 1 = ENABLE
HKR,,CustomOsdTextEnableProperty,                      0x00010001,0x00000001 ; 0 = DISABLE / 1 = ENABLE
HKR,,CustomAnalogVideo720OutputProperty,               0x00010001,0x00000001 ; 0 = DISABLE / 1 = ENABLE
HKR,,CustomInstancesPossibleProperty,                  0x00010001,0x00000000 ; 0 = DISABLE / 1 = ENABLE (= multi-app) (Yxxx-704)
HKR,,AnalogVideoDecoderStandardProperty,               0x00010001,0x00000001 ; 1 = NTSC M / 16 = PAL B
HKR,,AnalogCrossbarVideoInputProperty,                 0x00010001,0x00000000 ; 0 = HDMI / 1 = DVI-D / 2 = COMPONENT / 3 = DVI-A / 4 = SDI
HKR,,AnalogCrossbarAudioInputProperty,                 0x00010001,0x00000000 ; 0 = EMBEDDED AUDIO / 1 = LINE IN
HKR,,CustomCompanyMedicalProperty,                     0x00010001,0x00000001 ; 0 = DISABLE / 1 = ENABLE
HKR,,CustomCompanyPowerCreatorProperty,                0x00010001,0x00000001 ; 0 = DISABLE / 1 = ENABLE
HKR,,CustomCompanyElgatoProperty,                      0x00010001,0x00000001 ; 0 = DISABLE / 1 = ENABLE
HKR,,CustomEdidModeSelectProperty,                     0x00010001,0x00000002 ; 0 = INTERNAL / 1 = DISPLAY / 2 = MERGED
HKR,,CustomSoftwareLockProperty,                       0x00010001,0x00000001 ; 0 = DISABLE / 1 = ENABLE
HKR,,CustomSoftwareUIProperty,                         0x00010001,0x00000001 ; 0 = HIDE / 1 = SIMPLE / 2 = FULL
HKR,,CustomDeviceInfoDirectoryProperty, ,              "\??\%%SystemRoot%%\UB3400\" ; %%SystemRoot%% = Windows Directory (= %10%) 
HKR,,CustomAnalogVideoSkypePatchProperty,              0x00010001,0x00000000 ; 0 = DISABLE / 1 = ENABLE

;===============================================================
;                I n t e r f a c e s
;===============================================================

[GameCapture.NTamd64.Interfaces]
; Registration as CLSID_InputAudio required for OBS
AddInterface = %CLSID_InputAudio%       , %REFGUID_AUDIO%        , Audio_Interface
AddInterface = %KSCATEGORY_AUDIO%       , %REFGUID_AUDIO%        , Audio_Interface
AddInterface = %KSCATEGORY_CAPTURE%     , %REFGUID_AUDIO%        , Audio_Interface

AddInterface = %KSCATEGORY_VIDEO%       , %REFGUID_CAPTURE%      , AnalogCapture_Interface
AddInterface = %KSCATEGORY_CAPTURE%     , %REFGUID_CAPTURE%      , AnalogCapture_Interface


AddInterface = %CLSID_InputAudio%       , %REFGUID_AUDIO.01%     , Audio_Interface.01
AddInterface = %KSCATEGORY_AUDIO%       , %REFGUID_AUDIO.01%     , Audio_Interface.01
AddInterface = %KSCATEGORY_CAPTURE%     , %REFGUID_AUDIO.01%     , Audio_Interface.01

AddInterface = %KSCATEGORY_VIDEO%       , %REFGUID_CAPTURE.01%   , AnalogCapture_Interface.01
AddInterface = %KSCATEGORY_CAPTURE%     , %REFGUID_CAPTURE.01%   , AnalogCapture_Interface.01


AddInterface = %CLSID_InputAudio%       , %REFGUID_AUDIO.02%     , Audio_Interface.02
AddInterface = %KSCATEGORY_AUDIO%       , %REFGUID_AUDIO.02%     , Audio_Interface.02
AddInterface = %KSCATEGORY_CAPTURE%     , %REFGUID_AUDIO.02%     , Audio_Interface.02

AddInterface = %KSCATEGORY_VIDEO%       , %REFGUID_CAPTURE.02%   , AnalogCapture_Interface.02
AddInterface = %KSCATEGORY_CAPTURE%     , %REFGUID_CAPTURE.02%   , AnalogCapture_Interface.02


AddInterface = %CLSID_InputAudio%       , %REFGUID_AUDIO.03%     , Audio_Interface.03
AddInterface = %KSCATEGORY_AUDIO%       , %REFGUID_AUDIO.03%     , Audio_Interface.03
AddInterface = %KSCATEGORY_CAPTURE%     , %REFGUID_AUDIO.03%     , Audio_Interface.03

AddInterface = %KSCATEGORY_VIDEO%       , %REFGUID_CAPTURE.03%   , AnalogCapture_Interface.03
AddInterface = %KSCATEGORY_CAPTURE%     , %REFGUID_CAPTURE.03%   , AnalogCapture_Interface.03


AddInterface = %CLSID_InputAudio%       , %REFGUID_AUDIO.04%     , Audio_Interface.04
AddInterface = %KSCATEGORY_AUDIO%       , %REFGUID_AUDIO.04%     , Audio_Interface.04
AddInterface = %KSCATEGORY_CAPTURE%     , %REFGUID_AUDIO.04%     , Audio_Interface.04

AddInterface = %KSCATEGORY_VIDEO%       , %REFGUID_CAPTURE.04%   , AnalogCapture_Interface.04
AddInterface = %KSCATEGORY_CAPTURE%     , %REFGUID_CAPTURE.04%   , AnalogCapture_Interface.04


;---------------------------------------------------------------
; WDM streaming interfaces (audio)
;---------------------------------------------------------------

[Audio_Interface]
AddReg = Audio_Interface.AddReg

[Audio_Interface.AddReg]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%DShow.AudioCapture%

;---------------------------------------------------------------
; WDM streaming interfaces (analog TV/capture)
;---------------------------------------------------------------

[AnalogCapture_Interface]
AddReg = AnalogCapture_Interface.AddReg

[AnalogCapture_Interface.AddReg]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%DShow.AnalogCapture%

;---------------------------------------------------------------
; WDM streaming interfaces (audio)
;---------------------------------------------------------------

[Audio_Interface.01]
AddReg = Audio_Interface.AddReg.01

[Audio_Interface.AddReg.01]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%DShow.AudioCapture.01%

;---------------------------------------------------------------
; WDM streaming interfaces (analog TV/capture)
;---------------------------------------------------------------

[AnalogCapture_Interface.01]
AddReg = AnalogCapture_Interface.AddReg.01

[AnalogCapture_Interface.AddReg.01]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%DShow.AnalogCapture.01%

;---------------------------------------------------------------
; WDM streaming interfaces (audio)
;---------------------------------------------------------------

[Audio_Interface.02]
AddReg = Audio_Interface.AddReg.02

[Audio_Interface.AddReg.02]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%DShow.AudioCapture.02%

;---------------------------------------------------------------
; WDM streaming interfaces (analog TV/capture)
;---------------------------------------------------------------

[AnalogCapture_Interface.02]
AddReg = AnalogCapture_Interface.AddReg.02

[AnalogCapture_Interface.AddReg.02]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%DShow.AnalogCapture.02%

;---------------------------------------------------------------
; WDM streaming interfaces (audio)
;---------------------------------------------------------------

[Audio_Interface.03]
AddReg = Audio_Interface.AddReg.03

[Audio_Interface.AddReg.03]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%DShow.AudioCapture.03%

;---------------------------------------------------------------
; WDM streaming interfaces (analog TV/capture)
;---------------------------------------------------------------

[AnalogCapture_Interface.03]
AddReg = AnalogCapture_Interface.AddReg.03

[AnalogCapture_Interface.AddReg.03]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%DShow.AnalogCapture.03%

;---------------------------------------------------------------
; WDM streaming interfaces (audio)
;---------------------------------------------------------------

[Audio_Interface.04]
AddReg = Audio_Interface.AddReg.04

[Audio_Interface.AddReg.04]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%DShow.AudioCapture.04%

;---------------------------------------------------------------
; WDM streaming interfaces (analog TV/capture)
;---------------------------------------------------------------

[AnalogCapture_Interface.04]
AddReg = AnalogCapture_Interface.AddReg.04

[AnalogCapture_Interface.AddReg.04]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%DShow.AnalogCapture.04%


;===============================================================
;                S e r v i c e s
;===============================================================

[GameCapture.NTamd64.Services] 
;TODO: Rename service key (=1st param): use same service key as in the original driver
AddService = UB3400.X64, 0x00000002, GameCapture.ServiceInstall

[GameCapture.ServiceInstall]
DisplayName   = %Service.FriendlyName%
ServiceType   = %SERVICE_KERNEL_DRIVER%
StartType     = %SERVICE_DEMAND_START%
ErrorControl  = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\UB3400.X64.SYS


;===============================================================
;                S t r i n g s
;===============================================================

[Strings]
;---------------------------------------------------------------
; Non-customizable (Windows)
;---------------------------------------------------------------
; Registry types
REG_SZ                           = 0x00000000
REG_MULTI_SZ                     = 0x00010000
REG_EXPAND_SZ                    = 0x00020000
REG_DWORD                        = 0x00010001

; Service: ServiceType values
SERVICE_KERNEL_DRIVER            = 0x00000001
SERVICE_FILE_SYSTEM_DRIVER       = 0x00000002
SERVICE_ADAPTER                  = 0x00000004
SERVICE_RECOGNIZER_DRIVER        = 0x00000008
SERVICE_WIN32_OWN_PROCESS        = 0x00000010
SERVICE_WIN32_SHARE_PROCESS      = 0x00000020
SERVICE_INTERACTIVE_PROCESS      = 0x00000100
SERVICE_INTERACTIVE_SHARE_PROCESS= 0x00000120

; Service: StartType values
SERVICE_BOOT_START               = 0x00000000
SERVICE_SYSTEM_START             = 0x00000001
SERVICE_AUTO_START               = 0x00000002
SERVICE_DEMAND_START             = 0x00000003
SERVICE_DISABLED                 = 0x00000004

; Service: ErrorControl values
SERVICE_ERROR_IGNORE             = 0x00000000
SERVICE_ERROR_NORMAL             = 0x00000001
SERVICE_ERROR_SEVERE             = 0x00000002
SERVICE_ERROR_CRITICAL           = 0x00000003

; DirectShow filter categories                                                DirectShow category name
CLSID_InputAudio                 = "{33D9A762-90C8-11D0-BD43-00A0C911CE86}"
KSCATEGORY_AUDIO                 = "{6994AD04-93EF-11D0-A3CC-00A0C9223196}"

KSCATEGORY_VIDEO                 = "{6994AD05-93EF-11D0-A3CC-00A0C9223196}"

KSCATEGORY_CAPTURE               = "{65E8773D-8F56-11D0-A3B9-00A0C9223196}" ; WDM Streaming capture Devices (audio & video)


; Proxy CLSIDs (KsProxy.ax)
PROXY_CAPTURE                    = "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
PROXY_TVTUNER                    = "{266EEE40-6C63-11cf-8A03-00AA006ECB65}"
PROXY_CROSSBAR                   = "{71F96460-78F3-11D0-A18C-00A0C9118956}"
PROXY_TVAUDIO                    = "{71F96462-78F3-11D0-A18C-00A0C9118956}"


;---------------------------------------------------------------
; Non-customizable (this driver)
;---------------------------------------------------------------
; Reference guids
REFGUID_AUDIO                    = "{6F814BE9-9AF6-43CF-9249-C0345A000324}"
REFGUID_AUDIO.01                 = "{6F814BE9-9AF6-43CF-9249-C03401000324}"
REFGUID_AUDIO.02                 = "{6F814BE9-9AF6-43CF-9249-C03402000324}"
REFGUID_AUDIO.03                 = "{6F814BE9-9AF6-43CF-9249-C03403000324}"
REFGUID_AUDIO.04                 = "{6F814BE9-9AF6-43CF-9249-C03404000324}"

REFGUID_CAPTURE                  = "{6F814BE9-9AF6-43CF-9249-C0345A000224}"
REFGUID_CAPTURE.01               = "{6F814BE9-9AF6-43CF-9249-C03401000224}"
REFGUID_CAPTURE.02               = "{6F814BE9-9AF6-43CF-9249-C03402000224}"
REFGUID_CAPTURE.03               = "{6F814BE9-9AF6-43CF-9249-C03403000224}"
REFGUID_CAPTURE.04               = "{6F814BE9-9AF6-43CF-9249-C03404000224}"


;---------------------------------------------------------------
; Customizable
;---------------------------------------------------------------

Provider                 = "Elgato "
DiskName                 = "Elgato Driver Disk"

; Service strings
Service.FriendlyName     = "Game Capture 4K60 S+ Service"

; Device Manager
GameCapture.DeviceDesc   = "Game Capture 4K60 S+"
GameCapture.DeviceDesc2  = "Game Capture 4K60 S+ (Prototype)

; DirectShow filter names
DShow.AudioCapture       = "Game Capture 4K60 S+ Audio (0)"
DShow.AudioCapture.01    = "Game Capture 4K60 S+ Audio"
DShow.AudioCapture.02    = "Game Capture 4K60 S+ Audio (2)"
DShow.AudioCapture.03    = "Game Capture 4K60 S+ Audio (3)"
DShow.AudioCapture.04    = "Game Capture 4K60 S+ Audio (4)"

DShow.AnalogCapture      = "Game Capture 4K60 S+ (0)"
DShow.AnalogCapture.01   = "Game Capture 4K60 S+"
DShow.AnalogCapture.02   = "Game Capture 4K60 S+ (2)"
DShow.AnalogCapture.03   = "Game Capture 4K60 S+ (3)"
DShow.AnalogCapture.04   = "Game Capture 4K60 S+ (4)"

CPNOTIFY.PROPERTY.INTERFACE.NAME = "Game Capture 4K60 S+ (CopyProtNotify Property Interface)"
CUSTOM.PROPERTY.INTERFACE.NAME   = "Game Capture 4K60 S+ (Custom Property Interface)"
CUSTOM.PROPERTY.PAGE.NAME        = "Game Capture 4K60 S+ (Custom Property Page)"

