ifndef _KSMEDIA_
define _KSMEDIA_
ifndef _KS_
.err <KS.INC must be included before KSMEDIA.INC>
endif

KSMULTIPLE_DATA_PROP	STRUC
Property		KSPROPERTY <>
MultipleItem		KSMULTIPLE_ITEM <>
KSMULTIPLE_DATA_PROP	ENDS
PKSMULTIPLE_DATA_PROP	typedef ptr KSMULTIPLE_DATA_PROP

DEFINE_GUIDSTRUCT("05908040-3246-11D0-A5D6-28DB04C10000", KSMEDIUMSETID_MidiBus)
DEFINE_GUIDSTRUCT("A18C15EC-CE43-11D0-ABE7-00A0C9223196", KSMEDIUMSETID_VPBus)
DEFINE_GUIDSTRUCT("3A13EB40-30A7-11D0-A5D6-28DB04C10000", KSINTERFACESETID_Media)

KSINTERFACE_MEDIA_MUSIC equ 0
KSINTERFACE_MEDIA_WAVE_BUFFERED equ 1
KSINTERFACE_MEDIA_WAVE_QUEUED equ 2

if (NTDDI_VERSION GE NTDDI_WINXP)

ifndef INIT_USBAUDIO_MID
INIT_USBAUDIO_MID macro guid, id
	endm
INIT_EXBUS_MANUFACTURER_ID equ <INIT_USBAUDIO_MID>
IS_COMPATIBLE_USBAUDIO_MID macro guid
	endm
endif

ifndef INIT_USBAUDIO_PID
INIT_USBAUDIO_PID macro guid, id
	endm
EXTRACT_USBAUDIO_PID macro guid
	endm
DEFINE_USBAUDIO_PID_GUID macro id
	endm
INIT_EXBUS_PRODUCT_ID	equ <INIT_USBAUDIO_PID>
IS_COMPATIBLE_USBAUDIO_PID macro guid
	endm
endif

ifndef INIT_USBAUDIO_PRODUCT_NAME
INIT_USBAUDIO_PRODUCT_NAME macro guid, vid, pid, strIndex
	endm
DEFINE_USBAUDIO_PRODUCT_NAME macro vid, pid, strIndex
	endm
endif

INIT_EXBUS_PRODUCT_NAME equ INIT_USBAUDIO_PRODUCT_NAME

DEFINE_GUIDSTRUCT("8F1275F0-26E9-4264-BA4D-39FFF01D94AA", KSCOMPONENTID_USBAUDIO);

endif

INIT_USB_TERMINAL macro guid, id
	endm
EXTRACT_USB_TERMINAL macro guid
	endm
DEFINE_USB_TERMINAL_GUID macro id
	endm

DEFINE_GUIDSTRUCT("DFF21BE0-F70F-11D0-B917-00A0C9223196", KSNODETYPE_INPUT_UNDEFINED)
DEFINE_GUIDSTRUCT("DFF21BE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MICROPHONE)
DEFINE_GUIDSTRUCT("DFF21BE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DESKTOP_MICROPHONE)
DEFINE_GUIDSTRUCT("DFF21BE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PERSONAL_MICROPHONE)
DEFINE_GUIDSTRUCT("DFF21BE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE)
DEFINE_GUIDSTRUCT("DFF21BE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MICROPHONE_ARRAY)
DEFINE_GUIDSTRUCT("DFF21BE6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PROCESSING_MICROPHONE_ARRAY)
if (NTDDI_VERSION GE NTDDI_WINXP)
DEFINE_GUIDSTRUCT("830a44f2-a32d-476b-be97-42845673b35a", KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR)
endif

DEFINE_GUIDSTRUCT("DFF21CE0-F70F-11D0-B917-00A0C9223196", KSNODETYPE_OUTPUT_UNDEFINED)
DEFINE_GUIDSTRUCT("DFF21CE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SPEAKER)
DEFINE_GUIDSTRUCT("DFF21CE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HEADPHONES)
DEFINE_GUIDSTRUCT("DFF21CE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO)
DEFINE_GUIDSTRUCT("DFF21CE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DESKTOP_SPEAKER)
DEFINE_GUIDSTRUCT("DFF21CE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ROOM_SPEAKER)
DEFINE_GUIDSTRUCT("DFF21CE6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_COMMUNICATION_SPEAKER)
DEFINE_GUIDSTRUCT("DFF21CE7-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER)
DEFINE_GUIDSTRUCT("DFF21DE0-F70F-11D0-B917-00A0C9223196", KSNODETYPE_BIDIRECTIONAL_UNDEFINED)
DEFINE_GUIDSTRUCT("DFF21DE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HANDSET)

;KSNODETYPE_HEADSET_MICROPHONE equ KSNODETYPE_PERSONAL_MICROPHONE
;KSNODETYPE_HEADSET_SPEAKERS equ KSNODETYPE_COMMUNICATION_SPEAKER

DEFINE_GUIDSTRUCT("DFF21DE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HEADSET)
DEFINE_GUIDSTRUCT("DFF21DE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION)
DEFINE_GUIDSTRUCT("DFF21DE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE)
DEFINE_GUIDSTRUCT("DFF21DE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE)
DEFINE_GUIDSTRUCT("DFF21EE0-F70F-11D0-B917-00A0C9223196", KSNODETYPE_TELEPHONY_UNDEFINED)
DEFINE_GUIDSTRUCT("DFF21EE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PHONE_LINE)
DEFINE_GUIDSTRUCT("DFF21EE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_TELEPHONE)
DEFINE_GUIDSTRUCT("DFF21EE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DOWN_LINE_PHONE)
DEFINE_GUIDSTRUCT("DFF21FE0-F70F-11D0-B917-00A0C9223196", KSNODETYPE_EXTERNAL_UNDEFINED)
DEFINE_GUIDSTRUCT("DFF21FE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ANALOG_CONNECTOR)
DEFINE_GUIDSTRUCT("DFF21FE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DIGITAL_AUDIO_INTERFACE)
DEFINE_GUIDSTRUCT("DFF21FE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LINE_CONNECTOR)
DEFINE_GUIDSTRUCT("DFF21FE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LEGACY_AUDIO_CONNECTOR)
DEFINE_GUIDSTRUCT("DFF21FE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SPDIF_INTERFACE)
DEFINE_GUIDSTRUCT("DFF21FE6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_1394_DA_STREAM)
DEFINE_GUIDSTRUCT("DFF21FE7-F70F-11D0-B917-00A0C9223196", KSNODETYPE_1394_DV_STREAM_SOUNDTRACK)
DEFINE_GUIDSTRUCT("DFF220E0-F70F-11D0-B917-00A0C9223196", KSNODETYPE_EMBEDDED_UNDEFINED)
DEFINE_GUIDSTRUCT("DFF220E1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE)
DEFINE_GUIDSTRUCT("DFF220E2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_EQUALIZATION_NOISE)
DEFINE_GUIDSTRUCT("DFF220E3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_CD_PLAYER)
DEFINE_GUIDSTRUCT("DFF220E4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE)
DEFINE_GUIDSTRUCT("DFF220E5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE)
DEFINE_GUIDSTRUCT("DFF220E6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MINIDISK)
DEFINE_GUIDSTRUCT("DFF220E7-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ANALOG_TAPE)
DEFINE_GUIDSTRUCT("DFF220E8-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PHONOGRAPH)
DEFINE_GUIDSTRUCT("DFF220E9-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VCR_AUDIO)
DEFINE_GUIDSTRUCT("DFF220EA-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VIDEO_DISC_AUDIO)
DEFINE_GUIDSTRUCT("DFF220EB-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DVD_AUDIO)
DEFINE_GUIDSTRUCT("DFF220EC-F70F-11D0-B917-00A0C9223196", KSNODETYPE_TV_TUNER_AUDIO)
DEFINE_GUIDSTRUCT("DFF220ED-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SATELLITE_RECEIVER_AUDIO)
DEFINE_GUIDSTRUCT("DFF220EE-F70F-11D0-B917-00A0C9223196", KSNODETYPE_CABLE_TUNER_AUDIO)
DEFINE_GUIDSTRUCT("DFF220EF-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DSS_AUDIO)
DEFINE_GUIDSTRUCT("DFF220F0-F70F-11D0-B917-00A0C9223196", KSNODETYPE_RADIO_RECEIVER)
DEFINE_GUIDSTRUCT("DFF220F1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_RADIO_TRANSMITTER)
DEFINE_GUIDSTRUCT("DFF220F2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MULTITRACK_RECORDER)
DEFINE_GUIDSTRUCT("DFF220F3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SYNTHESIZER)
DEFINE_GUIDSTRUCT("D1B9CC2A-F519-417f-91C9-55FA65481001", KSNODETYPE_HDMI_INTERFACE)
DEFINE_GUIDSTRUCT("E47E4031-3EA6-418d-8F9B-B73843CCBA97", KSNODETYPE_DISPLAYPORT_INTERFACE)
DEFINE_GUIDSTRUCT("265E0C3F-FA39-4df3-AB04-BE01B91E299A", KSNODETYPE_MIDI_JACK)
DEFINE_GUIDSTRUCT("01C6FE66-6E48-4c65-AC9B-52DB5D656C7E", KSNODETYPE_MIDI_ELEMENT)
DEFINE_GUIDSTRUCT("3A264481-E52C-4b82-8E7A-C8E2F91DC380", PINNAME_SPDIF_OUT)
DEFINE_GUIDSTRUCT("15DC9025-22AD-41b3-8875-F4CEB0299E20", PINNAME_SPDIF_IN)
DEFINE_GUIDSTRUCT("387BFC03-E7EF-4901-86E0-35B7C32B00EF", PINNAME_HDMI_OUT)
DEFINE_GUIDSTRUCT("21FBB329-1A4A-48da-A076-2318A3C59B26", PINNAME_DISPLAYPORT_OUT)

if (NTDDI_VERSION LT NTDDI_VISTA)

DEFINE_GUIDSTRUCT("423274A0-8B81-11D1-A050-0000F8004788", KSNODETYPE_SWSYNTH)
DEFINE_GUIDSTRUCT("CB9BEFA0-A251-11D1-A050-0000F8004788", KSNODETYPE_SWMIDI)

endif

if (NTDDI_VERSION GE NTDDI_WINXP)

DEFINE_GUIDSTRUCT("FFBB6E3F-CCFE-4D84-90D9-421418B03A8E", KSNODETYPE_DRM_DESCRAMBLE)

endif

DEFINE_GUIDSTRUCT("6994AD04-93EF-11D0-A3CC-00A0C9223196", KSCATEGORY_AUDIO)
DEFINE_GUIDSTRUCT("6994AD05-93EF-11D0-A3CC-00A0C9223196", KSCATEGORY_VIDEO)

if (NTDDI_VERSION GE NTDDI_VISTA)
DEFINE_GUIDSTRUCT("EB115FFC-10C8-4964-831D-6DCB02E6F23F", KSCATEGORY_REALTIME)
endif

DEFINE_GUIDSTRUCT("6994AD06-93EF-11D0-A3CC-00A0C9223196", KSCATEGORY_TEXT)
DEFINE_GUIDSTRUCT("67C9CC3C-69C4-11D2-8759-00A0C9223196", KSCATEGORY_NETWORK)
DEFINE_GUIDSTRUCT("DDA54A40-1E4C-11D1-A050-405705C10000", KSCATEGORY_TOPOLOGY)
DEFINE_GUIDSTRUCT("3503EAC4-1F26-11D1-8AB0-00A0C9223196", KSCATEGORY_VIRTUAL)
DEFINE_GUIDSTRUCT("BF963D80-C559-11D0-8A2B-00A0C9255AC1", KSCATEGORY_ACOUSTIC_ECHO_CANCEL)

if (NTDDI_VERSION LT NTDDI_VISTA)

DEFINE_GUIDSTRUCT("A7C7A5B1-5AF3-11D1-9CED-00A024BF0407", KSCATEGORY_SYSAUDIO)
DEFINE_GUIDSTRUCT("3E227E76-690D-11D2-8161-0000F8775BF1", KSCATEGORY_WDMAUD)

endif

if (NTDDI_VERSION GE NTDDI_WINXP AND NTDDI_VERSION LT NTDDI_VISTA)

DEFINE_GUIDSTRUCT("9BAF9572-340C-11D3-ABDC-00A0C90AB16F", KSCATEGORY_AUDIO_GFX)

endif

if (NTDDI_VERSION GE NTDDI_WINXP AND NTDDI_VERSION LT NTDDI_VISTA)

DEFINE_GUIDSTRUCT("9EA331FA-B91B-45F8-9285-BD2BC77AFCDE", KSCATEGORY_AUDIO_SPLITTER)

endif

;STATIC_KSCATEGORY_SYNTHESIZER equ STATIC_KSNODETYPE_SYNTHESIZER
;KSCATEGORY_SYNTHESIZER equ KSNODETYPE_SYNTHESIZER

if (NTDDI_VERSION GE NTDDI_WINXP)

;STATIC_KSCATEGORY_DRM_DESCRAMBLE equ STATIC_KSNODETYPE_DRM_DESCRAMBLE
;KSCATEGORY_DRM_DESCRAMBLE equ KSNODETYPE_DRM_DESCRAMBLE

endif

if (NTDDI_VERSION LT NTDDI_VISTA)

DEFINE_GUIDSTRUCT("FBF6F530-07B9-11D2-A71E-0000F8004788", KSCATEGORY_AUDIO_DEVICE)
DEFINE_GUIDSTRUCT("D6C5066E-72C1-11D2-9755-0000F8004788", KSCATEGORY_PREFERRED_WAVEOUT_DEVICE)
DEFINE_GUIDSTRUCT("D6C50671-72C1-11D2-9755-0000F8004788", KSCATEGORY_PREFERRED_WAVEIN_DEVICE)
DEFINE_GUIDSTRUCT("D6C50674-72C1-11D2-9755-0000F8004788", KSCATEGORY_PREFERRED_MIDIOUT_DEVICE)

endif


DEFINE_GUIDSTRUCT("47A4FA20-A251-11D1-A050-0000F8004788", KSCATEGORY_WDMAUD_USE_PIN_NAME)
DEFINE_GUIDSTRUCT("74f3aea8-9768-11d1-8e07-00a0c95ec22e", KSCATEGORY_ESCALANTE_PLATFORM_DRIVER)
DEFINE_GUIDSTRUCT("73646976-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_VIDEO)
DEFINE_GUIDSTRUCT("73647561-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_AUDIO)
DEFINE_GUIDSTRUCT("73747874-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_TEXT)

ifndef DEFINE_WAVEFORMATEX_GUID
DEFINE_WAVEFORMATEX_GUID macro x
	exitm<(x), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71>
	endm
endif

ifndef STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX
DEFINE_GUIDSTRUCT("00000000-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_WAVEFORMATEX)
endif

ifndef INIT_WAVEFORMATEX_GUID
INIT_WAVEFORMATEX_GUID macro Guid, x
	endm
endif

ifndef EXTRACT_WAVEFORMATEX_ID
EXTRACT_WAVEFORMATEX_ID macro Guid
	endm
endif

ifndef IS_VALID_WAVEFORMATEX_GUID
IS_VALID_WAVEFORMATEX_GUID macro Guid
	endm
endif

ifndef INIT_MMREG_MID
INIT_MMREG_MID macro guid, id
	endm
EXTRACT_MMREG_MID macro Guid
	endm
DEFINE_MMREG_MID_GUID macro id
	endm
IS_COMPATIBLE_MMREG_MID macro Guid
	endm
endif

ifndef INIT_MMREG_PID
INIT_MMREG_PID macro guid, id
	endm
EXTRACT_MMREG_PID macro Guid
	endm
DEFINE_MMREG_PID_GUID macro id
	endm
IS_COMPATIBLE_MMREG_PID macro Guid
	endm
endif

DEFINE_GUIDSTRUCT("6dba3190-67bd-11cf-a0f7-0020afd156e4", KSDATAFORMAT_SUBTYPE_ANALOG)

ifndef STATIC_KSDATAFORMAT_SUBTYPE_PCM
DEFINE_GUIDSTRUCT("00000001-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_PCM)
endif

ifdef _INC_MMREG
ifndef STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
DEFINE_GUIDSTRUCT("00000003-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)
endif
if (NTDDI_VERSION GE NTDDI_WINXP)
DEFINE_GUIDSTRUCT("00000009-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_DRM)
endif
DEFINE_GUIDSTRUCT("00000006-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_ALAW)
DEFINE_GUIDSTRUCT("00000007-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_MULAW)
DEFINE_GUIDSTRUCT("00000002-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_ADPCM)
DEFINE_GUIDSTRUCT("00000050-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_MPEG)
endif

DEFINE_GUIDSTRUCT("AD98D184-AAC3-11D0-A41C-00A0C9223196", KSDATAFORMAT_SPECIFIER_VC_ID)
DEFINE_GUIDSTRUCT("05589f81-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
DEFINE_GUIDSTRUCT("518590a2-a184-11d0-8522-00c04fd9baf3", KSDATAFORMAT_SPECIFIER_DSOUND)

if defined(_INC_MMSYSTEM) OR defined(_INC_MMREG)

.pragma pack(push, 1)

KSDATAFORMAT_WAVEFORMATEX STRUC
DataFormat		KSDATAFORMAT <>
WaveFormatEx		WAVEFORMATEX <>
KSDATAFORMAT_WAVEFORMATEX ENDS
PKSDATAFORMAT_WAVEFORMATEX typedef ptr KSDATAFORMAT_WAVEFORMATEX

ifndef _WAVEFORMATEXTENSIBLE_
_WAVEFORMATEXTENSIBLE_ equ 1
WAVEFORMATEXTENSIBLE	STRUC
Format			WAVEFORMATEX ?
UNION ; {
wValidBitsPerSample	dw ?
wSamplesPerBlock	dw ?
wReserved		dw ?
ENDS ;Samples
dwChannelMask		dd ?
SubFormat		GUID <>
WAVEFORMATEXTENSIBLE	ENDS
PWAVEFORMATEXTENSIBLE	typedef ptr WAVEFORMATEXTENSIBLE
endif

ifndef _WAVEFORMATEXTENSIBLE_IEC61937_
_WAVEFORMATEXTENSIBLE_IEC61937_ equ 1
WAVEFORMATEXTENSIBLE_IEC61937 STRUC
FormatExt		WAVEFORMATEXTENSIBLE <>
dwEncodedSamplesPerSec	dd ?
dwEncodedChannelCount	dd ?
dwAverageBytesPerSec	dd ?
WAVEFORMATEXTENSIBLE_IEC61937 ENDS
PWAVEFORMATEXTENSIBLE_IEC61937 typedef ptr WAVEFORMATEXTENSIBLE_IEC61937
endif

ifndef WAVE_FORMAT_EXTENSIBLE
WAVE_FORMAT_EXTENSIBLE	equ 0xFFFE
endif

KSDSOUND_BUFFERDESC	STRUC
Flags			ULONG ?
Control			ULONG ?
WaveFormatEx		WAVEFORMATEX <>
KSDSOUND_BUFFERDESC	ENDS
PKSDSOUND_BUFFERDESC	typedef ptr KSDSOUND_BUFFERDESC

KSDATAFORMAT_DSOUND	STRUC
DataFormat		KSDATAFORMAT <>
BufferDesc		KSDSOUND_BUFFERDESC <>
KSDATAFORMAT_DSOUND	ENDS
PKSDATAFORMAT_DSOUND	typedef ptr KSDATAFORMAT_DSOUND

.pragma pack(pop)

endif

KSDSOUND_BUFFER_PRIMARY equ 0x00000001
KSDSOUND_BUFFER_STATIC	equ 0x00000002
KSDSOUND_BUFFER_LOCHARDWARE equ 0x00000004
KSDSOUND_BUFFER_LOCSOFTWARE equ 0x00000008

KSDSOUND_BUFFER_CTRL_3D equ 0x00000001
KSDSOUND_BUFFER_CTRL_FREQUENCY equ 0x00000002
KSDSOUND_BUFFER_CTRL_PAN equ 0x00000004
KSDSOUND_BUFFER_CTRL_VOLUME equ 0x00000008
KSDSOUND_BUFFER_CTRL_POSITIONNOTIFY equ 0x00000010

KSAUDIO_POSITION	STRUC
ifdef _NTDDK_
PlayOffset		ULONGLONG ?
WriteOffset		ULONGLONG ?
else
PlayOffset		dd ?
WriteOffset		dd ?
endif
KSAUDIO_POSITION	ENDS
PKSAUDIO_POSITION	typedef ptr KSAUDIO_POSITION

if (NTDDI_VERSION GE NTDDI_VISTA)
KSMICARRAY_MICTYPE_OMNIDIRECTIONAL equ 0
KSMICARRAY_MICTYPE_SUBCARDIOID equ 1
KSMICARRAY_MICTYPE_CARDIOID equ 2
KSMICARRAY_MICTYPE_SUPERCARDIOID equ 3
KSMICARRAY_MICTYPE_HYPERCARDIOID equ 4
KSMICARRAY_MICTYPE_8SHAPED equ 5
KSMICARRAY_MICTYPE_VENDORDEFINED equ 0x0F

KSAUDIO_MICROPHONE_COORDINATES STRUC
usType			USHORT ?
wXCoord			SWORD ?
wYCoord			SWORD ?
wZCoord			SWORD ?
wVerticalAngle		SWORD ?
wHorizontalAngle	SWORD ?
KSAUDIO_MICROPHONE_COORDINATES ENDS
PKSAUDIO_MICROPHONE_COORDINATES typedef ptr KSAUDIO_MICROPHONE_COORDINATES

KSMICARRAY_MICARRAYTYPE_LINEAR equ 0
KSMICARRAY_MICARRAYTYPE_PLANAR equ 1
KSMICARRAY_MICARRAYTYPE_3D equ 2

KSAUDIO_MIC_ARRAY_GEOMETRY STRUC
usVersion		USHORT ?
usMicArrayType		USHORT ?
wVerticalAngleBegin	SWORD ?
wVerticalAngleEnd	SWORD ?
wHorizontalAngleBegin	SWORD ?
wHorizontalAngleEnd	SWORD ?
usFrequencyBandLo	USHORT ?
usFrequencyBandHi	USHORT ?
usNumberOfMicrophones	USHORT ?
KsMicCoord		KSAUDIO_MICROPHONE_COORDINATES 1 dup(<>)
KSAUDIO_MIC_ARRAY_GEOMETRY ENDS
PKSAUDIO_MIC_ARRAY_GEOMETRY typedef ptr KSAUDIO_MIC_ARRAY_GEOMETRY

endif

DS3DVECTOR		STRUC
UNION
 x			FLOAT ?
 dvX			FLOAT ?
ENDS
UNION
 y			FLOAT ?
 dvY			FLOAT ?
ENDS
UNION
 z			FLOAT ?
 dvZ			FLOAT ?
ENDS
DS3DVECTOR		ENDS
PDS3DVECTOR		typedef ptr DS3DVECTOR

DEFINE_GUIDSTRUCT("437b3414-d060-11d0-8583-00c04fd9baf3",KSPROPSETID_DirectSound3DListener)

KSPROPERTY_DIRECTSOUND3DLISTENER_ALL equ 0
KSPROPERTY_DIRECTSOUND3DLISTENER_POSITION equ 1
KSPROPERTY_DIRECTSOUND3DLISTENER_VELOCITY equ 2
KSPROPERTY_DIRECTSOUND3DLISTENER_ORIENTATION equ 3
KSPROPERTY_DIRECTSOUND3DLISTENER_DISTANCEFACTOR equ 4
KSPROPERTY_DIRECTSOUND3DLISTENER_ROLLOFFFACTOR equ 5
KSPROPERTY_DIRECTSOUND3DLISTENER_DOPPLERFACTOR equ 6
KSPROPERTY_DIRECTSOUND3DLISTENER_BATCH equ 7
KSPROPERTY_DIRECTSOUND3DLISTENER_ALLOCATION equ 8

KSDS3D_LISTENER_ALL	STRUC
Position		DS3DVECTOR <>
Velocity		DS3DVECTOR <>
OrientFront		DS3DVECTOR <>
OrientTop		DS3DVECTOR <>
DistanceFactor		FLOAT ?
RolloffFactor		FLOAT ?
DopplerFactor		FLOAT ?
KSDS3D_LISTENER_ALL	ENDS
PKSDS3D_LISTENER_ALL	typedef ptr KSDS3D_LISTENER_ALL

KSDS3D_LISTENER_ORIENTATION STRUC
Front			DS3DVECTOR <>
Top			DS3DVECTOR <>
KSDS3D_LISTENER_ORIENTATION ENDS
PKSDS3D_LISTENER_ORIENTATION typedef ptr KSDS3D_LISTENER_ORIENTATION

DEFINE_GUIDSTRUCT("437b3411-d060-11d0-8583-00c04fd9baf3", KSPROPSETID_DirectSound3DBuffer)

KSPROPERTY_DIRECTSOUND3DBUFFER_ALL equ 0
KSPROPERTY_DIRECTSOUND3DBUFFER_POSITION equ 1
KSPROPERTY_DIRECTSOUND3DBUFFER_VELOCITY equ 2
KSPROPERTY_DIRECTSOUND3DBUFFER_CONEANGLES equ 3
KSPROPERTY_DIRECTSOUND3DBUFFER_CONEORIENTATION equ 4
KSPROPERTY_DIRECTSOUND3DBUFFER_CONEOUTSIDEVOLUME equ 5
KSPROPERTY_DIRECTSOUND3DBUFFER_MINDISTANCE equ 6
KSPROPERTY_DIRECTSOUND3DBUFFER_MAXDISTANCE equ 7
KSPROPERTY_DIRECTSOUND3DBUFFER_MODE equ 8

KSDS3D_BUFFER_ALL	STRUC
Position		DS3DVECTOR <>
Velocity		DS3DVECTOR <>
InsideConeAngle		ULONG ?
OutsideConeAngle	ULONG ?
ConeOrientation		DS3DVECTOR <>
ConeOutsideVolume	LONG ?
MinDistance		FLOAT ?
MaxDistance		FLOAT ?
Mode			ULONG ?
KSDS3D_BUFFER_ALL	ENDS
PKSDS3D_BUFFER_ALL	typedef ptr KSDS3D_BUFFER_ALL

KSDS3D_BUFFER_CONE_ANGLES STRUC
InsideConeAngle		ULONG ?
OutsideConeAngle	ULONG ?
KSDS3D_BUFFER_CONE_ANGLES ENDS
PKSDS3D_BUFFER_CONE_ANGLES typedef ptr KSDS3D_BUFFER_CONE_ANGLES

KSAUDIO_STEREO_SPEAKER_GEOMETRY_HEADPHONE equ (-1)
KSAUDIO_STEREO_SPEAKER_GEOMETRY_MIN equ 5
KSAUDIO_STEREO_SPEAKER_GEOMETRY_NARROW equ 10
KSAUDIO_STEREO_SPEAKER_GEOMETRY_WIDE equ 20
KSAUDIO_STEREO_SPEAKER_GEOMETRY_MAX equ 180

KSDSOUND_3D_MODE_NORMAL equ 0x00000000
KSDSOUND_3D_MODE_HEADRELATIVE equ 0x00000001
KSDSOUND_3D_MODE_DISABLE equ 0x00000002


KSDSOUND_BUFFER_CTRL_HRTF_3D equ 0x40000000

KSDS3D_HRTF_PARAMS_MSG	STRUC
Size			ULONG ?
Enabled			ULONG ?
SwapChannels		BOOL ?
ZeroAzimuth		BOOL ?
CrossFadeOutput		BOOL ?
FilterSize		ULONG ?
KSDS3D_HRTF_PARAMS_MSG	ENDS
PKSDS3D_HRTF_PARAMS_MSG typedef ptr KSDS3D_HRTF_PARAMS_MSG

KSDS3D_HRTF_FILTER_QUALITY typedef SDWORD
FULL_FILTER		equ 0
LIGHT_FILTER		equ 1
KSDS3D_FILTER_QUALITY_COUNT equ 2

KSDS3D_HRTF_INIT_MSG	STRUC
Size			ULONG ?
Quality			KSDS3D_HRTF_FILTER_QUALITY ?
SampleRate		FLOAT ?
MaxFilterSize		ULONG ?
FilterTransientMuteLength ULONG ?
FilterOverlapBufferLength ULONG ?
OutputOverlapBufferLength ULONG ?
Reserved		ULONG ?
KSDS3D_HRTF_INIT_MSG	ENDS
PKSDS3D_HRTF_INIT_MSG	typedef ptr KSDS3D_HRTF_INIT_MSG

KSDS3D_HRTF_COEFF_FORMAT typedef SDWORD
FLOAT_COEFF		equ 0
SHORT_COEFF		equ 1
KSDS3D_COEFF_COUNT	equ 2

KSDS3D_HRTF_FILTER_METHOD typedef SDWORD
DIRECT_FORM		equ 0
CASCADE_FORM		equ 1
KSDS3D_FILTER_METHOD_COUNT equ 2

KSDS3D_HRTF_FILTER_VERSION typedef SDWORD
DS3D_HRTF_VERSION_1	equ 0

KSDS3D_HRTF_FILTER_FORMAT_MSG STRUC
FilterMethod		KSDS3D_HRTF_FILTER_METHOD ?
CoeffFormat		KSDS3D_HRTF_COEFF_FORMAT ?
Version			KSDS3D_HRTF_FILTER_VERSION ?
Reserved		ULONG ?
KSDS3D_HRTF_FILTER_FORMAT_MSG ENDS
PKSDS3D_HRTF_FILTER_FORMAT_MSG typedef ptr KSDS3D_HRTF_FILTER_FORMAT_MSG

DEFINE_GUIDSTRUCT("b66decb0-a083-11d0-851e-00c04fd9baf3", KSPROPSETID_Hrtf3d)

KSPROPERTY_HRTF3D_PARAMS equ 0
KSPROPERTY_HRTF3D_INITIALIZE equ 1
KSPROPERTY_HRTF3D_FILTER_FORMAT equ 2

KSDS3D_ITD_PARAMS	STRUC
Channel			LONG ?
VolSmoothScale		FLOAT ?
TotalDryAttenuation	FLOAT ?
TotalWetAttenuation	FLOAT ?
SmoothFrequency		LONG ?
Delay			LONG ?
KSDS3D_ITD_PARAMS	ENDS
PKSDS3D_ITD_PARAMS	typedef ptr KSDS3D_ITD_PARAMS

KSDS3D_ITD_PARAMS_MSG	STRUC
Enabled			ULONG ?
LeftParams		KSDS3D_ITD_PARAMS <>
RightParams		KSDS3D_ITD_PARAMS <>
Reserved		ULONG ?
KSDS3D_ITD_PARAMS_MSG	ENDS
PKSDS3D_ITD_PARAMS_MSG	typedef ptr KSDS3D_ITD_PARAMS_MSG

DEFINE_GUIDSTRUCT("6429f090-9fd9-11d0-a75b-00a0c90365e3", KSPROPSETID_Itd3d)

KSPROPERTY_ITD3D_PARAMS equ 0

KSDATARANGE_AUDIO	STRUC
DataRange		KSDATARANGE <>
MaximumChannels		ULONG ?
MinimumBitsPerSample	ULONG ?
MaximumBitsPerSample	ULONG ?
MinimumSampleFrequency	ULONG ?
MaximumSampleFrequency	ULONG ?
KSDATARANGE_AUDIO	ENDS
PKSDATARANGE_AUDIO	typedef ptr KSDATARANGE_AUDIO

DEFINE_GUIDSTRUCT("4995DAEE-9EE6-11D0-A40E-00A0C9223196", KSDATAFORMAT_SUBTYPE_RIFF)
DEFINE_GUIDSTRUCT("e436eb8b-524f-11ce-9f53-0020af0ba770", KSDATAFORMAT_SUBTYPE_RIFFWAVE)
DEFINE_GUIDSTRUCT("07BA150E-E2B1-11D0-AC17-00A0C9223196", KSPROPSETID_Bibliographic)

KSPROPERTY_BIBLIOGRAPHIC_LEADER equ 'RDL '
KSPROPERTY_BIBLIOGRAPHIC_LCCN equ '010 '
KSPROPERTY_BIBLIOGRAPHIC_ISBN equ '020 '
KSPROPERTY_BIBLIOGRAPHIC_ISSN equ '220 '
KSPROPERTY_BIBLIOGRAPHIC_CATALOGINGSOURCE equ '040 '
KSPROPERTY_BIBLIOGRAPHIC_MAINPERSONALNAME equ '001 '
KSPROPERTY_BIBLIOGRAPHIC_MAINCORPORATEBODY equ '011 '
KSPROPERTY_BIBLIOGRAPHIC_MAINMEETINGNAME equ '111 '
KSPROPERTY_BIBLIOGRAPHIC_MAINUNIFORMTITLE equ '031 '
KSPROPERTY_BIBLIOGRAPHIC_UNIFORMTITLE equ '042 '
KSPROPERTY_BIBLIOGRAPHIC_TITLESTATEMENT equ '542 '
KSPROPERTY_BIBLIOGRAPHIC_VARYINGFORMTITLE equ '642 '
KSPROPERTY_BIBLIOGRAPHIC_PUBLICATION equ '062 '
KSPROPERTY_BIBLIOGRAPHIC_PHYSICALDESCRIPTION equ '003 '
KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYTITLE equ '044 '
KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENT equ '094 '
KSPROPERTY_BIBLIOGRAPHIC_GENERALNOTE equ '005 '
KSPROPERTY_BIBLIOGRAPHIC_BIBLIOGRAPHYNOTE equ '405 '
KSPROPERTY_BIBLIOGRAPHIC_CONTENTSNOTE equ '505 '
KSPROPERTY_BIBLIOGRAPHIC_CREATIONCREDIT equ '805 '
KSPROPERTY_BIBLIOGRAPHIC_CITATION equ '015 '
KSPROPERTY_BIBLIOGRAPHIC_PARTICIPANT equ '115 '
KSPROPERTY_BIBLIOGRAPHIC_SUMMARY equ '025 '
KSPROPERTY_BIBLIOGRAPHIC_TARGETAUDIENCE equ '125 '
KSPROPERTY_BIBLIOGRAPHIC_ADDEDFORMAVAILABLE equ '035 '
KSPROPERTY_BIBLIOGRAPHIC_SYSTEMDETAILS equ '835 '
KSPROPERTY_BIBLIOGRAPHIC_AWARDS equ '685 '
KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYPERSONALNAME equ '006 '
KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYTOPICALTERM equ '056 '
KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYGEOGRAPHIC equ '156 '
KSPROPERTY_BIBLIOGRAPHIC_INDEXTERMGENRE equ '556 '
KSPROPERTY_BIBLIOGRAPHIC_INDEXTERMCURRICULUM equ '856 '
KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYUNIFORMTITLE equ '037 '
KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYRELATED equ '047 '
KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENTPERSONALNAME equ '008 '
KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENTUNIFORMTITLE equ '038 '

DEFINE_GUIDSTRUCT("45FFAAA1-6E1B-11D0-BCF2-444553540000", KSPROPSETID_TopologyNode)

KSPROPERTY_TOPOLOGYNODE_ENABLE equ 1
if (NTDDI_VERSION GE NTDDI_WINXP)
KSPROPERTY_TOPOLOGYNODE_RESET equ 2
endif
KSPROPERTY_TOPOLOGYNODE typedef SDWORD

if (NTDDI_VERSION GE NTDDI_WINXP)

ifdef _NTDDK_
CALLBACK(PRTAUDIOGETPOSITION, :PFILE_OBJECT, :ptr, :PLONGendif)
endif

DEFINE_GUIDSTRUCT("A855A48C-2F78-4729-9051-1968746B9EEF", KSPROPSETID_RtAudio)

KSPROPERTY_RTAUDIO_GETPOSITIONFUNCTION equ 0
if (NTDDI_VERSION GE NTDDI_VISTA)
KSPROPERTY_RTAUDIO_BUFFER equ 1
KSPROPERTY_RTAUDIO_HWLATENCY equ 2
KSPROPERTY_RTAUDIO_POSITIONREGISTER equ 3
KSPROPERTY_RTAUDIO_CLOCKREGISTER equ 4
KSPROPERTY_RTAUDIO_BUFFER_WITH_NOTIFICATION equ 5
KSPROPERTY_RTAUDIO_REGISTER_NOTIFICATION_EVENT equ 6
KSPROPERTY_RTAUDIO_UNREGISTER_NOTIFICATION_EVENT equ 7
endif
if (NTDDI_VERSION GE NTDDI_WIN7)
KSPROPERTY_RTAUDIO_QUERY_NOTIFICATION_SUPPORT equ 8
endif

if (NTDDI_VERSION GE NTDDI_VISTA)
KSRTAUDIO_BUFFER_PROPERTY STRUC
Property		KSPROPERTY <>
BaseAddress		PVOID ?
RequestedBufferSize	ULONG ?
KSRTAUDIO_BUFFER_PROPERTY ENDS
PKSRTAUDIO_BUFFER_PROPERTY typedef ptr KSRTAUDIO_BUFFER_PROPERTY

KSRTAUDIO_BUFFER_PROPERTY32 STRUC
Property		KSPROPERTY <>
BaseAddress		ULONG ?
RequestedBufferSize	ULONG ?
KSRTAUDIO_BUFFER_PROPERTY32 ENDS
PKSRTAUDIO_BUFFER_PROPERTY32 typedef ptr KSRTAUDIO_BUFFER_PROPERTY32

KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION STRUC
Property		KSPROPERTY <>
BaseAddress		PVOID ?
RequestedBufferSize	ULONG ?
NotificationCount	ULONG ?
KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION ENDS
PKSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION typedef ptr KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION

KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION32 STRUC
Property		KSPROPERTY <>
BaseAddress		ULONG ?
RequestedBufferSize	ULONG ?
NotificationCount	ULONG ?
KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION32 ENDS
PKSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION32 typedef ptr KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION32

KSRTAUDIO_BUFFER	STRUC
BufferAddress		PVOID ?
ActualBufferSize	ULONG ?
CallMemoryBarrier	BOOL ?
KSRTAUDIO_BUFFER	ENDS
PKSRTAUDIO_BUFFER	typedef ptr KSRTAUDIO_BUFFER

KSRTAUDIO_BUFFER32	STRUC
BufferAddress		ULONG ?
ActualBufferSize	ULONG ?
CallMemoryBarrier	BOOL ?
KSRTAUDIO_BUFFER32	ENDS
PKSRTAUDIO_BUFFER32	typedef ptr KSRTAUDIO_BUFFER32

KSRTAUDIO_HWLATENCY	STRUC
FifoSize		ULONG ?
ChipsetDelay		ULONG ?
CodecDelay		ULONG ?
KSRTAUDIO_HWLATENCY	ENDS
PKSRTAUDIO_HWLATENCY	typedef ptr KSRTAUDIO_HWLATENCY

KSRTAUDIO_HWREGISTER_PROPERTY STRUC
Property		KSPROPERTY <>
BaseAddress		PVOID ?
KSRTAUDIO_HWREGISTER_PROPERTY ENDS
PKSRTAUDIO_HWREGISTER_PROPERTY typedef ptr KSRTAUDIO_HWREGISTER_PROPERTY

KSRTAUDIO_HWREGISTER_PROPERTY32 STRUC
Property		KSPROPERTY <>
BaseAddress		ULONG ?
KSRTAUDIO_HWREGISTER_PROPERTY32 ENDS
PKSRTAUDIO_HWREGISTER_PROPERTY32 typedef ptr KSRTAUDIO_HWREGISTER_PROPERTY32

KSRTAUDIO_HWREGISTER	STRUC
Register		PVOID ?
Width			ULONG ?
Numerator		ULONGLONG ?
Denominator		ULONGLONG ?
Accuracy		ULONG ?
KSRTAUDIO_HWREGISTER	ENDS
PKSRTAUDIO_HWREGISTER	typedef ptr KSRTAUDIO_HWREGISTER

KSRTAUDIO_HWREGISTER32	STRUC
Register		ULONG ?
Width			ULONG ?
Numerator		ULONGLONG ?
Denominator		ULONGLONG ?
Accuracy		ULONG ?
KSRTAUDIO_HWREGISTER32	ENDS
PKSRTAUDIO_HWREGISTER32 typedef ptr KSRTAUDIO_HWREGISTER32

KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY STRUC
Property		KSPROPERTY <>
NotificationEvent	HANDLE ?
KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY ENDS
PKSRTAUDIO_NOTIFICATION_EVENT_PROPERTY typedef ptr KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY

KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY32 STRUC
Property		KSPROPERTY <>
NotificationEvent	ULONG ?
KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY32 ENDS
PKSRTAUDIO_NOTIFICATION_EVENT_PROPERTY32 typedef ptr KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY32
endif

if (NTDDI_VERSION GE NTDDI_WIN7)
DEFINE_GUIDSTRUCT("7FA06C40-B8F6-4C7E-8556-E8C33A12E54D", KSPROPSETID_BtAudio)
KSPROPERTY_ONESHOT_RECONNECT equ 0
endif

DEFINE_GUIDSTRUCT("2F2C8DDD-4198-4fac-BA29-61BB05B7DE06", KSPROPSETID_DrmAudioStream)
KSPROPERTY_DRMAUDIOSTREAM_CONTENTID equ 0

endif ;; (NTDDI_VERSION >= NTDDI_WINXP)

DEFINE_GUIDSTRUCT("45FFAAA0-6E1B-11D0-BCF2-444553540000", KSPROPSETID_Audio)

KSPROPERTY_AUDIO	typedef SDWORD
KSPROPERTY_AUDIO_LATENCY equ 1
KSPROPERTY_AUDIO_COPY_PROTECTION equ 1
KSPROPERTY_AUDIO_CHANNEL_CONFIG equ 2
KSPROPERTY_AUDIO_VOLUMELEVEL equ 3
KSPROPERTY_AUDIO_POSITION equ 4
KSPROPERTY_AUDIO_DYNAMIC_RANGE equ 5
KSPROPERTY_AUDIO_QUALITY equ 6
KSPROPERTY_AUDIO_SAMPLING_RATE equ 7
KSPROPERTY_AUDIO_DYNAMIC_SAMPLING_RATE equ 8
KSPROPERTY_AUDIO_MIX_LEVEL_TABLE equ 9
KSPROPERTY_AUDIO_MIX_LEVEL_CAPS equ 10
KSPROPERTY_AUDIO_MUX_SOURCE equ 11
KSPROPERTY_AUDIO_MUTE	equ 12
KSPROPERTY_AUDIO_BASS	equ 13
KSPROPERTY_AUDIO_MID	equ 14
KSPROPERTY_AUDIO_TREBLE equ 15
KSPROPERTY_AUDIO_BASS_BOOST equ 16
KSPROPERTY_AUDIO_EQ_LEVEL equ 17
KSPROPERTY_AUDIO_NUM_EQ_BANDS equ 18
KSPROPERTY_AUDIO_EQ_BANDS equ 19
KSPROPERTY_AUDIO_AGC	equ 20
KSPROPERTY_AUDIO_DELAY	equ 21
KSPROPERTY_AUDIO_LOUDNESS equ 22
KSPROPERTY_AUDIO_WIDE_MODE equ 23
KSPROPERTY_AUDIO_WIDENESS equ 24
KSPROPERTY_AUDIO_REVERB_LEVEL equ 25
KSPROPERTY_AUDIO_CHORUS_LEVEL equ 26
KSPROPERTY_AUDIO_DEV_SPECIFIC equ 27
KSPROPERTY_AUDIO_DEMUX_DEST equ 28
KSPROPERTY_AUDIO_STEREO_ENHANCE equ 29
KSPROPERTY_AUDIO_MANUFACTURE_GUID equ 30
KSPROPERTY_AUDIO_PRODUCT_GUID equ 31
KSPROPERTY_AUDIO_CPU_RESOURCES equ 32
KSPROPERTY_AUDIO_STEREO_SPEAKER_GEOMETRY equ 33
KSPROPERTY_AUDIO_SURROUND_ENCODE equ 34
KSPROPERTY_AUDIO_3D_INTERFACE equ 35
if (NTDDI_VERSION GE NTDDI_WINXP)
KSPROPERTY_AUDIO_PEAKMETER equ 36
KSPROPERTY_AUDIO_ALGORITHM_INSTANCE equ 37
KSPROPERTY_AUDIO_FILTER_STATE equ 38
KSPROPERTY_AUDIO_PREFERRED_STATUS equ 39
endif
if (NTDDI_VERSION GE NTDDI_VISTA)
KSPROPERTY_AUDIO_PEQ_MAX_BANDS equ 40
KSPROPERTY_AUDIO_PEQ_NUM_BANDS equ 41
KSPROPERTY_AUDIO_PEQ_BAND_CENTER_FREQ equ 42
KSPROPERTY_AUDIO_PEQ_BAND_Q_FACTOR equ 43
KSPROPERTY_AUDIO_PEQ_BAND_LEVEL equ 44
KSPROPERTY_AUDIO_CHORUS_MODULATION_RATE equ 45
KSPROPERTY_AUDIO_CHORUS_MODULATION_DEPTH equ 46
KSPROPERTY_AUDIO_REVERB_TIME equ 47
KSPROPERTY_AUDIO_REVERB_DELAY_FEEDBACK equ 48
KSPROPERTY_AUDIO_POSITIONEX equ 49
KSPROPERTY_AUDIO_MIC_ARRAY_GEOMETRY equ 50
endif

KSAUDIO_QUALITY_WORST	equ 0x0
KSAUDIO_QUALITY_PC	equ 0x1
KSAUDIO_QUALITY_BASIC	equ 0x2
KSAUDIO_QUALITY_ADVANCED equ 0x3

KSAUDIO_CPU_RESOURCES_NOT_HOST_CPU equ 0x00000000
KSAUDIO_CPU_RESOURCES_HOST_CPU equ 0x7FFFFFFF

KSAUDIO_COPY_PROTECTION STRUC
fCopyrighted		BOOL ?
fOriginal		BOOL ?
KSAUDIO_COPY_PROTECTION ENDS
PKSAUDIO_COPY_PROTECTION typedef ptr KSAUDIO_COPY_PROTECTION

KSAUDIO_CHANNEL_CONFIG	STRUC
ActiveSpeakerPositions	LONG ?
KSAUDIO_CHANNEL_CONFIG	ENDS
PKSAUDIO_CHANNEL_CONFIG typedef ptr KSAUDIO_CHANNEL_CONFIG

SPEAKER_FRONT_LEFT	equ 0x1
SPEAKER_FRONT_RIGHT	equ 0x2
SPEAKER_FRONT_CENTER	equ 0x4
SPEAKER_LOW_FREQUENCY	equ 0x8
SPEAKER_BACK_LEFT	equ 0x10
SPEAKER_BACK_RIGHT	equ 0x20
SPEAKER_FRONT_LEFT_OF_CENTER equ 0x40
SPEAKER_FRONT_RIGHT_OF_CENTER equ 0x80
SPEAKER_BACK_CENTER	equ 0x100
SPEAKER_SIDE_LEFT	equ 0x200
SPEAKER_SIDE_RIGHT	equ 0x400
SPEAKER_TOP_CENTER	equ 0x800
SPEAKER_TOP_FRONT_LEFT	equ 0x1000
SPEAKER_TOP_FRONT_CENTER equ 0x2000
SPEAKER_TOP_FRONT_RIGHT equ 0x4000
SPEAKER_TOP_BACK_LEFT	equ 0x8000
SPEAKER_TOP_BACK_CENTER equ 0x10000
SPEAKER_TOP_BACK_RIGHT	equ 0x20000

SPEAKER_RESERVED	equ 0x7FFC0000
SPEAKER_ALL		equ 0x80000000

if (NTDDI_VERSION GE NTDDI_WINXP)
KSAUDIO_SPEAKER_DIRECTOUT equ 0
endif
KSAUDIO_SPEAKER_MONO	equ (SPEAKER_FRONT_CENTER)
KSAUDIO_SPEAKER_STEREO	equ (SPEAKER_FRONT_LEFT OR SPEAKER_FRONT_RIGHT)
KSAUDIO_SPEAKER_QUAD	equ (SPEAKER_FRONT_LEFT OR SPEAKER_FRONT_RIGHT OR SPEAKER_BACK_LEFT OR SPEAKER_BACK_RIGHT)
KSAUDIO_SPEAKER_SURROUND equ (SPEAKER_FRONT_LEFT OR SPEAKER_FRONT_RIGHT OR SPEAKER_FRONT_CENTER OR SPEAKER_BACK_CENTER)
KSAUDIO_SPEAKER_5POINT1 equ (SPEAKER_FRONT_LEFT OR SPEAKER_FRONT_RIGHT OR SPEAKER_BACK_LEFT OR SPEAKER_FRONT_CENTER OR SPEAKER_LOW_FREQUENCY OR SPEAKER_BACK_RIGHT)
KSAUDIO_SPEAKER_7POINT1 equ (SPEAKER_FRONT_LEFT OR SPEAKER_FRONT_RIGHT OR SPEAKER_LOW_FREQUENCY OR SPEAKER_FRONT_CENTER OR SPEAKER_BACK_RIGHT OR SPEAKER_BACK_LEFT OR SPEAKER_FRONT_LEFT_OF_CENTER OR SPEAKER_FRONT_RIGHT_OF_CENTER)

if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)
KSAUDIO_SPEAKER_5POINT1_SURROUND equ (SPEAKER_FRONT_LEFT OR SPEAKER_FRONT_RIGHT OR SPEAKER_LOW_FREQUENCY OR SPEAKER_FRONT_CENTER OR SPEAKER_SIDE_RIGHT OR SPEAKER_SIDE_LEFT)
KSAUDIO_SPEAKER_7POINT1_SURROUND equ (SPEAKER_FRONT_LEFT OR SPEAKER_FRONT_RIGHT OR SPEAKER_LOW_FREQUENCY OR SPEAKER_FRONT_CENTER OR SPEAKER_BACK_RIGHT OR SPEAKER_BACK_LEFT OR SPEAKER_SIDE_RIGHT OR SPEAKER_SIDE_LEFT)
KSAUDIO_SPEAKER_5POINT1_BACK equ KSAUDIO_SPEAKER_5POINT1
KSAUDIO_SPEAKER_7POINT1_WIDE equ KSAUDIO_SPEAKER_7POINT1
endif

KSAUDIO_SPEAKER_GROUND_FRONT_LEFT equ SPEAKER_FRONT_LEFT
KSAUDIO_SPEAKER_GROUND_FRONT_CENTER equ SPEAKER_FRONT_CENTER
KSAUDIO_SPEAKER_GROUND_FRONT_RIGHT equ SPEAKER_FRONT_RIGHT
KSAUDIO_SPEAKER_GROUND_REAR_LEFT equ SPEAKER_BACK_LEFT
KSAUDIO_SPEAKER_GROUND_REAR_RIGHT equ SPEAKER_BACK_RIGHT
KSAUDIO_SPEAKER_TOP_MIDDLE equ SPEAKER_TOP_CENTER
KSAUDIO_SPEAKER_SUPER_WOOFER equ SPEAKER_LOW_FREQUENCY

KSAUDIO_DYNAMIC_RANGE	STRUC
QuietCompression	ULONG ?
LoudCompression		ULONG ?
KSAUDIO_DYNAMIC_RANGE	ENDS
PKSAUDIO_DYNAMIC_RANGE	typedef ptr KSAUDIO_DYNAMIC_RANGE

KSAUDIO_MIXLEVEL	STRUC
Mute			BOOL ?
Level			LONG ?
KSAUDIO_MIXLEVEL	ENDS
PKSAUDIO_MIXLEVEL	typedef ptr KSAUDIO_MIXLEVEL

KSAUDIO_MIX_CAPS	STRUC
Mute			BOOL ?
Minimum			LONG ?
Maximum			LONG ?
UNION ; {
Reset			LONG ?
Resolution		LONG ?
ENDS ;
KSAUDIO_MIX_CAPS	ENDS
PKSAUDIO_MIX_CAPS	typedef ptr KSAUDIO_MIX_CAPS

KSAUDIO_MIXCAP_TABLE	STRUC
InputChannels		ULONG ?
OutputChannels		ULONG ?
Capabilities		KSAUDIO_MIX_CAPS 1 dup(<>)
KSAUDIO_MIXCAP_TABLE	ENDS
PKSAUDIO_MIXCAP_TABLE	typedef ptr KSAUDIO_MIXCAP_TABLE

if (NTDDI_VERSION LT NTDDI_VISTA)

KSPROPERTY_SYSAUDIO_NORMAL_DEFAULT equ 0
;KSPROPERTY_SYSAUDIO_DEFAULT_TYPE ENDS

endif

if (NTDDI_VERSION GE NTDDI_WINXP AND NTDDI_VERSION LT NTDDI_VISTA)

KSAUDIO_PREFERRED_STATUS STRUC
Enable			BOOL ?
DeviceType		KSPROPERTY_SYSAUDIO_DEFAULT_TYPE ?
Flags			ULONG ?
Reserved		ULONG ?
KSAUDIO_PREFERRED_STATUS ENDS
PKSAUDIO_PREFERRED_STATUS typedef ptr KSAUDIO_PREFERRED_STATUS

endif

if (NTDDI_VERSION GE NTDDI_VISTA)
KSAUDIO_POSITIONEX	STRUC
TimerFrequency		LARGE_INTEGER <>
TimeStamp1		LARGE_INTEGER <>
Position		KSAUDIO_POSITION <>
TimeStamp2		LARGE_INTEGER <>
KSAUDIO_POSITIONEX	ENDS
PKSAUDIO_POSITIONEX	typedef ptr KSAUDIO_POSITIONEX
endif


DEFINE_GUIDSTRUCT("507AE360-C554-11D0-8A2B-00A0C9255AC1", KSNODETYPE_DAC)
DEFINE_GUIDSTRUCT("4D837FE0-C555-11D0-8A2B-00A0C9255AC1", KSNODETYPE_ADC)
DEFINE_GUIDSTRUCT("9DB7B9E0-C555-11D0-8A2B-00A0C9255AC1", KSNODETYPE_SRC)
DEFINE_GUIDSTRUCT("E573ADC0-C555-11D0-8A2B-00A0C9255AC1", KSNODETYPE_SUPERMIX)
DEFINE_GUIDSTRUCT("2CEAF780-C556-11D0-8A2B-00A0C9255AC1", KSNODETYPE_MUX)
DEFINE_GUIDSTRUCT("C0EB67D4-E807-11D0-958A-00C04FB925D3", KSNODETYPE_DEMUX)
DEFINE_GUIDSTRUCT("DA441A60-C556-11D0-8A2B-00A0C9255AC1", KSNODETYPE_SUM)
DEFINE_GUIDSTRUCT("02B223C0-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_MUTE)
DEFINE_GUIDSTRUCT("3A5ACC00-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_VOLUME)
DEFINE_GUIDSTRUCT("7607E580-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_TONE)
DEFINE_GUIDSTRUCT("9D41B4A0-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_EQUALIZER)
DEFINE_GUIDSTRUCT("E88C9BA0-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_AGC)

if (NTDDI_VERSION GE NTDDI_WINXP)
DEFINE_GUIDSTRUCT("E07F903F-62FD-4e60-8CDD-DEA7236665B5", KSNODETYPE_NOISE_SUPPRESS)
endif

DEFINE_GUIDSTRUCT("144981E0-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_DELAY)
DEFINE_GUIDSTRUCT("41887440-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_LOUDNESS)
DEFINE_GUIDSTRUCT("831C2C80-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_PROLOGIC_DECODER)
DEFINE_GUIDSTRUCT("A9E69800-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_STEREO_WIDE)
DEFINE_GUIDSTRUCT("EF0328E0-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_REVERB)
DEFINE_GUIDSTRUCT("20173F20-C559-11D0-8A2B-00A0C9255AC1", KSNODETYPE_CHORUS)
DEFINE_GUIDSTRUCT("55515860-C559-11D0-8A2B-00A0C9255AC1", KSNODETYPE_3D_EFFECTS)
DEFINE_GUIDSTRUCT("19BB3A6A-CE2B-4442-87EC-6727C3CAB477", KSNODETYPE_PARAMETRIC_EQUALIZER)
DEFINE_GUIDSTRUCT("B7EDC5CF-7B63-4ee2-A100-29EE2CB6B2DE", KSNODETYPE_UPDOWN_MIX)
DEFINE_GUIDSTRUCT("08C8A6A8-601F-4af8-8793-D905FF4CA97D", KSNODETYPE_DYN_RANGE_COMPRESSOR)

;STATIC_KSNODETYPE_ACOUSTIC_ECHO_CANCEL equ STATIC_KSCATEGORY_ACOUSTIC_ECHO_CANCE
;KSNODETYPE_ACOUSTIC_ECHO_CANCEL equ KSCATEGORY_ACOUSTIC_ECHO_CANCE

if (NTDDI_VERSION GE NTDDI_WINXP)

DEFINE_GUIDSTRUCT("1C22C56D-9879-4f5b-A389-27996DDC2810", KSALGORITHMINSTANCE_SYSTEM_ACOUSTIC_ECHO_CANCEL)
DEFINE_GUIDSTRUCT("5AB0882E-7274-4516-877D-4EEE99BA4FD0", KSALGORITHMINSTANCE_SYSTEM_NOISE_SUPPRESS)
DEFINE_GUIDSTRUCT("950E55B9-877C-4c67-BE08-E47B5611130A", KSALGORITHMINSTANCE_SYSTEM_AGC)
DEFINE_GUIDSTRUCT("B6F5A0A0-9E61-4f8c-91E3-76CF0F3C471F", KSALGORITHMINSTANCE_SYSTEM_MICROPHONE_ARRAY_PROCESSOR)

;STATIC_KSNODETYPE_MICROPHONE_ARRAY_PROCESSOR equ STATIC_KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR
;KSNODETYPE_MICROPHONE_ARRAY_PROCESSOR equ KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR

endif

DEFINE_GUIDSTRUCT("941C7AC0-C559-11D0-8A2B-00A0C9255AC1", KSNODETYPE_DEV_SPECIFIC)

if (NTDDI_VERSION GE NTDDI_WINXP)

DEFINE_GUIDSTRUCT("8074C5B2-3C66-11D2-B45A-3078302C2030", KSNODETYPE_PROLOGIC_ENCODER)
;KSNODETYPE_SURROUND_ENCODER equ KSNODETYPE_PROLOGIC_ENCODER
DEFINE_GUIDSTRUCT("A085651E-5F0D-4b36-A869-D195D6AB4B9E", KSNODETYPE_PEAKMETER)

endif

if (NTDDI_VERSION LT NTDDI_WINXP)

DEFINE_GUIDSTRUCT("8074C5B2-3C66-11D2-B45A-3078302C2030", KSNODETYPE_SURROUND_ENCODER)

endif

DEFINE_GUIDSTRUCT("185FEDE0-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_BASS)
DEFINE_GUIDSTRUCT("185FEDE1-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_TREBLE)
DEFINE_GUIDSTRUCT("A2CBE478-AE84-49A1-8B72-4AD09B78ED34", KSAUDFNAME_MIDRANGE)
DEFINE_GUIDSTRUCT("185FEDE2-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_3D_STEREO)
DEFINE_GUIDSTRUCT("185FEDE3-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MASTER_VOLUME)
DEFINE_GUIDSTRUCT("185FEDE4-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MASTER_MUTE)
DEFINE_GUIDSTRUCT("185FEDE5-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_VOLUME)
DEFINE_GUIDSTRUCT("185FEDE6-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_MUTE)
DEFINE_GUIDSTRUCT("185FEDE7-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI_VOLUME)
DEFINE_GUIDSTRUCT("185FEDE8-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI_MUTE)
DEFINE_GUIDSTRUCT("185FEDE9-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_VOLUME)
DEFINE_GUIDSTRUCT("185FEDEA-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_MUTE)
DEFINE_GUIDSTRUCT("185FEDEB-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_VOLUME)
DEFINE_GUIDSTRUCT("185FEDEC-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_MUTE)
DEFINE_GUIDSTRUCT("185FEDED-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIC_VOLUME)
DEFINE_GUIDSTRUCT("185FEDEE-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIC_MUTE)
DEFINE_GUIDSTRUCT("185FEDEF-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_RECORDING_SOURCE)
DEFINE_GUIDSTRUCT("185FEDF0-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_PC_SPEAKER_VOLUME)
DEFINE_GUIDSTRUCT("185FEDF1-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_PC_SPEAKER_MUTE)
DEFINE_GUIDSTRUCT("185FEDF2-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI_IN_VOLUME)
DEFINE_GUIDSTRUCT("185FEDF3-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_IN_VOLUME)
DEFINE_GUIDSTRUCT("185FEDF4-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_IN_VOLUME)
DEFINE_GUIDSTRUCT("185FEDF5-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIC_IN_VOLUME)
DEFINE_GUIDSTRUCT("185FEDF6-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_IN_VOLUME)
DEFINE_GUIDSTRUCT("185FEDF7-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_VOLUME_CONTROL)
DEFINE_GUIDSTRUCT("185FEDF8-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI)
DEFINE_GUIDSTRUCT("185FEDF9-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_IN)
DEFINE_GUIDSTRUCT("185FEDFA-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_RECORDING_CONTROL)
DEFINE_GUIDSTRUCT("185FEDFB-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_AUDIO)
DEFINE_GUIDSTRUCT("185FEDFC-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_AUX_VOLUME)
DEFINE_GUIDSTRUCT("185FEDFD-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_AUX_MUTE)
DEFINE_GUIDSTRUCT("185FEDFE-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_AUX)
DEFINE_GUIDSTRUCT("185FEDFF-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_PC_SPEAKER)
DEFINE_GUIDSTRUCT("185FEE00-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_OUT_MIX)
DEFINE_GUIDSTRUCT("F9B41DC3-96E2-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_OUT)
DEFINE_GUIDSTRUCT("00DFF077-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_STEREO_MIX)
DEFINE_GUIDSTRUCT("00DFF078-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_MIX)
DEFINE_GUIDSTRUCT("1AD247EB-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_OUT_VOLUME)
DEFINE_GUIDSTRUCT("1AD247EC-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_OUT_MUTE)
DEFINE_GUIDSTRUCT("1AD247ED-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_STEREO_MIX_VOLUME)
DEFINE_GUIDSTRUCT("22B0EAFD-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_STEREO_MIX_MUTE)
DEFINE_GUIDSTRUCT("22B0EAFE-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_MIX_VOLUME)
DEFINE_GUIDSTRUCT("2BC31D69-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_MIX_MUTE)
DEFINE_GUIDSTRUCT("2BC31D6A-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MICROPHONE_BOOST)
DEFINE_GUIDSTRUCT("2BC31D6B-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_ALTERNATE_MICROPHONE)
DEFINE_GUIDSTRUCT("63FF5747-991F-11d2-AC4D-00C04F8EFB68", KSAUDFNAME_3D_DEPTH)
DEFINE_GUIDSTRUCT("9F0670B4-991F-11d2-AC4D-00C04F8EFB68", KSAUDFNAME_3D_CENTER)
DEFINE_GUIDSTRUCT("9B46E708-992A-11d2-AC4D-00C04F8EFB68", KSAUDFNAME_VIDEO_VOLUME)
DEFINE_GUIDSTRUCT("9B46E709-992A-11d2-AC4D-00C04F8EFB68", KSAUDFNAME_VIDEO_MUTE)
DEFINE_GUIDSTRUCT("915DAEC4-A434-11d2-AC52-00C04F8EFB68", KSAUDFNAME_VIDEO)

if (NTDDI_VERSION GE NTDDI_WINXP)
DEFINE_GUIDSTRUCT("57E24340-FC5B-4612-A562-72B11A29DFAE", KSAUDFNAME_PEAKMETER)
endif

KSNODEPIN_STANDARD_IN	equ 1
KSNODEPIN_STANDARD_OUT	equ 0

KSNODEPIN_SUM_MUX_IN	equ 1
KSNODEPIN_SUM_MUX_OUT	equ 0

KSNODEPIN_DEMUX_IN	equ 0
KSNODEPIN_DEMUX_OUT	equ 1

if (NTDDI_VERSION LT NTDDI_VISTA)

KSNODEPIN_AEC_RENDER_IN equ 1
KSNODEPIN_AEC_RENDER_OUT equ 0
KSNODEPIN_AEC_CAPTURE_IN equ 2
KSNODEPIN_AEC_CAPTURE_OUT equ 3

endif

DEFINE_GUIDSTRUCT("DCEF31EB-D907-11D0-9583-00C04FB925D3", KSMETHODSETID_Wavetable)

KSMETHOD_WAVETABLE_WAVE_ALLOC equ 0
KSMETHOD_WAVETABLE_WAVE_FREE equ 1
KSMETHOD_WAVETABLE_WAVE_FIND equ 2
KSMETHOD_WAVETABLE_WAVE_WRITE equ 3

KSWAVETABLE_WAVE_DESC	STRUC
Identifier		KSIDENTIFIER <>
Size			ULONG ?
_Looped			BOOL ?
LoopPoint		ULONG ?
InROM			BOOL ?
Format			KSDATAFORMAT <>
KSWAVETABLE_WAVE_DESC	ENDS
PKSWAVETABLE_WAVE_DESC	typedef ptr KSWAVETABLE_WAVE_DESC


if (NTDDI_VERSION GE NTDDI_WINXP AND NTDDI_VERSION LT NTDDI_VISTA)
DEFINE_GUIDSTRUCT("D7A4AF8B-3DC1-4902-91EA-8A15C90E05B2", KSPROPSETID_Acoustic_Echo_Cancel)

KSPROPERTY_AEC_NOISE_FILL_ENABLE equ 0
KSPROPERTY_AEC_STATUS	equ 1
KSPROPERTY_AEC_MODE	equ 2

AEC_STATUS_FD_HISTORY_UNINITIALIZED equ 0x0
AEC_STATUS_FD_HISTORY_CONTINUOUSLY_CONVERGED equ 0x1
AEC_STATUS_FD_HISTORY_PREVIOUSLY_DIVERGED equ 0x2
AEC_STATUS_FD_CURRENTLY_CONVERGED equ 0x8

AEC_MODE_PASS_THROUGH	equ 0x0
AEC_MODE_HALF_DUPLEX	equ 0x1
AEC_MODE_FULL_DUPLEX	equ 0x2

endif

if (NTDDI_VERSION LT NTDDI_WS03)

DEFINE_GUIDSTRUCT("16a15b10-16f0-11d0-a195-0020afd156e4", KSPROPSETID_Wave_Queued)
KSPROPERTY_WAVE_QUEUED_POSITION equ 0x00000001
DEFINE_GUIDSTRUCT("7432c160-8827-11cf-a102-0020afd156e4", KSMETHODSETID_Wave_Queued)
KSMETHOD_WAVE_QUEUED_BREAKLOOP equ 0x00000001

endif

DEFINE_GUIDSTRUCT("924e54b0-630f-11cf-ada7-08003e30494a", KSPROPSETID_Wave)

KSPROPERTY_WAVE_COMPATIBLE_CAPABILITIES equ 0
KSPROPERTY_WAVE_INPUT_CAPABILITIES equ 1
KSPROPERTY_WAVE_OUTPUT_CAPABILITIES equ 2
KSPROPERTY_WAVE_BUFFER	equ 3
KSPROPERTY_WAVE_FREQUENCY equ 4
KSPROPERTY_WAVE_VOLUME	equ 5
KSPROPERTY_WAVE_PAN	equ 6

KSWAVE_COMPATCAPS	STRUC
ulDeviceType		ULONG ?
KSWAVE_COMPATCAPS	ENDS
PKSWAVE_COMPATCAPS	typedef ptr KSWAVE_COMPATCAPS

KSWAVE_COMPATCAPS_INPUT equ 0x00000000
KSWAVE_COMPATCAPS_OUTPUT equ 0x00000001

KSWAVE_INPUT_CAPABILITIES STRUC
MaximumChannelsPerConnection ULONG ?
MinimumBitsPerSample	ULONG ?
MaximumBitsPerSample	ULONG ?
MinimumSampleFrequency	ULONG ?
MaximumSampleFrequency	ULONG ?
TotalConnections	ULONG ?
ActiveConnections	ULONG ?
KSWAVE_INPUT_CAPABILITIES ENDS
PKSWAVE_INPUT_CAPABILITIES typedef ptr KSWAVE_INPUT_CAPABILITIES

KSWAVE_OUTPUT_CAPABILITIES STRUC
MaximumChannelsPerConnection ULONG ?
MinimumBitsPerSample	ULONG ?
MaximumBitsPerSample	ULONG ?
MinimumSampleFrequency	ULONG ?
MaximumSampleFrequency	ULONG ?
TotalConnections	ULONG ?
StaticConnections	ULONG ?
StreamingConnections	ULONG ?
ActiveConnections	ULONG ?
ActiveStaticConnections ULONG ?
ActiveStreamingConnections ULONG ?
Total3DConnections	ULONG ?
Static3DConnections	ULONG ?
Streaming3DConnections	ULONG ?
Active3DConnections	ULONG ?
ActiveStatic3DConnections ULONG ?
ActiveStreaming3DConnections ULONG ?
TotalSampleMemory	ULONG ?
FreeSampleMemory	ULONG ?
LargestFreeContiguousSampleMemory ULONG ?
KSWAVE_OUTPUT_CAPABILITIES ENDS
PKSWAVE_OUTPUT_CAPABILITIES typedef ptr KSWAVE_OUTPUT_CAPABILITIES

KSWAVE_VOLUME		STRUC
LeftAttenuation		LONG ?
RightAttenuation	LONG ?
KSWAVE_VOLUME		ENDS
PKSWAVE_VOLUME		typedef ptr KSWAVE_VOLUME

KSWAVE_BUFFER_ATTRIBUTEF_LOOPING equ 0x00000001
KSWAVE_BUFFER_ATTRIBUTEF_STATIC equ 0x00000002

KSWAVE_BUFFER		STRUC
Attributes		ULONG ?
BufferSize		ULONG ?
BufferAddress		PVOID ?
KSWAVE_BUFFER		ENDS
PKSWAVE_BUFFER		typedef ptr KSWAVE_BUFFER


DEFINE_GUIDSTRUCT("86C92E60-62E8-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_PORT)
DEFINE_GUIDSTRUCT("0ECF4380-62E9-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_SQSYNTH)
DEFINE_GUIDSTRUCT("252C5C80-62E9-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_FMSYNTH)
DEFINE_GUIDSTRUCT("394EC7C0-62E9-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_WAVETABLE)
DEFINE_GUIDSTRUCT("37407736-3620-11D1-85D3-0000F8754380", KSMUSIC_TECHNOLOGY_SWSYNTH)

if (NTDDI_VERSION LT NTDDI_WS03)

DEFINE_GUIDSTRUCT("8539E660-62E9-11CF-A5D6-28DB04C10000", KSPROPSETID_WaveTable)

KSPROPERTY_WAVETABLE_LOAD_SAMPLE equ 0
KSPROPERTY_WAVETABLE_UNLOAD_SAMPLE equ 1
KSPROPERTY_WAVETABLE_MEMORY equ 2
KSPROPERTY_WAVETABLE_VERSION equ 3

endif

KSDATARANGE_MUSIC	STRUC
DataRange		KSDATARANGE <>
Technology		GUID <>
Channels		ULONG ?
Notes			ULONG ?
ChannelMask		ULONG ?
KSDATARANGE_MUSIC	ENDS
PKSDATARANGE_MUSIC	typedef ptr KSDATARANGE_MUSIC


if (NTDDI_VERSION LT NTDDI_WS03)

DEFINE_GUIDSTRUCT("142C1AC0-072A-11D0-A5D6-28DB04C10000", KSEVENTSETID_Cyclic)

KSEVENT_CYCLIC_TIME_INTERVAL equ 0

endif

DEFINE_GUIDSTRUCT("3FFEAEA0-2BEE-11CF-A5D6-28DB04C10000", KSPROPSETID_Cyclic)
KSPROPERTY_CYCLIC_POSITION equ 0
DEFINE_GUIDSTRUCT("E85E9698-FA2F-11D1-95BD-00C04FB925D3", KSEVENTSETID_AudioControlChange)
KSEVENT_CONTROL_CHANGE	equ 0
DEFINE_GUIDSTRUCT("4682B940-C6EF-11D0-96D8-00AA0051E51D", KSEVENTSETID_LoopedStreaming)

KSEVENT_LOOPEDSTREAMING_POSITION equ 0

LOOPEDSTREAMING_POSITION_EVENT_DATA STRUC
KsEventData		KSEVENTDATA <>
ifdef _NTDDK_
Position		ULONGLONG ?
else
Position		dd ?
endif
LOOPEDSTREAMING_POSITION_EVENT_DATA ENDS
PLOOPEDSTREAMING_POSITION_EVENT_DATA  typedef ptr LOOPEDSTREAMING_POSITION_EVENT_DATA

if (NTDDI_VERSION LE NTDDI_WINXP)
DEFINE_GUIDSTRUCT("04800320-4491-11D1-A050-405705C10000", KSEVENTSETID_Sysaudio)
KSEVENT_SYSAUDIO_ADDREMOVE_DEVICE equ 0
if (NTDDI_VERSION EQ NTDDI_WINXP)
KSEVENT_SYSAUDIO_CHANGE_DEVICE equ 1
endif
endif

if (NTDDI_VERSION LT NTDDI_VISTA)
DEFINE_GUIDSTRUCT("CBE3FAA0-CC75-11D0-B465-00001A1818E6", KSPROPSETID_Sysaudio)
endif

if (NTDDI_VERSION GE NTDDI_WINXP AND NTDDI_VERSION LT NTDDI_VISTA)

KSPROPERTY_SYSAUDIO_DEVICE_COUNT equ 1
KSPROPERTY_SYSAUDIO_DEVICE_FRIENDLY_NAME equ 2
KSPROPERTY_SYSAUDIO_DEVICE_INSTANCE equ 3
KSPROPERTY_SYSAUDIO_DEVICE_INTERFACE_NAME equ 4
KSPROPERTY_SYSAUDIO_SELECT_GRAPH equ 5
KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE equ 6
KSPROPERTY_SYSAUDIO_DEVICE_DEFAULT equ 7
KSPROPERTY_SYSAUDIO_INSTANCE_INFO equ 14
KSPROPERTY_SYSAUDIO_COMPONENT_ID equ 16

endif

if (NTDDI_VERSION LT NTDDI_WINXP)

KSPROPERTY_SYSAUDIO_DEVICE_COUNT equ 1
KSPROPERTY_SYSAUDIO_DEVICE_FRIENDLY_NAME equ 1
KSPROPERTY_SYSAUDIO_DEVICE_INSTANCE equ 2
KSPROPERTY_SYSAUDIO_DEVICE_INTERFACE_NAME equ 3
KSPROPERTY_SYSAUDIO_SELECT_GRAPH equ 4
KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE equ 5
KSPROPERTY_SYSAUDIO_DEVICE_DEFAULT equ 6
KSPROPERTY_SYSAUDIO_ALWAYS_CREATE_VIRTUAL_SOURCE equ 7
KSPROPERTY_SYSAUDIO_ADDREMOVE_LOCK equ 8
KSPROPERTY_SYSAUDIO_ADDREMOVE_UNLOCK equ 9
KSPROPERTY_SYSAUDIO_RENDER_PIN_INSTANCES equ 10
KSPROPERTY_SYSAUDIO_RENDER_CONNECTION_INDEX equ 11
KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE_ONLY equ 12
KSPROPERTY_SYSAUDIO_INSTANCE_INFO equ 13
KSPROPERTY_SYSAUDIO_PREFERRED_DEVICE equ 14

endif

if (NTDDI_VERSION LT NTDDI_VISTA)

SYSAUDIO_CREATE_VIRTUAL_SOURCE STRUC
Property		KSPROPERTY ?
PinCategory		GUID <>
PinName			GUID <>
SYSAUDIO_CREATE_VIRTUAL_SOURCE ENDS
PSYSAUDIO_CREATE_VIRTUAL_SOURCE typedef ptr SYSAUDIO_CREATE_VIRTUAL_SOURCE

endif


if (NTDDI_VERSION LT NTDDI_VISTA)

SYSAUDIO_SELECT_GRAPH	STRUC
Property		KSPROPERTY ?
PinId			ULONG ?
NodeId			ULONG ?
Flags			ULONG ?
Reserved		ULONG ?
SYSAUDIO_SELECT_GRAPH	ENDS
PSYSAUDIO_SELECT_GRAPH	typedef ptr SYSAUDIO_SELECT_GRAPH

SYSAUDIO_INSTANCE_INFO	STRUC
Property		KSPROPERTY ?
Flags			ULONG ?
DeviceNumber		ULONG ?
SYSAUDIO_INSTANCE_INFO	ENDS
PSYSAUDIO_INSTANCE_INFO typedef ptr SYSAUDIO_INSTANCE_INFO

SYSAUDIO_FLAGS_DONT_COMBINE_PINS equ 0x00000001

endif

if (NTDDI_VERSION LT NTDDI_WINXP)
SYSAUDIO_PREFERRED_DEVICE STRUC
Property		KSPROPERTY ?
Flags			ULONG ?
Index			ULONG ?
SYSAUDIO_PREFERRED_DEVICE ENDS
PSYSAUDIO_PREFERRED_DEVICE typedef ptr SYSAUDIO_PREFERRED_DEVICE

SYSAUDIO_FLAGS_CLEAR_PREFERRED equ 0x00000002
endif

if (NTDDI_VERSION LT NTDDI_VISTA)
DEFINE_GUIDSTRUCT("A3A53220-C6E4-11D0-B465-00001A1818E6", KSPROPSETID_Sysaudio_Pin)
endif

if (NTDDI_VERSION GE NTDDI_WINXP AND NTDDI_VERSION LT NTDDI_VISTA)
KSPROPERTY_SYSAUDIO_ATTACH_VIRTUAL_SOURCE equ 1
endif

if (NTDDI_VERSION LT NTDDI_WINXP)
KSPROPERTY_SYSAUDIO_TOPOLOGY_CONNECTION_INDEX equ 0
KSPROPERTY_SYSAUDIO_ATTACH_VIRTUAL_SOURCE equ 1
KSPROPERTY_SYSAUDIO_PIN_VOLUME_NODE equ 2
endif

if (NTDDI_VERSION LT NTDDI_VISTA)

SYSAUDIO_ATTACH_VIRTUAL_SOURCE STRUC
Property		KSPROPERTY ?
MixerPinId		ULONG ?
Reserved		ULONG ?
SYSAUDIO_ATTACH_VIRTUAL_SOURCE ENDS
PSYSAUDIO_ATTACH_VIRTUAL_SOURCE typedef ptr SYSAUDIO_ATTACH_VIRTUAL_SOURCE

endif

KSNODEPROPERTY		STRUC
Property		KSPROPERTY <>
NodeId			ULONG ?
Reserved		ULONG ?
KSNODEPROPERTY		ENDS
PKSNODEPROPERTY		typedef ptr KSNODEPROPERTY

KSNODEPROPERTY_AUDIO_CHANNEL STRUC
NodeProperty		KSNODEPROPERTY <>
Channel			LONG ?
Reserved		ULONG ?
KSNODEPROPERTY_AUDIO_CHANNEL ENDS
PKSNODEPROPERTY_AUDIO_CHANNEL typedef ptr KSNODEPROPERTY_AUDIO_CHANNEL

KSNODEPROPERTY_AUDIO_DEV_SPECIFIC STRUC
NodeProperty		KSNODEPROPERTY <>
DevSpecificId		ULONG ?
DeviceInfo		ULONG ?
Length			ULONG ?
KSNODEPROPERTY_AUDIO_DEV_SPECIFIC ENDS
PKSNODEPROPERTY_AUDIO_DEV_SPECIFIC typedef ptr KSNODEPROPERTY_AUDIO_DEV_SPECIFIC

KSNODEPROPERTY_AUDIO_3D_LISTENER STRUC
NodeProperty		KSNODEPROPERTY <>
ListenerId		PVOID ?
ifndef _WIN64
Reserved		ULONG ?
endif
KSNODEPROPERTY_AUDIO_3D_LISTENER ENDS
PKSNODEPROPERTY_AUDIO_3D_LISTENER typedef ptr KSNODEPROPERTY_AUDIO_3D_LISTENER

KSNODEPROPERTY_AUDIO_PROPERTY STRUC
NodeProperty		KSNODEPROPERTY <>
AppContext		PVOID ?
Length			ULONG ?
ifndef _WIN64
Reserved		ULONG ?
endif
KSNODEPROPERTY_AUDIO_PROPERTY ENDS
PKSNODEPROPERTY_AUDIO_PROPERTY typedef ptr KSNODEPROPERTY_AUDIO_PROPERTY

if (NTDDI_VERSION GE NTDDI_WINXP AND NTDDI_VERSION LT NTDDI_VISTA)

DEFINE_GUIDSTRUCT("79A9312E-59AE-43b0-A350-8B05284CAB24", KSPROPSETID_AudioGfx)

KSPROPERTY_AUDIOGFX_RENDERTARGETDEVICEID equ 0
KSPROPERTY_AUDIOGFX_CAPTURETARGETDEVICEID equ 1

endif

if (NTDDI_VERSION LT NTDDI_WS03)

DEFINE_GUIDSTRUCT("5A2FFE80-16B9-11D0-A5D6-28DB04C10000", KSPROPSETID_Linear)

KSPROPERTY_LINEAR_POSITION equ 0

endif

DEFINE_GUIDSTRUCT("E725D360-62CC-11CF-A5D6-28DB04C10000", KSDATAFORMAT_TYPE_MUSIC)
DEFINE_GUIDSTRUCT("7364696D-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_MIDI)
DEFINE_GUIDSTRUCT("1D262760-E957-11CF-A5D6-28DB04C10000", KSDATAFORMAT_SUBTYPE_MIDI)
DEFINE_GUIDSTRUCT("2CA15FA0-6CFE-11CF-A5D6-28DB04C10000", KSDATAFORMAT_SUBTYPE_MIDI_BUS)
DEFINE_GUIDSTRUCT("4995DAF0-9EE6-11D0-A40E-00A0C9223196", KSDATAFORMAT_SUBTYPE_RIFFMIDI)

KSMUSICFORMAT		STRUC
TimeDeltaMs		ULONG ?
ByteCount		ULONG ?
KSMUSICFORMAT		ENDS
PKSMUSICFORMAT		typedef ptr KSMUSICFORMAT

DEFINE_GUIDSTRUCT("36523B11-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM )
DEFINE_GUIDSTRUCT("36523B12-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_TYPE_STANDARD_PES_PACKET )
DEFINE_GUIDSTRUCT("36523B13-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER )
DEFINE_GUIDSTRUCT("36523B21-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO )
DEFINE_GUIDSTRUCT("36523B22-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO )
DEFINE_GUIDSTRUCT("36523B23-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO )
DEFINE_GUIDSTRUCT("36523B24-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO )
DEFINE_GUIDSTRUCT("36523B25-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO )
DEFINE_GUIDSTRUCT("36523B31-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO )
DEFINE_GUIDSTRUCT("36523B32-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO )
DEFINE_GUIDSTRUCT("36523B33-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO )
DEFINE_GUIDSTRUCT("36523B34-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO )
DEFINE_GUIDSTRUCT("36523B35-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO )
DEFINE_GUIDSTRUCT("a0af4f81-e163-11d0-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_DSS_VIDEO)
DEFINE_GUIDSTRUCT("a0af4f82-e163-11d0-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_DSS_AUDIO)
DEFINE_GUIDSTRUCT("e436eb80-524f-11ce-9F53-0020af0ba770", KSDATAFORMAT_SUBTYPE_MPEG1Packet)
DEFINE_GUIDSTRUCT("e436eb81-524f-11ce-9F53-0020af0ba770", KSDATAFORMAT_SUBTYPE_MPEG1Payload)
DEFINE_GUIDSTRUCT("e436eb86-524f-11ce-9f53-0020af0ba770", KSDATAFORMAT_SUBTYPE_MPEG1Video)
DEFINE_GUIDSTRUCT("05589f82-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO)
DEFINE_GUIDSTRUCT("e06d8020-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_TYPE_MPEG2_PES)
DEFINE_GUIDSTRUCT("e06d8022-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_TYPE_MPEG2_PROGRAM)
DEFINE_GUIDSTRUCT("e06d8023-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_TYPE_MPEG2_TRANSPORT)
DEFINE_GUIDSTRUCT("e06d8026-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO)
DEFINE_GUIDSTRUCT("e06d80e3-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO)
DEFINE_GUIDSTRUCT("C8E11B60-0CC9-11D0-BD69-003505C103A9", KSPROPSETID_Mpeg2Vid)

KSPROPERTY_MPEG2VID_MODES equ 0
KSPROPERTY_MPEG2VID_CUR_MODE equ 1
KSPROPERTY_MPEG2VID_4_3_RECT equ 2
KSPROPERTY_MPEG2VID_16_9_RECT equ 3
KSPROPERTY_MPEG2VID_16_9_PANSCAN equ 4

KSMPEGVIDMODE_PANSCAN	equ 0x0001
KSMPEGVIDMODE_LTRBOX	equ 0x0002
KSMPEGVIDMODE_SCALE	equ 0x0004

KSMPEGVID_RECT		STRUC
StartX			ULONG ?
StartY			ULONG ?
EndX			ULONG ?
EndY			ULONG ?
KSMPEGVID_RECT		ENDS
PKSMPEGVID_RECT		typedef ptr KSMPEGVID_RECT

DEFINE_GUIDSTRUCT("e06d802b-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO)
DEFINE_GUIDSTRUCT("e06d80e5-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO)
DEFINE_GUIDSTRUCT("e06d8032-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_LPCM_AUDIO)
DEFINE_GUIDSTRUCT("e06d80e6-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_LPCM_AUDIO)
DEFINE_GUIDSTRUCT("e06d802c-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_AC3_AUDIO)
DEFINE_GUIDSTRUCT("e06d80e4-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_AC3_AUDIO)
DEFINE_GUIDSTRUCT("BFABE720-6E1F-11D0-BCF2-444553540000", KSPROPSETID_AC3)

KSPROPERTY_AC3_ERROR_CONCEALMENT equ 1
KSPROPERTY_AC3_ALTERNATE_AUDIO equ 1
KSPROPERTY_AC3_DOWNMIX	equ 2
KSPROPERTY_AC3_BIT_STREAM_MODE equ 3
KSPROPERTY_AC3_DIALOGUE_LEVEL equ 4
KSPROPERTY_AC3_LANGUAGE_CODE equ 5
KSPROPERTY_AC3_ROOM_TYPE equ 6

KSAC3_ERROR_CONCEALMENT STRUC
fRepeatPreviousBlock	BOOL ?
fErrorInCurrentBlock	BOOL ?
KSAC3_ERROR_CONCEALMENT ENDS
PKSAC3_ERROR_CONCEALMENT typedef ptr KSAC3_ERROR_CONCEALMENT

KSAC3_ALTERNATE_AUDIO	STRUC
fStereo			BOOL ?
DualMode		ULONG ?
KSAC3_ALTERNATE_AUDIO	ENDS
PKSAC3_ALTERNATE_AUDIO	typedef ptr KSAC3_ALTERNATE_AUDIO

KSAC3_ALTERNATE_AUDIO_1 equ 1
KSAC3_ALTERNATE_AUDIO_2 equ 2
KSAC3_ALTERNATE_AUDIO_BOTH equ 3

KSAC3_DOWNMIX		STRUC
fDownMix		BOOL ?
fDolbySurround		BOOL ?
KSAC3_DOWNMIX		ENDS
PKSAC3_DOWNMIX		typedef ptr KSAC3_DOWNMIX

KSAC3_BIT_STREAM_MODE	STRUC
BitStreamMode		LONG ?
KSAC3_BIT_STREAM_MODE	ENDS
PKSAC3_BIT_STREAM_MODE	typedef ptr KSAC3_BIT_STREAM_MODE

KSAC3_SERVICE_MAIN_AUDIO equ 0
KSAC3_SERVICE_NO_DIALOG equ 1
KSAC3_SERVICE_VISUALLY_IMPAIRED equ 2
KSAC3_SERVICE_HEARING_IMPAIRED equ 3
KSAC3_SERVICE_DIALOG_ONLY equ 4
KSAC3_SERVICE_COMMENTARY equ 5
KSAC3_SERVICE_EMERGENCY_FLASH equ 6
KSAC3_SERVICE_VOICE_OVER equ 7

KSAC3_DIALOGUE_LEVEL	STRUC
DialogueLevel		ULONG ?
KSAC3_DIALOGUE_LEVEL	ENDS
PKSAC3_DIALOGUE_LEVEL	typedef ptr KSAC3_DIALOGUE_LEVEL

KSAC3_ROOM_TYPE		STRUC
fLargeRoom		BOOL ?
KSAC3_ROOM_TYPE		ENDS
PKSAC3_ROOM_TYPE	typedef ptr KSAC3_ROOM_TYPE

DEFINE_GUIDSTRUCT("00000092-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL)
DEFINE_GUIDSTRUCT("00000164-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_WMA_PRO)
DEFINE_GUIDSTRUCT("00000008-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_DTS)
DEFINE_GUIDSTRUCT("00000003-0cea-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_MPEG1)
DEFINE_GUIDSTRUCT("00000004-0cea-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_MPEG2)
DEFINE_GUIDSTRUCT("00000005-0cea-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_MPEG3)
DEFINE_GUIDSTRUCT("00000006-0cea-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_AAC)
DEFINE_GUIDSTRUCT("00000008-0cea-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_ATRAC)
DEFINE_GUIDSTRUCT("00000009-0cea-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_ONE_BIT_AUDIO)
DEFINE_GUIDSTRUCT("0000000a-0cea-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL_PLUS)
DEFINE_GUIDSTRUCT("0000000b-0cea-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_DTS_HD)
DEFINE_GUIDSTRUCT("0000000c-0cea-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_MLP)
DEFINE_GUIDSTRUCT("0000000d-0cea-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEC61937_DST)

if (NTDDI_VERSION GE NTDDI_WINXP)
DEFINE_GUIDSTRUCT("e06d8033-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_DTS_AUDIO)
DEFINE_GUIDSTRUCT("e06d8034-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_SDDS_AUDIO)
endif

DEFINE_GUIDSTRUCT("6ca6e020-43bd-11d0-bd6a-003505c103a9", KSPROPSETID_AudioDecoderOut)

KSPROPERTY_AUDDECOUT_MODES equ 0
KSPROPERTY_AUDDECOUT_CUR_MODE equ 1

KSAUDDECOUTMODE_STEREO_ANALOG equ 0x0001
KSAUDDECOUTMODE_PCM_51	equ 0x0002
KSAUDDECOUTMODE_SPDIFF	equ 0x0004

DEFINE_GUIDSTRUCT("e06d802d-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_SUBPICTURE)
DEFINE_GUIDSTRUCT("ac390460-43af-11d0-bd6a-003505c103a9", KSPROPSETID_DvdSubPic)

KSPROPERTY_DVDSUBPIC_PALETTE equ 0
KSPROPERTY_DVDSUBPIC_HLI equ 1
KSPROPERTY_DVDSUBPIC_COMPOSIT_ON equ 2

KS_DVD_YCrCb		STRUC
Reserved		UCHAR ?
Y			UCHAR ?
Cr			UCHAR ?
Cb			UCHAR ?
KS_DVD_YCrCb		ENDS
PKS_DVD_YCrCb		typedef ptr KS_DVD_YCrCb

KS_DVD_YUV		STRUC
Reserved		UCHAR ?
Y			UCHAR ?
V			UCHAR ?
U			UCHAR ?
KS_DVD_YUV		ENDS
PKS_DVD_YUV		typedef ptr KS_DVD_YUV

KSPROPERTY_SPPAL	STRUC
sppal			KS_DVD_YUV 16 dup(<>)
KSPROPERTY_SPPAL	ENDS
PKSPROPERTY_SPPAL	typedef ptr KSPROPERTY_SPPAL

KS_COLCON		STRUC
if 0
emph1col:4		UCHAR ?
emph2col:4		UCHAR ?
backcol:4		UCHAR ?
patcol:4		UCHAR ?
emph1con:4		UCHAR ?
emph2con:4		UCHAR ?
backcon:4		UCHAR ?
patcon:4		UCHAR ?
else
flags			UCHAR ?
endif
KS_COLCON		ENDS
PKS_COLCON		typedef ptr KS_COLCON

KSPROPERTY_SPHLI	STRUC
HLISS			USHORT ?
Reserved		USHORT ?
StartPTM		ULONG ?
EndPTM			ULONG ?
StartX			USHORT ?
StartY			USHORT ?
StopX			USHORT ?
StopY			USHORT ?
ColCon			KS_COLCON <>
KSPROPERTY_SPHLI	ENDS
PKSPROPERTY_SPHLI	typedef ptr KSPROPERTY_SPHLI

PKSPROPERTY_COMPOSIT_ON typedef ptr BOOL

DEFINE_GUIDSTRUCT("0E8A0A40-6AEF-11D0-9ED0-00A024CA19B3", KSPROPSETID_CopyProt)

KSPROPERTY_DVDCOPY_CHLG_KEY equ 0x01
KSPROPERTY_DVDCOPY_DVD_KEY1 equ 1
KSPROPERTY_DVDCOPY_DEC_KEY2 equ 2
KSPROPERTY_DVDCOPY_TITLE_KEY equ 3
KSPROPERTY_COPY_MACROVISION equ 4
KSPROPERTY_DVDCOPY_REGION equ 5
KSPROPERTY_DVDCOPY_SET_COPY_STATE equ 6
KSPROPERTY_DVDCOPY_DISC_KEY equ 0x80

KS_DVDCOPY_CHLGKEY	STRUC
ChlgKey			db 10 dup(?)
Reserved		db 2 dup(?)
KS_DVDCOPY_CHLGKEY	ENDS
PKS_DVDCOPY_CHLGKEY	typedef ptr KS_DVDCOPY_CHLGKEY

KS_DVDCOPY_BUSKEY	STRUC
BusKey			db 5 dup(?)
Reserved		db 1 dup(?)
KS_DVDCOPY_BUSKEY	ENDS
PKS_DVDCOPY_BUSKEY	typedef ptr KS_DVDCOPY_BUSKEY


KS_DVDCOPY_DISCKEY	STRUC
DiscKey			db 2048 dup(?)
KS_DVDCOPY_DISCKEY	ENDS
PKS_DVDCOPY_DISCKEY	typedef ptr KS_DVDCOPY_DISCKEY

KS_DVDCOPY_REGION	STRUC
Reserved		UCHAR ?
RegionData		UCHAR ?
Reserved2		UCHAR 2 dup(?)
KS_DVDCOPY_REGION	ENDS
PKS_DVDCOPY_REGION	typedef ptr KS_DVDCOPY_REGION

KS_DVDCOPY_TITLEKEY	STRUC
KeyFlags		ULONG ?
ReservedNT		ULONG 2 dup(?)
TitleKey		UCHAR 6 dup(?)
Reserved		UCHAR 2 dup(?)
KS_DVDCOPY_TITLEKEY	ENDS
PKS_DVDCOPY_TITLEKEY	typedef ptr KS_DVDCOPY_TITLEKEY

KS_COPY_MACROVISION	STRUC
MACROVISIONLevel	ULONG ?
KS_COPY_MACROVISION	ENDS
PKS_COPY_MACROVISION	typedef ptr KS_COPY_MACROVISION

KS_DVDCOPY_SET_COPY_STATE  STRUC
DVDCopyState		ULONG ?
KS_DVDCOPY_SET_COPY_STATE ENDS
PKS_DVDCOPY_SET_COPY_STATE typedef ptr KS_DVDCOPY_SET_COPY_STATE

KS_DVDCOPYSTATE_INITIALIZE equ 0
KS_DVDCOPYSTATE_INITIALIZE_TITLE equ 1
KS_DVDCOPYSTATE_AUTHENTICATION_NOT_REQUIRED equ 2
KS_DVDCOPYSTATE_AUTHENTICATION_REQUIRED equ 3
KS_DVDCOPYSTATE_DONE	equ 4

KS_MACROVISION_DISABLED equ 0
KS_MACROVISION_LEVEL1	equ 1
KS_MACROVISION_LEVEL2	equ 2
KS_MACROVISION_LEVEL3	equ 3

KS_DVD_CGMS_RESERVED_MASK equ 0x00000078
KS_DVD_CGMS_COPY_PROTECT_MASK equ 0x00000018
KS_DVD_CGMS_COPY_PERMITTED equ 0x00000000
KS_DVD_CGMS_COPY_ONCE	equ 0x00000010
KS_DVD_CGMS_NO_COPY	equ 0x00000018
KS_DVD_COPYRIGHT_MASK	equ 0x00000040
KS_DVD_NOT_COPYRIGHTED	equ 0x00000000
KS_DVD_COPYRIGHTED	equ 0x00000040
KS_DVD_SECTOR_PROTECT_MASK equ 0x00000020
KS_DVD_SECTOR_NOT_PROTECTED equ 0x00000000
KS_DVD_SECTOR_PROTECTED equ 0x00000020


DEFINE_GUIDSTRUCT("a799a800-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_TVTUNER)
DEFINE_GUIDSTRUCT("a799a801-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_CROSSBAR)
DEFINE_GUIDSTRUCT("a799a802-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_TVAUDIO)
DEFINE_GUIDSTRUCT("a799a803-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_VPMUX)
DEFINE_GUIDSTRUCT("07dad660-22f1-11d1-a9f4-00c04fbbde8f", KSCATEGORY_VBICODEC)
DEFINE_GUIDSTRUCT("5a9b6a40-1a22-11d1-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_VPVideo)
DEFINE_GUIDSTRUCT("5a9b6a41-1a22-11d1-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_VPVBI)
DEFINE_GUIDSTRUCT("05589f80-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_VIDEOINFO)
DEFINE_GUIDSTRUCT("f72a76A0-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SPECIFIER_VIDEOINFO2)
DEFINE_GUIDSTRUCT("0482dde1-7817-11cf-8a03-00aa006ecb65", KSDATAFORMAT_TYPE_ANALOGVIDEO)
DEFINE_GUIDSTRUCT("0482dde0-7817-11cf-8a03-00aa006ecb65", KSDATAFORMAT_SPECIFIER_ANALOGVIDEO)

if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)

DEFINE_GUIDSTRUCT("0482DEE1-7817-11cf-8a03-00aa006ecb65", KSDATAFORMAT_TYPE_ANALOGAUDIO)
endif

DEFINE_GUIDSTRUCT("f72a76e0-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SPECIFIER_VBI)
DEFINE_GUIDSTRUCT("f72a76e1-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_TYPE_VBI)
DEFINE_GUIDSTRUCT("ca20d9a0-3e3e-11d1-9bf9-00c04fbbdebf", KSDATAFORMAT_SUBTYPE_RAW8)

if (NTDDI_VERSION GE NTDDI_WINXP)

DEFINE_GUIDSTRUCT("33214CC1-011F-11D2-B4B1-00A0D102CFBE", KSDATAFORMAT_SUBTYPE_CC)
endif
DEFINE_GUIDSTRUCT("f72a76e2-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SUBTYPE_NABTS)
DEFINE_GUIDSTRUCT("f72a76e3-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SUBTYPE_TELETEXT)

KS_BI_RGB		equ 0
KS_BI_RLE8		equ 1
KS_BI_RLE4		equ 2
KS_BI_BITFIELDS		equ 3

KS_RGBQUAD		STRUC
rgbBlue			db ?
rgbGreen		db ?
rgbRed			db ?
rgbReserved		db ?
KS_RGBQUAD		ENDS
PKS_RGBQUAD		typedef ptr KS_RGBQUAD

KS_iPALETTE_COLORS	equ 256
KS_iEGA_COLORS		equ 16
KS_iMASK_COLORS		equ 3
KS_iTRUECOLOR		equ 16
KS_iRED			equ 0
KS_iGREEN		equ 1
KS_iBLUE		equ 2
KS_iPALETTE		equ 8
KS_iMAXBITS		equ 8
KS_SIZE_EGA_PALETTE	equ (KS_iEGA_COLORS * KS_RGBQUAD)
KS_SIZE_PALETTE		equ (KS_iPALETTE_COLORS * KS_RGBQUAD)

KS_BITMAPINFOHEADER	STRUC
biSize			dd ?
biWidth			LONG ?
biHeight		LONG ?
biPlanes		dw ?
biBitCount		dw ?
biCompression		dd ?
biSizeImage		dd ?
biXPelsPerMeter		LONG ?
biYPelsPerMeter		LONG ?
biClrUsed		dd ?
biClrImportant		dd ?
KS_BITMAPINFOHEADER	ENDS
PKS_BITMAPINFOHEADER	typedef ptr KS_BITMAPINFOHEADER


KS_TRUECOLORINFO	STRUC
dwBitMasks		dd KS_iMASK_COLORS dup(?)
bmiColors		KS_RGBQUAD KS_iPALETTE_COLORS dup(<>)
KS_TRUECOLORINFO	ENDS
PKS_TRUECOLORINFO	typedef ptr KS_TRUECOLORINFO


KS_WIDTHBYTES macro bits
	exitm<((((bits)+31) AND ( NOT 31)) / 8)>
	endm
KS_DIBWIDTHBYTES macro bi
	exitm<>
	endm
KS__DIBSIZE macro bi
	exitm<>
	endm
KS_DIBSIZE macro bi
	exitm<>
	endm

REFERENCE_TIME		typedef LONGLONG


KS_VIDEOINFOHEADER	STRUC
rcSource		RECT <>
rcTarget		RECT <>
dwBitRate		dd ?
dwBitErrorRate		dd ?
AvgTimePerFrame		REFERENCE_TIME ?
bmiHeader		KS_BITMAPINFOHEADER <>
KS_VIDEOINFOHEADER	ENDS
PKS_VIDEOINFOHEADER	typedef ptr KS_VIDEOINFOHEADER

KS_VIDEOINFO		STRUC
rcSource		RECT <>
rcTarget		RECT <>
dwBitRate		dd ?
dwBitErrorRate		dd ?
AvgTimePerFrame		REFERENCE_TIME ?
bmiHeader		KS_BITMAPINFOHEADER <>
UNION ; {
bmiColors		KS_RGBQUAD KS_iPALETTE_COLORS dup(<>)
dwBitMasks		dd KS_iMASK_COLORS dup(?)
TrueColorInfo		KS_TRUECOLORINFO <>
ENDS ;
KS_VIDEOINFO		ENDS
PKS_VIDEOINFO		typedef ptr KS_VIDEOINFO


KS_SIZE_MASKS		equ (KS_iMASK_COLORS * DWORD)
KS_SIZE_PREHEADER	equ (FIELD_OFFSET(KS_VIDEOINFOHEADER,bmiHeader))

KS_SIZE_VIDEOHEADER macro pbmi
	exitm<((pbmi).bmiHeader.biSize + KS_SIZE_PREHEADER)>
	endm

KS_VBIINFOHEADER	STRUC
StartLine		ULONG ?
EndLine			ULONG ?
SamplingFrequency	ULONG ?
MinLineStartTime	ULONG ?
MaxLineStartTime	ULONG ?
ActualLineStartTime	ULONG ?
ActualLineEndTime	ULONG ?
VideoStandard		ULONG ?
SamplesPerLine		ULONG ?
StrideInBytes		ULONG ?
BufferSize		ULONG ?
KS_VBIINFOHEADER	ENDS
PKS_VBIINFOHEADER	typedef ptr KS_VBIINFOHEADER

if (NTDDI_VERSION GE NTDDI_WINXP)

KS_VBIDATARATE_NABTS	equ 5727272
KS_VBIDATARATE_CC	equ 503493
KS_VBISAMPLINGRATE_4X_NABTS equ (4*KS_VBIDATARATE_NABTS)
KS_VBISAMPLINGRATE_47X_NABTS equ 27000000
KS_VBISAMPLINGRATE_5X_NABTS equ (5*KS_VBIDATARATE_NABTS)

KS_47NABTS_SCALER	equ (KS_VBISAMPLINGRATE_47X_NABTS/KS_VBIDATARATE_NABTS)

endif


KS_ANALOGVIDEOINFO	STRUC
rcSource		RECT <>
rcTarget		RECT <>
dwActiveWidth		dd ?
dwActiveHeight		dd ?
AvgTimePerFrame		REFERENCE_TIME ?
KS_ANALOGVIDEOINFO	ENDS
PKS_ANALOGVIDEOINFO	typedef ptr KS_ANALOGVIDEOINFO


KS_TVTUNER_CHANGE_BEGIN_TUNE equ 0x0001
KS_TVTUNER_CHANGE_END_TUNE equ 0x0002

KS_TVTUNER_CHANGE_INFO	STRUC
dwFlags			dd ?
dwCountryCode		dd ?
dwAnalogVideoStandard	dd ?
dwChannel		dd ?
KS_TVTUNER_CHANGE_INFO	ENDS
PKS_TVTUNER_CHANGE_INFO typedef ptr KS_TVTUNER_CHANGE_INFO


KS_MPEG2Level_Low	equ 0
KS_MPEG2Level_Main	equ 1
KS_MPEG2Level_High1440	equ 2
KS_MPEG2Level_High	equ 3

KS_MPEG2Profile_Simple	equ 0
KS_MPEG2Profile_Main	equ 1
KS_MPEG2Profile_SNRScalable equ 2
KS_MPEG2Profile_SpatiallyScalable equ 3
KS_MPEG2Profile_High	equ 4

KS_INTERLACE_IsInterlaced equ 0x00000001
KS_INTERLACE_1FieldPerSample equ 0x00000002
KS_INTERLACE_Field1First equ 0x00000004
KS_INTERLACE_UNUSED	equ 0x00000008
KS_INTERLACE_FieldPatternMask equ 0x00000030
KS_INTERLACE_FieldPatField1Only equ 0x00000000
KS_INTERLACE_FieldPatField2Only equ 0x00000010
KS_INTERLACE_FieldPatBothRegular equ 0x00000020
KS_INTERLACE_FieldPatBothIrregular equ 0x00000030
KS_INTERLACE_DisplayModeMask equ 0x000000c0
KS_INTERLACE_DisplayModeBobOnly equ 0x00000000
KS_INTERLACE_DisplayModeWeaveOnly equ 0x00000040
KS_INTERLACE_DisplayModeBobOrWeave equ 0x00000080

KS_COPYPROTECT_RestrictDuplication equ 0x00000001

KS_MPEG2_DoPanScan	equ 0x00000001
KS_MPEG2_DVDLine21Field1 equ 0x00000002
KS_MPEG2_DVDLine21Field2 equ 0x00000004
KS_MPEG2_SourceIsLetterboxed equ 0x00000008
KS_MPEG2_FilmCameraMode equ 0x00000010
KS_MPEG2_LetterboxAnalogOut equ 0x00000020
KS_MPEG2_DSS_UserData	equ 0x00000040
KS_MPEG2_DVB_UserData	equ 0x00000080
KS_MPEG2_27MhzTimebase	equ 0x00000100

if (NTDDI_VERSION GE NTDDI_WINXP)

KS_MPEG2_WidescreenAnalogOut equ 0x00000200

KS_AMCONTROL_USED	equ 0x00000001
KS_AMCONTROL_PAD_TO_4x3 equ 0x00000002
KS_AMCONTROL_PAD_TO_16x9 equ 0x00000004
KS_AMCONTROL_COLORINFO_PRESENT equ 0x00000080

endif

KS_VIDEOINFOHEADER2	STRUC
rcSource		RECT <>
rcTarget		RECT <>
dwBitRate		dd ?
dwBitErrorRate		dd ?
AvgTimePerFrame		REFERENCE_TIME ?
dwInterlaceFlags	dd ?
dwCopyProtectFlags	dd ?
dwPictAspectRatioX	dd ?
dwPictAspectRatioY	dd ?
UNION ; {
dwControlFlags		dd ?
dwReserved1		dd ?
ENDS ;
dwReserved2		dd ?
bmiHeader		KS_BITMAPINFOHEADER <>
KS_VIDEOINFOHEADER2	ENDS
PKS_VIDEOINFOHEADER2	typedef ptr KS_VIDEOINFOHEADER2

KS_MPEG1VIDEOINFO	STRUC
hdr			KS_VIDEOINFOHEADER <>
dwStartTimeCode		dd ?
cbSequenceHeader	dd ?
bSequenceHeader		db 1 dup(?)
KS_MPEG1VIDEOINFO	ENDS
PKS_MPEG1VIDEOINFO	typedef ptr KS_MPEG1VIDEOINFO

KS_MAX_SIZE_MPEG1_SEQUENCE_INFO equ 140
KS_SIZE_MPEG1VIDEOINFO macro pv
	exitm<>
	endm
KS_MPEG1_SEQUENCE_INFO macro pv
	exitm<>
	endm

KS_MPEGVIDEOINFO2	STRUC
hdr			KS_VIDEOINFOHEADER2 <>
dwStartTimeCode		dd ?
cbSequenceHeader	dd ?
dwProfile		dd ?
dwLevel			dd ?
dwFlags			dd ?
bSequenceHeader		dd 1 dup(?)
KS_MPEGVIDEOINFO2	ENDS
PKS_MPEGVIDEOINFO2	typedef ptr KS_MPEGVIDEOINFO2


KS_SIZE_MPEGVIDEOINFO2 macro pv
	exitm<(FIELD_OFFSET(KS_MPEGVIDEOINFO2, bSequenceHeader[0]) + (pv)- GT cbSequenceHeader)>
	endm
KS_MPEG1_SEQUENCE_INFO macro pv
	exitm<>
	endm


KS_MPEGAUDIOINFO_27MhzTimebase equ 0x00000001

KS_MPEGAUDIOINFO	STRUC
dwFlags			dd ?
dwReserved1		dd ?
dwReserved2		dd ?
dwReserved3		dd ?
KS_MPEGAUDIOINFO	ENDS
PKS_MPEGAUDIOINFO	typedef ptr KS_MPEGAUDIOINFO


KS_DATAFORMAT_VIDEOINFOHEADER  STRUC
DataFormat		KSDATAFORMAT <>
VideoInfoHeader		KS_VIDEOINFOHEADER <>
KS_DATAFORMAT_VIDEOINFOHEADER ENDS
PKS_DATAFORMAT_VIDEOINFOHEADER typedef ptr KS_DATAFORMAT_VIDEOINFOHEADER

KS_DATAFORMAT_VIDEOINFOHEADER2	STRUC
DataFormat		KSDATAFORMAT <>
VideoInfoHeader2	KS_VIDEOINFOHEADER2 <>
KS_DATAFORMAT_VIDEOINFOHEADER2 ENDS
PKS_DATAFORMAT_VIDEOINFOHEADER2 typedef ptr KS_DATAFORMAT_VIDEOINFOHEADER2

KS_DATAFORMAT_MPEGVIDEOINFO2  STRUC
DataFormat		KSDATAFORMAT <>
MpegVideoInfoHeader2	KS_MPEGVIDEOINFO2 <>
KS_DATAFORMAT_MPEGVIDEOINFO2 ENDS
PKS_DATAFORMAT_MPEGVIDEOINFO2 typedef ptr KS_DATAFORMAT_MPEGVIDEOINFO2

KS_DATAFORMAT_VIDEOINFO_PALETTE	 STRUC
DataFormat		KSDATAFORMAT <>
VideoInfo		KS_VIDEOINFO <>
KS_DATAFORMAT_VIDEOINFO_PALETTE ENDS
PKS_DATAFORMAT_VIDEOINFO_PALETTE typedef ptr KS_DATAFORMAT_VIDEOINFO_PALETTE

KS_DATAFORMAT_VBIINFOHEADER  STRUC
DataFormat		KSDATAFORMAT <>
VBIInfoHeader		KS_VBIINFOHEADER <>
KS_DATAFORMAT_VBIINFOHEADER ENDS
PKS_DATAFORMAT_VBIINFOHEADER typedef ptr KS_DATAFORMAT_VBIINFOHEADER

KS_VIDEO_STREAM_CONFIG_CAPS   STRUC
guid			GUID <>
VideoStandard		ULONG ?
InputSize		SIZEL <>
MinCroppingSize		SIZEL <>
MaxCroppingSize		SIZEL <>
CropGranularityX	SINT ?
CropGranularityY	SINT ?
CropAlignX		SINT ?
CropAlignY		SINT ?
MinOutputSize		SIZEL <>
MaxOutputSize		SIZEL <>
OutputGranularityX	SINT ?
OutputGranularityY	SINT ?
StretchTapsX		SINT ?
StretchTapsY		SINT ?
ShrinkTapsX		SINT ?
ShrinkTapsY		SINT ?
MinFrameInterval	LONGLONG ?
MaxFrameInterval	LONGLONG ?
MinBitsPerSecond	LONG ?
MaxBitsPerSecond	LONG ?
KS_VIDEO_STREAM_CONFIG_CAPS ENDS
PKS_VIDEO_STREAM_CONFIG_CAPS typedef ptr KS_VIDEO_STREAM_CONFIG_CAPS


KS_DATARANGE_VIDEO	STRUC
DataRange		KSDATARANGE <>
bFixedSizeSamples	BOOL ?
bTemporalCompression	BOOL ?
StreamDescriptionFlags	dd ?
MemoryAllocationFlags	dd ?
ConfigCaps		KS_VIDEO_STREAM_CONFIG_CAPS <>
VideoInfoHeader		KS_VIDEOINFOHEADER <>
KS_DATARANGE_VIDEO	ENDS
PKS_DATARANGE_VIDEO	typedef ptr KS_DATARANGE_VIDEO

KS_DATARANGE_VIDEO2	STRUC
DataRange		KSDATARANGE <>
bFixedSizeSamples	BOOL ?
bTemporalCompression	BOOL ?
StreamDescriptionFlags	dd ?
MemoryAllocationFlags	dd ?
ConfigCaps		KS_VIDEO_STREAM_CONFIG_CAPS <>
VideoInfoHeader		KS_VIDEOINFOHEADER2 <>
KS_DATARANGE_VIDEO2	ENDS
PKS_DATARANGE_VIDEO2	typedef ptr KS_DATARANGE_VIDEO2

KS_DATARANGE_MPEG1_VIDEO  STRUC
DataRange		KSDATARANGE <>
bFixedSizeSamples	BOOL ?
bTemporalCompression	BOOL ?
StreamDescriptionFlags	dd ?
MemoryAllocationFlags	dd ?
ConfigCaps		KS_VIDEO_STREAM_CONFIG_CAPS <>
VideoInfoHeader		KS_MPEG1VIDEOINFO <>
KS_DATARANGE_MPEG1_VIDEO ENDS
PKS_DATARANGE_MPEG1_VIDEO typedef ptr KS_DATARANGE_MPEG1_VIDEO

KS_DATARANGE_MPEG2_VIDEO  STRUC
DataRange		KSDATARANGE <>
bFixedSizeSamples	BOOL ?
bTemporalCompression	BOOL ?
StreamDescriptionFlags	dd ?
MemoryAllocationFlags	dd ?
ConfigCaps		KS_VIDEO_STREAM_CONFIG_CAPS <>
VideoInfoHeader		KS_MPEGVIDEOINFO2 <>
KS_DATARANGE_MPEG2_VIDEO ENDS
PKS_DATARANGE_MPEG2_VIDEO typedef ptr KS_DATARANGE_MPEG2_VIDEO

KS_DATARANGE_VIDEO_PALETTE  STRUC
DataRange		KSDATARANGE <>
bFixedSizeSamples	BOOL ?
bTemporalCompression	BOOL ?
StreamDescriptionFlags	dd ?
MemoryAllocationFlags	dd ?
ConfigCaps		KS_VIDEO_STREAM_CONFIG_CAPS <>
VideoInfo		KS_VIDEOINFO <>
KS_DATARANGE_VIDEO_PALETTE ENDS
PKS_DATARANGE_VIDEO_PALETTE typedef ptr KS_DATARANGE_VIDEO_PALETTE

KS_DATARANGE_VIDEO_VBI	STRUC
DataRange		KSDATARANGE <>
bFixedSizeSamples	BOOL ?
bTemporalCompression	BOOL ?
StreamDescriptionFlags	dd ?
MemoryAllocationFlags	dd ?
ConfigCaps		KS_VIDEO_STREAM_CONFIG_CAPS <>
VBIInfoHeader		KS_VBIINFOHEADER <>
KS_DATARANGE_VIDEO_VBI	ENDS
PKS_DATARANGE_VIDEO_VBI typedef ptr KS_DATARANGE_VIDEO_VBI

KS_DATARANGE_ANALOGVIDEO  STRUC
DataRange		KSDATARANGE <>
AnalogVideoInfo		KS_ANALOGVIDEOINFO <>
KS_DATARANGE_ANALOGVIDEO ENDS
PKS_DATARANGE_ANALOGVIDEO typedef ptr KS_DATARANGE_ANALOGVIDEO


KS_VIDEOSTREAM_PREVIEW	equ 0x0001
KS_VIDEOSTREAM_CAPTURE	equ 0x0002
KS_VIDEOSTREAM_VBI	equ 0x0010
KS_VIDEOSTREAM_NABTS	equ 0x0020
KS_VIDEOSTREAM_CC	equ 0x0100
KS_VIDEOSTREAM_EDS	equ 0x0200
KS_VIDEOSTREAM_TELETEXT equ 0x0400
KS_VIDEOSTREAM_STILL	equ 0x1000
KS_VIDEOSTREAM_IS_VPE	equ 0x8000

KS_VIDEO_ALLOC_VPE_SYSTEM equ 0x0001
KS_VIDEO_ALLOC_VPE_DISPLAY equ 0x0002
KS_VIDEO_ALLOC_VPE_AGP	equ 0x0004

if (NTDDI_VERSION GE NTDDI_WINXP)

DEFINE_GUIDSTRUCT("F162C607-7B35-496f-AD7F-2DCA3B46B718", KSPROPSETID_VBICAP_PROPERTIES)

KSPROPERTY_VBICAP_PROPERTIES_PROTECTION equ 0x01

VBICAP_PROPERTIES_PROTECTION_S	STRUC
Property		KSPROPERTY <>
StreamIndex		ULONG ?
Status			ULONG ?
VBICAP_PROPERTIES_PROTECTION_S ENDS
PVBICAP_PROPERTIES_PROTECTION_S typedef ptr VBICAP_PROPERTIES_PROTECTION_S
KS_VBICAP_PROTECTION_MV_PRESENT equ 0x0001
KS_VBICAP_PROTECTION_MV_HARDWARE equ 0x0002
KS_VBICAP_PROTECTION_MV_DETECTED equ 0x0004

endif

KS_NABTS_GROUPID_ORIGINAL_CONTENT_BASE equ 0x800
KS_NABTS_GROUPID_ORIGINAL_CONTENT_ADVERTISER_BASE equ 0x810
KS_NABTS_GROUPID_PRODUCTION_COMPANY_CONTENT_BASE equ 0x820
KS_NABTS_GROUPID_PRODUCTION_COMPANY_ADVERTISER_BASE equ 0x830
KS_NABTS_GROUPID_SYNDICATED_SHOW_CONTENT_BASE equ 0x840
KS_NABTS_GROUPID_SYNDICATED_SHOW_ADVERTISER_BASE equ 0x850
KS_NABTS_GROUPID_NETWORK_WIDE_CONTENT_BASE equ 0x860
KS_NABTS_GROUPID_NETWORK_WIDE_ADVERTISER_BASE equ 0x870
KS_NABTS_GROUPID_TELEVISION_STATION_CONTENT_BASE equ 0x880
KS_NABTS_GROUPID_TELEVISION_STATION_ADVERTISER_BASE equ 0x890
KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_CONTENT_BASE equ 0x8A0
KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_ADVERTISER_BASE equ 0x8B0
KS_NABTS_GROUPID_MICROSOFT_RESERVED_TEST_DATA_BASE equ 0x8F0

DEFINE_GUIDSTRUCT("E757BCA0-39AC-11d1-A9F5-00C04FBBDE8F", KSDATAFORMAT_TYPE_NABTS)
DEFINE_GUIDSTRUCT("E757BCA1-39AC-11d1-A9F5-00C04FBBDE8F", KSDATAFORMAT_SUBTYPE_NABTS_FEC)

MAX_NABTS_VBI_LINES_PER_FIELD equ 11
NABTS_LINES_PER_BUNDLE	equ 16
NABTS_PAYLOAD_PER_LINE	equ 28
NABTS_BYTES_PER_LINE	equ 36

NABTSFEC_BUFFER		STRUC
dataSize		ULONG ?
groupID			USHORT ?
Reserved		USHORT ?
data			UCHAR NABTS_LINES_PER_BUNDLE * NABTS_PAYLOAD_PER_LINE dup(?)
NABTSFEC_BUFFER		ENDS
PNABTSFEC_BUFFER	typedef ptr NABTSFEC_BUFFER


DEFINE_GUIDSTRUCT("cafeb0ca-8715-11d0-bd6a-0035c0edbabe", KSPROPSETID_VBICodecFiltering)

KSPROPERTY_VBICODECFILTERING_SCANLINES_REQUESTED_BIT_ARRAY equ 0x01
KSPROPERTY_VBICODECFILTERING_SCANLINES_DISCOVERED_BIT_ARRAY equ 1
KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY equ 2
KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY equ 3
KSPROPERTY_VBICODECFILTERING_STATISTICS equ 4

VBICODECFILTERING_SCANLINES  STRUC
DwordBitArray		dd 32 dup(?)
VBICODECFILTERING_SCANLINES ENDS
PVBICODECFILTERING_SCANLINES typedef ptr VBICODECFILTERING_SCANLINES

VBICODECFILTERING_NABTS_SUBSTREAMS  STRUC
SubstreamMask		dd 128 dup(?)
VBICODECFILTERING_NABTS_SUBSTREAMS ENDS
PVBICODECFILTERING_NABTS_SUBSTREAMS typedef ptr VBICODECFILTERING_NABTS_SUBSTREAMS

VBICODECFILTERING_CC_SUBSTREAMS	 STRUC
SubstreamMask		dd ?
VBICODECFILTERING_CC_SUBSTREAMS ENDS
PVBICODECFILTERING_CC_SUBSTREAMS typedef ptr VBICODECFILTERING_CC_SUBSTREAMS

KS_CC_SUBSTREAM_ODD	equ 0x0001
KS_CC_SUBSTREAM_EVEN	equ 0x0002

if (NTDDI_VERSION GE NTDDI_WINXP)

KS_CC_SUBSTREAM_FIELD1_MASK equ 0x00F0
KS_CC_SUBSTREAM_SERVICE_CC1 equ 0x0010
KS_CC_SUBSTREAM_SERVICE_CC2 equ 0x0020
KS_CC_SUBSTREAM_SERVICE_T1 equ 0x0040
KS_CC_SUBSTREAM_SERVICE_T2 equ 0x0080

KS_CC_SUBSTREAM_FIELD2_MASK equ 0x1F00
KS_CC_SUBSTREAM_SERVICE_CC3 equ 0x0100
KS_CC_SUBSTREAM_SERVICE_CC4 equ 0x0200
KS_CC_SUBSTREAM_SERVICE_T3 equ 0x0400
KS_CC_SUBSTREAM_SERVICE_T4 equ 0x0800
KS_CC_SUBSTREAM_SERVICE_XDS equ 0x1000

CC_MAX_HW_DECODE_LINES	equ 12
CC_BYTE_PAIR		STRUC
Decoded			db 2 dup(?)
Reserved		USHORT ?
CC_BYTE_PAIR		ENDS
PCC_BYTE_PAIR		typedef ptr CC_BYTE_PAIR

CC_HW_FIELD		STRUC
ScanlinesRequested	VBICODECFILTERING_SCANLINES <>
fieldFlags		ULONG ?
PictureNumber		LONGLONG ?
Lines			CC_BYTE_PAIR CC_MAX_HW_DECODE_LINES dup(<>)
CC_HW_FIELD		ENDS
PCC_HW_FIELD		typedef ptr CC_HW_FIELD

endif

.pragma pack(push, 1)

NABTS_BUFFER_LINE	STRUC
Confidence		db ?
Bytes			db NABTS_BYTES_PER_LINE dup(?)
NABTS_BUFFER_LINE	ENDS
PNABTS_BUFFER_LINE	typedef ptr NABTS_BUFFER_LINE

NABTS_BUFFER_PICTURENUMBER_SUPPORT equ 1
NABTS_BUFFER		STRUC
ScanlinesRequested	VBICODECFILTERING_SCANLINES <>
PictureNumber		LONGLONG ?
NabtsLines		NABTS_BUFFER_LINE MAX_NABTS_VBI_LINES_PER_FIELD dup(<>)
NABTS_BUFFER		ENDS
PNABTS_BUFFER		typedef ptr NABTS_BUFFER

.pragma pack(pop)

if (NTDDI_VERSION GE NTDDI_WINXP)


WST_TVTUNER_CHANGE_BEGIN_TUNE equ 0x1000
WST_TVTUNER_CHANGE_END_TUNE equ 0x2000

MAX_WST_VBI_LINES_PER_FIELD equ 17
WST_BYTES_PER_LINE	equ 42

WST_BUFFER_LINE		STRUC
Confidence		db ?
Bytes			db WST_BYTES_PER_LINE dup(?)
WST_BUFFER_LINE		ENDS
PWST_BUFFER_LINE	typedef ptr WST_BUFFER_LINE

WST_BUFFER		STRUC
ScanlinesRequested	VBICODECFILTERING_SCANLINES <>
WstLines		WST_BUFFER_LINE MAX_WST_VBI_LINES_PER_FIELD dup(<>)
WST_BUFFER		ENDS
PWST_BUFFER		typedef ptr WST_BUFFER

endif


VBICODECFILTERING_STATISTICS_COMMON STRUC
InputSRBsProcessed	dd ?
OutputSRBsProcessed	dd ?
SRBsIgnored		dd ?
InputSRBsMissing	dd ?
OutputSRBsMissing	dd ?
OutputFailures		dd ?
InternalErrors		dd ?
ExternalErrors		dd ?
InputDiscontinuities	dd ?
DSPFailures		dd ?
TvTunerChanges		dd ?
VBIHeaderChanges	dd ?
LineConfidenceAvg	dd ?
BytesOutput		dd ?
VBICODECFILTERING_STATISTICS_COMMON ENDS
PVBICODECFILTERING_STATISTICS_COMMON typedef ptr VBICODECFILTERING_STATISTICS_COMMON

VBICODECFILTERING_STATISTICS_COMMON_PIN STRUC
SRBsProcessed		dd ?
SRBsIgnored		dd ?
SRBsMissing		dd ?
InternalErrors		dd ?
ExternalErrors		dd ?
Discontinuities		dd ?
LineConfidenceAvg	dd ?
BytesOutput		dd ?
VBICODECFILTERING_STATISTICS_COMMON_PIN ENDS
PVBICODECFILTERING_STATISTICS_COMMON_PIN typedef ptr VBICODECFILTERING_STATISTICS_COMMON_PIN


VBICODECFILTERING_STATISTICS_NABTS STRUC
Common			VBICODECFILTERING_STATISTICS_COMMON <>
FECBundleBadLines	dd ?
FECQueueOverflows	dd ?
FECCorrectedLines	dd ?
FECUncorrectableLines	dd ?
BundlesProcessed	dd ?
BundlesSent2IP		dd ?
FilteredLines		dd ?
VBICODECFILTERING_STATISTICS_NABTS ENDS
PVBICODECFILTERING_STATISTICS_NABTS typedef ptr VBICODECFILTERING_STATISTICS_NABTS

VBICODECFILTERING_STATISTICS_NABTS_PIN STRUC
Common			VBICODECFILTERING_STATISTICS_COMMON_PIN <>
VBICODECFILTERING_STATISTICS_NABTS_PIN ENDS
PVBICODECFILTERING_STATISTICS_NABTS_PIN typedef ptr VBICODECFILTERING_STATISTICS_NABTS_PIN


VBICODECFILTERING_STATISTICS_CC STRUC
Common			VBICODECFILTERING_STATISTICS_COMMON <>
VBICODECFILTERING_STATISTICS_CC ENDS
PVBICODECFILTERING_STATISTICS_CC typedef ptr VBICODECFILTERING_STATISTICS_CC


VBICODECFILTERING_STATISTICS_CC_PIN STRUC
Common			VBICODECFILTERING_STATISTICS_COMMON_PIN <>
VBICODECFILTERING_STATISTICS_CC_PIN ENDS
PVBICODECFILTERING_STATISTICS_CC_PIN typedef ptr VBICODECFILTERING_STATISTICS_CC_PIN

if (NTDDI_VERSION GE NTDDI_WINXP)

VBICODECFILTERING_STATISTICS_TELETEXT STRUC
Common			VBICODECFILTERING_STATISTICS_COMMON <>
VBICODECFILTERING_STATISTICS_TELETEXT ENDS
PVBICODECFILTERING_STATISTICS_TELETEXT typedef ptr VBICODECFILTERING_STATISTICS_TELETEXT

VBICODECFILTERING_STATISTICS_TELETEXT_PIN STRUC
Common			VBICODECFILTERING_STATISTICS_COMMON_PIN <>
VBICODECFILTERING_STATISTICS_TELETEXT_PIN ENDS
PVBICODECFILTERING_STATISTICS_TELETEXT_PIN typedef ptr VBICODECFILTERING_STATISTICS_TELETEXT_PIN

endif

KSPROPERTY_VBICODECFILTERING_SCANLINES_S STRUC
Property		KSPROPERTY <>
Scanlines		VBICODECFILTERING_SCANLINES <>
KSPROPERTY_VBICODECFILTERING_SCANLINES_S ENDS
PKSPROPERTY_VBICODECFILTERING_SCANLINES_S typedef ptr KSPROPERTY_VBICODECFILTERING_SCANLINES_S

KSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S STRUC
Property		KSPROPERTY <>
Substreams		VBICODECFILTERING_NABTS_SUBSTREAMS <>
KSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S ENDS
PKSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S typedef ptr KSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S

KSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S STRUC
Property		KSPROPERTY <>
Substreams		VBICODECFILTERING_CC_SUBSTREAMS <>
KSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S ENDS
PKSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S typedef ptr KSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S

KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S STRUC
Property		KSPROPERTY <>
Statistics		VBICODECFILTERING_STATISTICS_COMMON <>
KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S ENDS
PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S typedef ptr KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S

KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S STRUC
Property		KSPROPERTY <>
Statistics		VBICODECFILTERING_STATISTICS_COMMON_PIN <>
KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S ENDS
PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S typedef ptr KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S

KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S STRUC
Property		KSPROPERTY <>
Statistics		VBICODECFILTERING_STATISTICS_NABTS <>
KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S ENDS
PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S typedef ptr KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S

KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S STRUC
Property		KSPROPERTY <>
Statistics		VBICODECFILTERING_STATISTICS_NABTS_PIN <>
KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S ENDS
PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S typedef ptr KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S

KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S STRUC
Property		KSPROPERTY <>
Statistics		VBICODECFILTERING_STATISTICS_CC <>
KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S ENDS
PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S typedef ptr KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S

KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S STRUC
Property		KSPROPERTY <>
Statistics		VBICODECFILTERING_STATISTICS_CC_PIN <>
KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S ENDS
PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S typedef ptr KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S


DEFINE_GUIDSTRUCT("FB6C4281-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_CAPTURE)

if (NTDDI_VERSION GE NTDDI_WINXP)

DEFINE_GUIDSTRUCT("1AAD8061-012D-11d2-B4B1-00A0D102CFBE", PINNAME_VIDEO_CC_CAPTURE)
DEFINE_GUIDSTRUCT("29703660-498A-11d2-B4B1-00A0D102CFBE", PINNAME_VIDEO_NABTS_CAPTURE)

endif

DEFINE_GUIDSTRUCT("FB6C4282-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_PREVIEW)
DEFINE_GUIDSTRUCT("FB6C4283-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_ANALOGVIDEOIN)
DEFINE_GUIDSTRUCT("FB6C4284-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VBI)
DEFINE_GUIDSTRUCT("FB6C4285-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VIDEOPORT)
DEFINE_GUIDSTRUCT("FB6C4286-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_NABTS)
DEFINE_GUIDSTRUCT("FB6C4287-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_EDS)
DEFINE_GUIDSTRUCT("FB6C4288-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_TELETEXT)
DEFINE_GUIDSTRUCT("FB6C4289-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_CC)
DEFINE_GUIDSTRUCT("FB6C428A-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_STILL)
DEFINE_GUIDSTRUCT("FB6C428B-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_TIMECODE)
DEFINE_GUIDSTRUCT("FB6C428C-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VIDEOPORT_VBI)

KS_CAPTURE_ALLOC_INVALID equ 0
KS_CAPTURE_ALLOC_SYSTEM equ 0x0001
KS_CAPTURE_ALLOC_VRAM	equ 0x0002
KS_CAPTURE_ALLOC_SYSTEM_AGP equ 0x0004
KS_CAPTURE_ALLOC_VRAM_MAPPED equ 0x0008

DEFINE_GUIDSTRUCT("E73FACE3-2880-4902-B799-88D0CD634E0F", KSPROPSETID_VramCapture)

KSPROPERTY_DISPLAY_ADAPTER_GUID equ 1
KSPROPERTY_PREFERRED_CAPTURE_SURFACE equ 1
KSPROPERTY_CURRENT_CAPTURE_SURFACE equ 2
KSPROPERTY_MAP_CAPTURE_HANDLE_TO_VRAM_ADDRESS equ 3

DEFINE_KSPROPERTY_ITEM_DISPLAY_ADAPTER_GUID macro
	endm
DEFINE_KSPROPERTY_PREFERRED_CAPTURE_SURFACE macro
	endm
DEFINE_KSPROPERTY_CURRENT_CAPTURE_SURFACE macro GetHandler, SetHandler
	endm
DEFINE_KSPROPERTY_MAP_CAPTURE_HANDLE_TO_VRAM_ADDRESS macro
	endm

VRAM_SURFACE_INFO	STRUC
hSurface		UINT_PTR ?
VramPhysicalAddress	LONGLONG ?
cbCaptured		dd ?
dwWidth			dd ?
dwHeight		dd ?
dwLinearSize		dd ?
lPitch			LONG ?
ullReserved		ULONGLONG 16 dup(?)
VRAM_SURFACE_INFO	ENDS
PVRAM_SURFACE_INFO	typedef ptr VRAM_SURFACE_INFO

VRAM_SURFACE_INFO_PROPERTY_S STRUC
Property		KSPROPERTY <>
pVramSurfaceInfo	PVRAM_SURFACE_INFO ?
VRAM_SURFACE_INFO_PROPERTY_S ENDS
PVRAM_SURFACE_INFO_PROPERTY_S typedef ptr VRAM_SURFACE_INFO_PROPERTY_S


DEFINE_GUIDSTRUCT("FF6C4BFA-07A9-4c7b-A237-672F9D68065F", KSPROPSETID_MPEG4_MediaType_Attributes)

KSPROPERTY_MPEG4_MEDIATYPE_SD_BOX equ 1

DEFINE_GUIDSTRUCT("162AC456-83D7-4239-96DF-C75FFA138BC6", KSEVENTSETID_DynamicFormatChange)

KSEVENT_DYNAMIC_FORMAT_CHANGE equ 0


KS_VIDEO_FLAG_FIELD_MASK equ 0x0003
KS_VIDEO_FLAG_FRAME	equ 0x0000
KS_VIDEO_FLAG_FIELD1	equ 0x0001
KS_VIDEO_FLAG_FIELD2	equ 0x0002
KS_VIDEO_FLAG_FIELD1FIRST equ 0x0004
KS_VIDEO_FLAG_WEAVE	equ 0x0008

KS_VIDEO_FLAG_IPB_MASK	equ 0x0030
KS_VIDEO_FLAG_I_FRAME	equ 0x0000
KS_VIDEO_FLAG_P_FRAME	equ 0x0010
KS_VIDEO_FLAG_B_FRAME	equ 0x0020
KS_VIDEO_FLAG_REPEAT_FIELD equ 0x0040


KS_FRAME_INFO		STRUC
ExtendedHeaderSize	ULONG ?
dwFrameFlags		dd ?
PictureNumber		LONGLONG ?
DropCount		LONGLONG ?
hDirectDraw		HANDLE ?
hSurfaceHandle		HANDLE ?
DirectDrawRect		RECT <>
UNION ; {
lSurfacePitch		LONG ?
Reserved1		dd ?
ENDS ;
Reserved2		dd ?
Reserved3		dd ?
Reserved4		dd ?
KS_FRAME_INFO		ENDS
PKS_FRAME_INFO		typedef ptr KS_FRAME_INFO


if (NTDDI_VERSION LT NTDDI_WINXP)
KS_VBI_FLAG_FRAME	equ 0x0000
endif
KS_VBI_FLAG_FIELD1	equ 0x0001
KS_VBI_FLAG_FIELD2	equ 0x0002

if (NTDDI_VERSION GE NTDDI_WINXP)
KS_VBI_FLAG_MV_PRESENT	equ 0x0100
KS_VBI_FLAG_MV_HARDWARE equ 0x0200
KS_VBI_FLAG_MV_DETECTED equ 0x0400
endif

KS_VBI_FLAG_TVTUNER_CHANGE equ 0x0010
KS_VBI_FLAG_VBIINFOHEADER_CHANGE equ 0x0020

KS_VBI_FRAME_INFO	STRUC
ExtendedHeaderSize	ULONG ?
dwFrameFlags		dd ?
PictureNumber		LONGLONG ?
DropCount		LONGLONG ?
dwSamplingFrequency	dd ?
TvTunerChangeInfo	KS_TVTUNER_CHANGE_INFO <>
VBIInfoHeader		KS_VBIINFOHEADER <>
;;VramSurfaceInfo
KS_VBI_FRAME_INFO	ENDS
PKS_VBI_FRAME_INFO	typedef ptr KS_VBI_FRAME_INFO

KS_AnalogVideo_None	equ 0x00000000
KS_AnalogVideo_NTSC_M	equ 0x00000001
KS_AnalogVideo_NTSC_M_J equ 0x00000002
KS_AnalogVideo_NTSC_433 equ 0x00000004
KS_AnalogVideo_PAL_B	equ 0x00000010
KS_AnalogVideo_PAL_D	equ 0x00000020
KS_AnalogVideo_PAL_G	equ 0x00000040
KS_AnalogVideo_PAL_H	equ 0x00000080
KS_AnalogVideo_PAL_I	equ 0x00000100
KS_AnalogVideo_PAL_M	equ 0x00000200
KS_AnalogVideo_PAL_N	equ 0x00000400
KS_AnalogVideo_PAL_60	equ 0x00000800
KS_AnalogVideo_SECAM_B	equ 0x00001000
KS_AnalogVideo_SECAM_D	equ 0x00002000
KS_AnalogVideo_SECAM_G	equ 0x00004000
KS_AnalogVideo_SECAM_H	equ 0x00008000
KS_AnalogVideo_SECAM_K	equ 0x00010000
KS_AnalogVideo_SECAM_K1 equ 0x00020000
KS_AnalogVideo_SECAM_L	equ 0x00040000
KS_AnalogVideo_SECAM_L1 equ 0x00080000
if (NTDDI_VERSION GE NTDDI_WINXP)
KS_AnalogVideo_PAL_N_COMBO equ 0x00100000
endif
KS_AnalogVideo_NTSC_Mask equ 0x00000007
if (NTDDI_VERSION GE NTDDI_WINXP)
KS_AnalogVideo_PAL_Mask equ 0x00100FF0
else
KS_AnalogVideo_PAL_Mask equ 0x00000FF0
endif
KS_AnalogVideo_SECAM_Mask equ 0x000FF000
KS_AnalogVideoStandard typedef SDWORD

DEFINE_GUIDSTRUCT("53171960-148E-11d2-9979-0000C0CC16BA", PROPSETID_ALLOCATOR_CONTROL)

KSPROPERTY_ALLOCATOR_CONTROL_HONOR_COUNT equ 0
KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE equ 1
if (NTDDI_VERSION GE NTDDI_WINXP)
KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS equ 2
KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE equ 3
endif

if (NTDDI_VERSION GE NTDDI_WINXP)

KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S STRUC
_CX			ULONG ?
CY			ULONG ?
KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S ENDS
PKSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S typedef ptr KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S

KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S STRUC
InterleavedCapSupported ULONG ?
KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S ENDS
PKSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S typedef ptr KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S

KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S STRUC
InterleavedCapPossible	ULONG ?
KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S ENDS
PKSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S typedef ptr KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S

endif

DEFINE_GUIDSTRUCT("C6E13360-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEOPROCAMP)

KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS equ 0
KSPROPERTY_VIDEOPROCAMP_CONTRAST equ 1
KSPROPERTY_VIDEOPROCAMP_HUE equ 2
KSPROPERTY_VIDEOPROCAMP_SATURATION equ 3
KSPROPERTY_VIDEOPROCAMP_SHARPNESS equ 4
KSPROPERTY_VIDEOPROCAMP_GAMMA equ 5
KSPROPERTY_VIDEOPROCAMP_COLORENABLE equ 6
KSPROPERTY_VIDEOPROCAMP_WHITEBALANCE equ 7
KSPROPERTY_VIDEOPROCAMP_BACKLIGHT_COMPENSATION equ 8
if (NTDDI_VERSION GE NTDDI_WINXP)
KSPROPERTY_VIDEOPROCAMP_GAIN equ 9
if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)
KSPROPERTY_VIDEOPROCAMP_DIGITAL_MULTIPLIER equ 10
KSPROPERTY_VIDEOPROCAMP_DIGITAL_MULTIPLIER_LIMIT equ 11
KSPROPERTY_VIDEOPROCAMP_WHITEBALANCE_COMPONENT equ 12
KSPROPERTY_VIDEOPROCAMP_POWERLINE_FREQUENCY equ 13
endif
endif
KSPROPERTY_VIDCAP_VIDEOPROCAMP typedef SDWORD

KSPROPERTY_VIDEOPROCAMP_S STRUC
Property		KSPROPERTY <>
Value			LONG ?
Flags			ULONG ?
Capabilities		ULONG ?
KSPROPERTY_VIDEOPROCAMP_S ENDS
PKSPROPERTY_VIDEOPROCAMP_S typedef ptr KSPROPERTY_VIDEOPROCAMP_S

if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)

KSPROPERTY_VIDEOPROCAMP_NODE_S STRUC
NodeProperty		KSP_NODE <>
Value			LONG ?
Flags			ULONG ?
Capabilities		ULONG ?
KSPROPERTY_VIDEOPROCAMP_NODE_S ENDS
PKSPROPERTY_VIDEOPROCAMP_NODE_S typedef ptr KSPROPERTY_VIDEOPROCAMP_NODE_S

KSPROPERTY_VIDEOPROCAMP_S2 STRUC
Property		KSPROPERTY <>
Value1			LONG ?
Flags			ULONG ?
Capabilities		ULONG ?
Value2			LONG ?
KSPROPERTY_VIDEOPROCAMP_S2 ENDS
PKSPROPERTY_VIDEOPROCAMP_S2 typedef ptr KSPROPERTY_VIDEOPROCAMP_S2

KSPROPERTY_VIDEOPROCAMP_NODE_S2 STRUC
NodeProperty		KSP_NODE <>
Value1			LONG ?
Flags			ULONG ?
Capabilities		ULONG ?
Value2			LONG ?
KSPROPERTY_VIDEOPROCAMP_NODE_S2 ENDS
PKSPROPERTY_VIDEOPROCAMP_NODE_S2 typedef ptr KSPROPERTY_VIDEOPROCAMP_NODE_S2

endif

KSPROPERTY_VIDEOPROCAMP_FLAGS_AUTO equ 0X0001
KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL equ 0X0002


if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)

DEFINE_GUIDSTRUCT("1ABDAECA-68B6-4F83-9371-B413907C7B9F", PROPSETID_VIDCAP_SELECTOR)

KSPROPERTY_SELECTOR_SOURCE_NODE_ID equ 0
KSPROPERTY_SELECTOR_NUM_SOURCES equ 1

KSPROPERTY_SELECTOR_S	STRUC
Property		KSPROPERTY <>
Value			LONG ?
Flags			ULONG ?
Capabilities		ULONG ?
KSPROPERTY_SELECTOR_S	ENDS
PKSPROPERTY_SELECTOR_S	typedef ptr KSPROPERTY_SELECTOR_S

KSPROPERTY_SELECTOR_NODE_S STRUC
NodeProperty		KSP_NODE <>
Value			LONG ?
Flags			ULONG ?
Capabilities		ULONG ?
KSPROPERTY_SELECTOR_NODE_S ENDS
PKSPROPERTY_SELECTOR_NODE_S typedef ptr KSPROPERTY_SELECTOR_NODE_S

endif

DEFINE_GUIDSTRUCT("6a2e0605-28e4-11d0-a18c-00a0c9118956", PROPSETID_TUNER)

KSPROPERTY_TUNER_CAPS	equ 0
KSPROPERTY_TUNER_MODE_CAPS equ 1
KSPROPERTY_TUNER_MODE	equ 2
KSPROPERTY_TUNER_STANDARD equ 3
KSPROPERTY_TUNER_FREQUENCY equ 4
KSPROPERTY_TUNER_INPUT	equ 5
KSPROPERTY_TUNER_STATUS equ 6
KSPROPERTY_TUNER_IF_MEDIUM equ 7
KSPROPERTY_TUNER_SCAN_CAPS equ 8
KSPROPERTY_TUNER_SCAN_STATUS equ 9
KSPROPERTY_TUNER_STANDARD_MODE equ 10
KSPROPERTY_TUNER_NETWORKTYPE_SCAN_CAPS equ 11

KSPROPERTY_TUNER_MODE_TV equ 0X0001
KSPROPERTY_TUNER_MODE_FM_RADIO equ 0X0002
KSPROPERTY_TUNER_MODE_AM_RADIO equ 0X0004
KSPROPERTY_TUNER_MODE_DSS equ 0X0008
KSPROPERTY_TUNER_MODE_ATSC equ 0X0010

KS_TUNER_TUNING_EXACT	equ 1
KS_TUNER_TUNING_FINE	equ 1
KS_TUNER_TUNING_COARSE	equ 2

KS_TUNER_STRATEGY_PLL	equ 0X01
KS_TUNER_STRATEGY_SIGNAL_STRENGTH equ 0X02
KS_TUNER_STRATEGY_DRIVER_TUNES equ 0X04

KSPROPERTY_TUNER_CAPS_S STRUC
Property		KSPROPERTY <>
ModesSupported		ULONG ?
VideoMedium		KSPIN_MEDIUM <>
TVAudioMedium		KSPIN_MEDIUM <>
RadioAudioMedium	KSPIN_MEDIUM <>
KSPROPERTY_TUNER_CAPS_S ENDS
PKSPROPERTY_TUNER_CAPS_S typedef ptr KSPROPERTY_TUNER_CAPS_S

KSPROPERTY_TUNER_IF_MEDIUM_S STRUC
Property		KSPROPERTY <>
IFMedium		KSPIN_MEDIUM <>
KSPROPERTY_TUNER_IF_MEDIUM_S ENDS
PKSPROPERTY_TUNER_IF_MEDIUM_S typedef ptr KSPROPERTY_TUNER_IF_MEDIUM_S

KSPROPERTY_TUNER_MODE_CAPS_S STRUC
Property		KSPROPERTY <>
Mode			ULONG ?
StandardsSupported	ULONG ?
MinFrequency		ULONG ?
MaxFrequency		ULONG ?
TuningGranularity	ULONG ?
NumberOfInputs		ULONG ?
SettlingTime		ULONG ?
Strategy		ULONG ?
KSPROPERTY_TUNER_MODE_CAPS_S ENDS
PKSPROPERTY_TUNER_MODE_CAPS_S typedef ptr KSPROPERTY_TUNER_MODE_CAPS_S

KSPROPERTY_TUNER_MODE_S STRUC
Property		KSPROPERTY <>
Mode			ULONG ?
KSPROPERTY_TUNER_MODE_S ENDS
PKSPROPERTY_TUNER_MODE_S typedef ptr KSPROPERTY_TUNER_MODE_S

KSPROPERTY_TUNER_FREQUENCY_S STRUC
Property		KSPROPERTY <>
Frequency		ULONG ?
LastFrequency		ULONG ?
TuningFlags		ULONG ?
VideoSubChannel		ULONG ?
AudioSubChannel		ULONG ?
Channel			ULONG ?
Country			ULONG ?
KSPROPERTY_TUNER_FREQUENCY_S ENDS
PKSPROPERTY_TUNER_FREQUENCY_S typedef ptr KSPROPERTY_TUNER_FREQUENCY_S

KSPROPERTY_TUNER_STANDARD_S STRUC
Property		KSPROPERTY <>
Standard		ULONG ?
KSPROPERTY_TUNER_STANDARD_S ENDS
PKSPROPERTY_TUNER_STANDARD_S typedef ptr KSPROPERTY_TUNER_STANDARD_S

KSPROPERTY_TUNER_STANDARD_MODE_S STRUC
Property		KSPROPERTY <>
AutoDetect		BOOL ?
KSPROPERTY_TUNER_STANDARD_MODE_S ENDS
PKSPROPERTY_TUNER_STANDARD_MODE_S typedef ptr KSPROPERTY_TUNER_STANDARD_MODE_S

KSPROPERTY_TUNER_INPUT_S STRUC
Property		KSPROPERTY <>
InputIndex		ULONG ?
KSPROPERTY_TUNER_INPUT_S ENDS
PKSPROPERTY_TUNER_INPUT_S typedef ptr KSPROPERTY_TUNER_INPUT_S

KSPROPERTY_TUNER_STATUS_S STRUC
Property		KSPROPERTY <>
CurrentFrequency	ULONG ?
PLLOffset		ULONG ?
SignalStrength		ULONG ?
Busy			ULONG ?
KSPROPERTY_TUNER_STATUS_S ENDS
PKSPROPERTY_TUNER_STATUS_S typedef ptr KSPROPERTY_TUNER_STATUS_S

TunerLockType		typedef SDWORD
TunerDecoderLockType	typedef SDWORD
Tuner_LockType_None	equ 0x00
Tuner_LockType_Within_Scan_Sensing_Range equ 0x01
Tuner_LockType_Locked	equ 0x02

TUNER_ANALOG_CAPS_S	STRUC
Mode			ULONG ?
StandardsSupported	ULONG ?
MinFrequency		ULONG ?
MaxFrequency		ULONG ?
TuningGranularity	ULONG ?
SettlingTime		ULONG ?
ScanSensingRange	ULONG ?
FineTuneSensingRange	ULONG ?
TUNER_ANALOG_CAPS_S	ENDS
PTUNER_ANALOG_CAPS_S	typedef ptr TUNER_ANALOG_CAPS_S

DEFINE_GUIDSTRUCT("6a2e0606-28e4-11d0-a18c-00a0c9118956", EVENTSETID_TUNER)

KSEVENT_TUNER_CHANGED	equ 0
KSEVENT_TUNER_INITIATE_SCAN equ 1

KSPROPERTY_TUNER_SCAN_CAPS_S STRUC
Property		KSPROPERTY <>
fSupportsHardwareAssistedScanning BOOL ?
SupportedBroadcastStandards ULONG ?
GUIDBucket		PVOID ?
lengthofBucket		ULONG ?
KSPROPERTY_TUNER_SCAN_CAPS_S ENDS
PKSPROPERTY_TUNER_SCAN_CAPS_S typedef ptr KSPROPERTY_TUNER_SCAN_CAPS_S

KSPROPERTY_TUNER_NETWORKTYPE_SCAN_CAPS_S STRUC
Property		KSPROPERTY <>
NetworkType		GUID <>
BufferSize		ULONG ?
NetworkTunerCapabilities PVOID ?
KSPROPERTY_TUNER_NETWORKTYPE_SCAN_CAPS_S ENDS
PKSPROPERTY_TUNER_NETWORKTYPE_SCAN_CAPS_S typedef ptr KSPROPERTY_TUNER_NETWORKTYPE_SCAN_CAPS_S

KSPROPERTY_TUNER_SCAN_STATUS_S STRUC
Property		KSPROPERTY <>
LockStatus		TunerLockType ?
CurrentFrequency	ULONG ?
KSPROPERTY_TUNER_SCAN_STATUS_S ENDS
PKSPROPERTY_TUNER_SCAN_STATUS_S typedef ptr KSPROPERTY_TUNER_SCAN_STATUS_S

KSEVENT_TUNER_INITIATE_SCAN_S STRUC
EventData		KSEVENTDATA <>
StartFrequency		ULONG ?
EndFrequency		ULONG ?
KSEVENT_TUNER_INITIATE_SCAN_S ENDS
PKSEVENT_TUNER_INITIATE_SCAN_S typedef ptr KSEVENT_TUNER_INITIATE_SCAN_S

if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)

DEFINE_GUIDSTRUCT("DFF229E1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VIDEO_STREAMING)
DEFINE_GUIDSTRUCT("DFF229E2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VIDEO_INPUT_TERMINAL)
DEFINE_GUIDSTRUCT("DFF229E3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VIDEO_OUTPUT_TERMINAL)
DEFINE_GUIDSTRUCT("DFF229E4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VIDEO_SELECTOR)
DEFINE_GUIDSTRUCT("DFF229E5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VIDEO_PROCESSING)
DEFINE_GUIDSTRUCT("DFF229E6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VIDEO_CAMERA_TERMINAL)
DEFINE_GUIDSTRUCT("DFF229E7-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VIDEO_INPUT_MTT)
DEFINE_GUIDSTRUCT("DFF229E8-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VIDEO_OUTPUT_MTT)

endif

DEFINE_GUIDSTRUCT("6a2e0610-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_VIDEOENCODER)

KSPROPERTY_VIDEOENCODER_CAPS equ 0
KSPROPERTY_VIDEOENCODER_STANDARD equ 1
KSPROPERTY_VIDEOENCODER_COPYPROTECTION equ 2
KSPROPERTY_VIDEOENCODER_CC_ENABLE equ 3

KSPROPERTY_VIDEOENCODER_S STRUC
Property		KSPROPERTY <>
Value			LONG ?
Flags			ULONG ?
Capabilities		ULONG ?
KSPROPERTY_VIDEOENCODER_S ENDS
PKSPROPERTY_VIDEOENCODER_S typedef ptr KSPROPERTY_VIDEOENCODER_S

DEFINE_GUIDSTRUCT("C6E13350-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEODECODER)

KSPROPERTY_VIDEODECODER_CAPS equ 0
KSPROPERTY_VIDEODECODER_STANDARD equ 1
KSPROPERTY_VIDEODECODER_STATUS equ 2
KSPROPERTY_VIDEODECODER_OUTPUT_ENABLE equ 3
KSPROPERTY_VIDEODECODER_VCR_TIMING equ 4
KSPROPERTY_VIDEODECODER_STATUS2 equ 5

KS_VIDEODECODER_FLAGS_CAN_DISABLE_OUTPUT equ 0X0001
KS_VIDEODECODER_FLAGS_CAN_USE_VCR_LOCKING equ 0X0002
KS_VIDEODECODER_FLAGS_CAN_INDICATE_LOCKED equ 0X0004

KSPROPERTY_VIDEODECODER_CAPS_S STRUC
Property		KSPROPERTY <>
StandardsSupported	ULONG ?
Capabilities		ULONG ?
SettlingTime		ULONG ?
HSyncPerVSync		ULONG ?
KSPROPERTY_VIDEODECODER_CAPS_S ENDS
PKSPROPERTY_VIDEODECODER_CAPS_S typedef ptr KSPROPERTY_VIDEODECODER_CAPS_S

KSPROPERTY_VIDEODECODER_STATUS_S STRUC
Property		KSPROPERTY <>
NumberOfLines		ULONG ?
SignalLocked		ULONG ?
KSPROPERTY_VIDEODECODER_STATUS_S ENDS
PKSPROPERTY_VIDEODECODER_STATUS_S typedef ptr KSPROPERTY_VIDEODECODER_STATUS_S

KSPROPERTY_VIDEODECODER_STATUS2_S STRUC
Property		KSPROPERTY <>
NumberOfLines		ULONG ?
SignalLocked		ULONG ?
ChromaLock		ULONG ?
KSPROPERTY_VIDEODECODER_STATUS2_S ENDS
PKSPROPERTY_VIDEODECODER_STATUS2_S typedef ptr KSPROPERTY_VIDEODECODER_STATUS2_S

KSPROPERTY_VIDEODECODER_S STRUC
Property		KSPROPERTY <>
Value			ULONG ?
KSPROPERTY_VIDEODECODER_S ENDS
PKSPROPERTY_VIDEODECODER_S typedef ptr KSPROPERTY_VIDEODECODER_S

DEFINE_GUIDSTRUCT("6a2e0621-28e4-11d0-a18c-00a0c9118956", EVENTSETID_VIDEODECODER)

KSEVENT_VIDEODECODER_CHANGED equ 0

DEFINE_GUIDSTRUCT("C6E13370-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_CAMERACONTROL)

KSPROPERTY_CAMERACONTROL_PAN equ 0
KSPROPERTY_CAMERACONTROL_TILT equ 1
KSPROPERTY_CAMERACONTROL_ROLL equ 2
KSPROPERTY_CAMERACONTROL_ZOOM equ 3
KSPROPERTY_CAMERACONTROL_EXPOSURE equ 4
KSPROPERTY_CAMERACONTROL_IRIS equ 5
KSPROPERTY_CAMERACONTROL_FOCUS equ 6
if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)
KSPROPERTY_CAMERACONTROL_SCANMODE equ 7
KSPROPERTY_CAMERACONTROL_PRIVACY equ 8
KSPROPERTY_CAMERACONTROL_PANTILT equ 9
KSPROPERTY_CAMERACONTROL_PAN_RELATIVE equ 10
KSPROPERTY_CAMERACONTROL_TILT_RELATIVE equ 11
KSPROPERTY_CAMERACONTROL_ROLL_RELATIVE equ 12
KSPROPERTY_CAMERACONTROL_ZOOM_RELATIVE equ 13
KSPROPERTY_CAMERACONTROL_EXPOSURE_RELATIVE equ 14
KSPROPERTY_CAMERACONTROL_IRIS_RELATIVE equ 15
KSPROPERTY_CAMERACONTROL_FOCUS_RELATIVE equ 16
KSPROPERTY_CAMERACONTROL_PANTILT_RELATIVE equ 17
KSPROPERTY_CAMERACONTROL_FOCAL_LENGTH equ 18
KSPROPERTY_CAMERACONTROL_AUTO_EXPOSURE_PRIORITY equ 19
endif

KSPROPERTY_CAMERACONTROL_S STRUC
Property		KSPROPERTY <>
Value			LONG ?
Flags			ULONG ?
Capabilities		ULONG ?
KSPROPERTY_CAMERACONTROL_S ENDS
PKSPROPERTY_CAMERACONTROL_S typedef ptr KSPROPERTY_CAMERACONTROL_S

KSPROPERTY_CAMERACONTROL_FLAGS_AUTO equ 0X0001
KSPROPERTY_CAMERACONTROL_FLAGS_MANUAL equ 0X0002

KSPROPERTY_CAMERACONTROL_FLAGS_ABSOLUTE equ 0X0000
KSPROPERTY_CAMERACONTROL_FLAGS_RELATIVE equ 0X0010

if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)

KSPROPERTY_CAMERACONTROL_NODE_S STRUC
NodeProperty		KSP_NODE <>
Value			LONG ?
Flags			ULONG ?
Capabilities		ULONG ?
KSPROPERTY_CAMERACONTROL_NODE_S ENDS
PKSPROPERTY_CAMERACONTROL_NODE_S typedef KSPROPERTY_CAMERACONTROL_NODE_S

KSPROPERTY_CAMERACONTROL_S2 STRUC
Property		KSPROPERTY <>
Value1			LONG ?
Flags			ULONG ?
Capabilities		ULONG ?
Value2			LONG ?
KSPROPERTY_CAMERACONTROL_S2 ENDS
PKSPROPERTY_CAMERACONTROL_S2 typedef ptr KSPROPERTY_CAMERACONTROL_S2

KSPROPERTY_CAMERACONTROL_NODE_S2 STRUC
NodeProperty		KSP_NODE <>
Value1			LONG ?
Flags			ULONG ?
Capabilities		ULONG ?
Value2			LONG ?
KSPROPERTY_CAMERACONTROL_NODE_S2 ENDS
PKSPROPERTY_CAMERACONTROL_NODE_S2 typedef ptr KSPROPERTY_CAMERACONTROL_NODE_S2

KSPROPERTY_CAMERACONTROL_FOCAL_LENGTH_S STRUC
Property		KSPROPERTY <>
lOcularFocalLength	LONG ?
lObjectiveFocalLengthMin LONG ?
lObjectiveFocalLengthMax LONG ?
KSPROPERTY_CAMERACONTROL_FOCAL_LENGTH_S ENDS
PKSPROPERTY_CAMERACONTROL_FOCAL_LENGTH_S typedef ptr KSPROPERTY_CAMERACONTROL_FOCAL_LENGTH_S

KSPROPERTY_CAMERACONTROL_NODE_FOCAL_LENGTH_S STRUC
NodeProperty		KSNODEPROPERTY <>
lOcularFocalLength	LONG ?
lObjectiveFocalLengthMin LONG ?
lObjectiveFocalLengthMax LONG ?
KSPROPERTY_CAMERACONTROL_NODE_FOCAL_LENGTH_S ENDS
PKSPROPERTY_CAMERACONTROL_NODE_FOCAL_LENGTH_S typedef ptr KSPROPERTY_CAMERACONTROL_NODE_FOCAL_LENGTH_S

ifndef __EDevCtrl__
__EDevCtrl__ equ 1

DEFINE_GUIDSTRUCT("B5730A90-1A2C-11cf-8C23-00AA006B6814", PROPSETID_EXT_DEVICE)

KSPROPERTY_EXTDEVICE_ID equ 0
KSPROPERTY_EXTDEVICE_VERSION equ 1
KSPROPERTY_EXTDEVICE_POWER_STATE equ 2
KSPROPERTY_EXTDEVICE_PORT equ 3
KSPROPERTY_EXTDEVICE_CAPABILITIES equ 4

DEVCAPS			STRUC
CanRecord		LONG ?
CanRecordStrobe		LONG ?
HasAudio		LONG ?
HasVideo		LONG ?
UsesFiles		LONG ?
CanSave			LONG ?
DeviceType		LONG ?
TCRead			LONG ?
TCWrite			LONG ?
CTLRead			LONG ?
IndexRead		LONG ?
Preroll			LONG ?
Postroll		LONG ?
SyncAcc			LONG ?
NormRate		LONG ?
CanPreview		LONG ?
CanMonitorSrc		LONG ?
CanTest			LONG ?
VideoIn			LONG ?
AudioIn			LONG ?
Calibrate		LONG ?
SeekType		LONG ?
SimulatedHardware	LONG ?
DEVCAPS			ENDS
PDEVCAPS		typedef ptr DEVCAPS

KSPROPERTY_EXTDEVICE_S	STRUC
Property		KSPROPERTY <>
UNION ; {
Capabilities		DEVCAPS <>
DevPort			ULONG ?
PowerState		ULONG ?
pawchString		WCHAR MAX_PATH dup(?)
NodeUniqueID		dd 2 dup(?)
ENDS ;u
KSPROPERTY_EXTDEVICE_S	ENDS
PKSPROPERTY_EXTDEVICE_S typedef ptr KSPROPERTY_EXTDEVICE_S

DEFINE_GUIDSTRUCT("A03CD5F0-3045-11cf-8C44-00AA006B6814", PROPSETID_EXT_TRANSPORT)

KSPROPERTY_EXTXPORT_CAPABILITIES equ 0
KSPROPERTY_EXTXPORT_INPUT_SIGNAL_MODE equ 1
KSPROPERTY_EXTXPORT_OUTPUT_SIGNAL_MODE equ 2
KSPROPERTY_EXTXPORT_LOAD_MEDIUM equ 3
KSPROPERTY_EXTXPORT_MEDIUM_INFO equ 4
KSPROPERTY_EXTXPORT_STATE equ 5
KSPROPERTY_EXTXPORT_STATE_NOTIFY equ 6
KSPROPERTY_EXTXPORT_TIMECODE_SEARCH equ 7
KSPROPERTY_EXTXPORT_ATN_SEARCH equ 8
KSPROPERTY_EXTXPORT_RTC_SEARCH equ 9
KSPROPERTY_RAW_AVC_CMD	equ 10

TRANSPORTSTATUS		STRUC
Mode			LONG ?
LastError		LONG ?
RecordInhibit		LONG ?
ServoLock		LONG ?
MediaPresent		LONG ?
MediaLength		LONG ?
MediaSize		LONG ?
MediaTrackCount		LONG ?
MediaTrackLength	LONG ?
MediaTrackSide		LONG ?
MediaType		LONG ?
LinkMode		LONG ?
NotifyOn		LONG ?
TRANSPORTSTATUS		ENDS
PTRANSPORTSTATUS	typedef ptr TRANSPORTSTATUS

TRANSPORTBASICPARMS	STRUC
TimeFormat		LONG ?
TimeReference		LONG ?
Superimpose		LONG ?
EndStopAction		LONG ?
RecordFormat		LONG ?
StepFrames		LONG ?
SetpField		LONG ?
Preroll			LONG ?
RecPreroll		LONG ?
Postroll		LONG ?
EditDelay		LONG ?
PlayTCDelay		LONG ?
RecTCDelay		LONG ?
EditField		LONG ?
FrameServo		LONG ?
ColorFrameServo		LONG ?
ServoRef		LONG ?
WarnGenlock		LONG ?
SetTracking		LONG ?
VolumeName		TCHAR 40 dup(?)
Ballistic		LONG 20 dup(?)
Speed			LONG ?
CounterFormat		LONG ?
TunerChannel		LONG ?
TunerNumber		LONG ?
TimerEvent		LONG ?
TimerStartDay		LONG ?
TimerStartTime		LONG ?
TimerStopDay		LONG ?
TimerStopTime		LONG ?
TRANSPORTBASICPARMS	ENDS
PTRANSPORTBASICPARMS	typedef ptr TRANSPORTBASICPARMS

TRANSPORTVIDEOPARMS	STRUC
OutputMode		LONG ?
Input			LONG ?
TRANSPORTVIDEOPARMS	ENDS
PTRANSPORTVIDEOPARMS	typedef ptr TRANSPORTVIDEOPARMS

TRANSPORTAUDIOPARMS	STRUC
EnableOutput		LONG ?
EnableRecord		LONG ?
EnableSelsync		LONG ?
Input			LONG ?
MonitorSource		LONG ?
TRANSPORTAUDIOPARMS	ENDS
PTRANSPORTAUDIOPARMS	typedef ptr TRANSPORTAUDIOPARMS

MEDIUM_INFO		STRUC
MediaPresent		BOOL ?
MediaType		ULONG ?
RecordInhibit		BOOL ?
MEDIUM_INFO		ENDS
PMEDIUM_INFO		typedef ptr MEDIUM_INFO

TRANSPORT_STATE		STRUC
Mode			ULONG ?
State			ULONG ?
TRANSPORT_STATE		ENDS
PTRANSPORT_STATE	typedef ptr TRANSPORT_STATE

KSPROPERTY_EXTXPORT_S	STRUC
Property		KSPROPERTY <>
UNION u
 Capabilities		ULONG ?
 SignalMode		ULONG ?
 LoadMedium		ULONG ?
 MediumInfo		MEDIUM_INFO <>
 XPrtState		TRANSPORT_STATE <>
 STRUC
  _frame		db ?
  second		db ?
  minute		db ?
  hour			db ?
 ENDS ;Timecode
 dwTimecode		dd ?
 dwAbsTrackNumber	dd ?
 STRUC RawAVC
  PayloadSize		ULONG ?
  Payload		db 512 dup(?)
 ENDS
ENDS
KSPROPERTY_EXTXPORT_S	ENDS
PKSPROPERTY_EXTXPORT_S	typedef ptr KSPROPERTY_EXTXPORT_S

KSPROPERTY_EXTXPORT_NODE_S STRUC
NodeProperty		KSP_NODE <>
UNION u
 Capabilities		ULONG ?
 SignalMode		ULONG ?
 LoadMedium		ULONG ?
 MediumInfo		MEDIUM_INFO <>
 XPrtState		TRANSPORT_STATE <>
 STRUC
  _frame		db ?
  second		db ?
  minute		db ?
  hour			db ?
 ENDS ;Timecode
 dwTimecode		dd ?
 dwAbsTrackNumber	dd ?
 STRUC RawAVC
  PayloadSize		ULONG ?
  Payload		db 512 dup(?)
 ENDS
ENDS
KSPROPERTY_EXTXPORT_NODE_S ENDS
PKSPROPERTY_EXTXPORT_NODE_S typedef ptr KSPROPERTY_EXTXPORT_NODE_S


DEFINE_GUIDSTRUCT("9B496CE1-811B-11cf-8C77-00AA006B6814", PROPSETID_TIMECODE_READER)

KSPROPERTY_TIMECODE_READER equ 0
KSPROPERTY_ATN_READER	equ 1
KSPROPERTY_RTC_READER	equ 2

ifndef TIMECODE_DEFINED
TIMECODE_DEFINED equ 1
TIMECODE		UNION
STRUC
 wFrameRate		dw ?
 wFrameFract		dw ?
 dwFrames		dd ?
ENDS
qw			dd ?
TIMECODE		ENDS
PTIMECODE		typedef ptr TIMECODE

TIMECODE_SAMPLE		STRUC
qwTick			LONGLONG ?
timecode		TIMECODE <>
dwUser			dd ?
dwFlags			dd ?
TIMECODE_SAMPLE		ENDS
PTIMECODE_SAMPLE	typedef ptr TIMECODE_SAMPLE

endif

KSPROPERTY_TIMECODE_S	STRUC
Property		KSPROPERTY <>
TimecodeSamp		TIMECODE_SAMPLE <>
KSPROPERTY_TIMECODE_S	ENDS
PKSPROPERTY_TIMECODE_S	typedef ptr KSPROPERTY_TIMECODE_S

KSPROPERTY_TIMECODE_NODE_S STRUC
NodeProperty		KSP_NODE <>
TimecodeSamp		TIMECODE_SAMPLE <>
KSPROPERTY_TIMECODE_NODE_S ENDS
PKSPROPERTY_TIMECODE_NODE_S typedef ptr KSPROPERTY_TIMECODE_NODE_S


DEFINE_GUIDSTRUCT("109c7988-b3cb-11d2-b48e-006097b3391b", KSEVENTSETID_EXTDEV_Command)

KSEVENT_EXTDEV_COMMAND_NOTIFY_INTERIM_READY equ 0
KSEVENT_EXTDEV_COMMAND_CONTROL_INTERIM_READY equ 1
KSEVENT_EXTDEV_COMMAND_BUSRESET equ 2
KSEVENT_EXTDEV_TIMECODE_UPDATE equ 3
KSEVENT_EXTDEV_OPERATION_MODE_UPDATE equ 4
KSEVENT_EXTDEV_TRANSPORT_STATE_UPDATE equ 5
KSEVENT_EXTDEV_NOTIFY_REMOVAL equ 6
KSEVENT_EXTDEV_NOTIFY_MEDIUM_CHANGE equ 7

endif ;; __EDevCtrl__
endif ;; XP SP2 and later (chronologically)


DEFINE_GUIDSTRUCT("6a2e0640-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_CROSSBAR)

KSPROPERTY_CROSSBAR_CAPS equ 0
KSPROPERTY_CROSSBAR_PININFO equ 1
KSPROPERTY_CROSSBAR_CAN_ROUTE equ 2
KSPROPERTY_CROSSBAR_ROUTE equ 3
KSPROPERTY_CROSSBAR_INPUT_ACTIVE equ 4

KSPROPERTY_CROSSBAR_CAPS_S STRUC
Property		KSPROPERTY <>
NumberOfInputs		ULONG ?
NumberOfOutputs		ULONG ?
KSPROPERTY_CROSSBAR_CAPS_S ENDS
PKSPROPERTY_CROSSBAR_CAPS_S typedef ptr KSPROPERTY_CROSSBAR_CAPS_S

KSPROPERTY_CROSSBAR_PININFO_S STRUC
Property		KSPROPERTY <>
Direction		KSPIN_DATAFLOW ?
Index			ULONG ?
PinType			ULONG ?
RelatedPinIndex		ULONG ?
Medium			KSPIN_MEDIUM <>
KSPROPERTY_CROSSBAR_PININFO_S ENDS
PKSPROPERTY_CROSSBAR_PININFO_S typedef ptr KSPROPERTY_CROSSBAR_PININFO_S

KSPROPERTY_CROSSBAR_ROUTE_S STRUC
Property		KSPROPERTY <>
IndexInputPin		ULONG ?
IndexOutputPin		ULONG ?
CanRoute		ULONG ?
KSPROPERTY_CROSSBAR_ROUTE_S ENDS
PKSPROPERTY_CROSSBAR_ROUTE_S typedef ptr KSPROPERTY_CROSSBAR_ROUTE_S

KSPROPERTY_CROSSBAR_ACTIVE_S STRUC
Property		KSPROPERTY <>
IndexInputPin		ULONG ?
Active			ULONG ?
KSPROPERTY_CROSSBAR_ACTIVE_S ENDS
PKSPROPERTY_CROSSBAR_ACTIVE_S typedef ptr KSPROPERTY_CROSSBAR_ACTIVE_S

DEFINE_GUIDSTRUCT("6a2e0641-28e4-11d0-a18c-00a0c9118956", EVENTSETID_CROSSBAR)

KSEVENT_CROSSBAR_CHANGED equ 0

KS_PhysConn_Video_Tuner equ 1
KS_PhysConn_Video_Composite equ 1
KS_PhysConn_Video_SVideo equ 2
KS_PhysConn_Video_RGB	equ 3
KS_PhysConn_Video_YRYBY equ 4
KS_PhysConn_Video_SerialDigital equ 5
KS_PhysConn_Video_ParallelDigital equ 6
KS_PhysConn_Video_SCSI	equ 7
KS_PhysConn_Video_AUX	equ 8
KS_PhysConn_Video_1394	equ 9
KS_PhysConn_Video_USB	equ 10
KS_PhysConn_Video_VideoDecoder equ 11
KS_PhysConn_Video_VideoEncoder equ 12
KS_PhysConn_Video_SCART equ 13
KS_PhysConn_Audio_Tuner equ 4096
KS_PhysConn_Audio_Line	equ 15
KS_PhysConn_Audio_Mic	equ 16
KS_PhysConn_Audio_AESDigital equ 17
KS_PhysConn_Audio_SPDIFDigital equ 18
KS_PhysConn_Audio_SCSI	equ 19
KS_PhysConn_Audio_AUX	equ 20
KS_PhysConn_Audio_1394	equ 21
KS_PhysConn_Audio_USB	equ 22
KS_PhysConn_Audio_AudioDecoder equ 23

DEFINE_GUIDSTRUCT("6a2e0650-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_TVAUDIO)

KSPROPERTY_TVAUDIO_CAPS equ 0
KSPROPERTY_TVAUDIO_MODE equ 1
KSPROPERTY_TVAUDIO_CURRENTLY_AVAILABLE_MODES equ 2

KS_TVAUDIO_MODE_MONO	equ 0x0001
KS_TVAUDIO_MODE_STEREO	equ 0x0002
KS_TVAUDIO_MODE_LANG_A	equ 0x0010
KS_TVAUDIO_MODE_LANG_B	equ 0x0020
KS_TVAUDIO_MODE_LANG_C	equ 0x0040
if (NTDDI_VERSION GE NTDDI_VISTA)
KS_TVAUDIO_PRESET_STEREO equ 0x0200
KS_TVAUDIO_PRESET_LANG_A equ 0x1000
KS_TVAUDIO_PRESET_LANG_B equ 0x2000
KS_TVAUDIO_PRESET_LANG_C equ 0x4000
endif

KSPROPERTY_TVAUDIO_CAPS_S STRUC
Property		KSPROPERTY <>
Capabilities		ULONG ?
InputMedium		KSPIN_MEDIUM <>
OutputMedium		KSPIN_MEDIUM <>
KSPROPERTY_TVAUDIO_CAPS_S ENDS
PKSPROPERTY_TVAUDIO_CAPS_S typedef ptr KSPROPERTY_TVAUDIO_CAPS_S

KSPROPERTY_TVAUDIO_S	STRUC
Property		KSPROPERTY <>
Mode			ULONG ?
KSPROPERTY_TVAUDIO_S	ENDS
PKSPROPERTY_TVAUDIO_S	typedef ptr KSPROPERTY_TVAUDIO_S

DEFINE_GUIDSTRUCT("6a2e0651-28e4-11d0-a18c-00a0c9118956", KSEVENTSETID_VIDCAP_TVAUDIO)
KSEVENT_TVAUDIO_CHANGED equ 0
DEFINE_GUIDSTRUCT("C6E13343-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEOCOMPRESSION)

KSPROPERTY_VIDEOCOMPRESSION_GETINFO equ 0
KSPROPERTY_VIDEOCOMPRESSION_KEYFRAME_RATE equ 1
KSPROPERTY_VIDEOCOMPRESSION_PFRAMES_PER_KEYFRAME equ 2
KSPROPERTY_VIDEOCOMPRESSION_QUALITY equ 3
KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_KEYFRAME equ 4
KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_FRAME_SIZE equ 5
KSPROPERTY_VIDEOCOMPRESSION_WINDOWSIZE equ 6

KS_CompressionCaps_CanQuality equ 1
KS_CompressionCaps_CanCrunch equ 2
KS_CompressionCaps_CanKeyFrame equ 4
KS_CompressionCaps_CanBFrame equ 8
KS_CompressionCaps_CanWindow equ 0x10

if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)

KS_StreamingHint_FrameInterval equ 0x0100
KS_StreamingHint_KeyFrameRate equ 0x0200
KS_StreamingHint_PFrameRate equ 0x0400
KS_StreamingHint_CompQuality equ 0x0800
KS_StreamingHint_CompWindowSize equ 0x1000

endif

KSPROPERTY_VIDEOCOMPRESSION_GETINFO_S STRUC
Property		KSPROPERTY <>
StreamIndex		ULONG ?
DefaultKeyFrameRate	LONG ?
DefaultPFrameRate	LONG ?
DefaultQuality		LONG ?
NumberOfQualitySettings LONG ?
Capabilities		LONG ?
KSPROPERTY_VIDEOCOMPRESSION_GETINFO_S ENDS
PKSPROPERTY_VIDEOCOMPRESSION_GETINFO_S typedef ptr KSPROPERTY_VIDEOCOMPRESSION_GETINFO_S

KSPROPERTY_VIDEOCOMPRESSION_S STRUC
Property		KSPROPERTY <>
StreamIndex		ULONG ?
Value			LONG ?
KSPROPERTY_VIDEOCOMPRESSION_S ENDS
PKSPROPERTY_VIDEOCOMPRESSION_S typedef ptr KSPROPERTY_VIDEOCOMPRESSION_S

if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)

KSPROPERTY_VIDEOCOMPRESSION_S1 STRUC
Property		KSPROPERTY <>
StreamIndex		ULONG ?
Value			LONG ?
Flags			ULONG ?
KSPROPERTY_VIDEOCOMPRESSION_S1 ENDS
PKSPROPERTY_VIDEOCOMPRESSION_S1 typedef ptr KSPROPERTY_VIDEOCOMPRESSION_S1

endif

DEFINE_GUIDSTRUCT("e436eb7f-524f-11ce-9f53-0020af0ba770", KSDATAFORMAT_SUBTYPE_OVERLAY)
DEFINE_GUIDSTRUCT("490EA5CF-7681-11D1-A21C-00A0C9223196", KSPROPSETID_OverlayUpdate)

KSPROPERTY_OVERLAYUPDATE_INTERESTS equ 0
KSPROPERTY_OVERLAYUPDATE_CLIPLIST equ 0x1
KSPROPERTY_OVERLAYUPDATE_PALETTE equ 0x2
KSPROPERTY_OVERLAYUPDATE_COLORKEY equ 0x4
KSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION equ 0x8
KSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE equ 0x10
KSPROPERTY_OVERLAYUPDATE_COLORREF equ 0x10000000

KSDISPLAYCHANGE		STRUC
PelsWidth		ULONG ?
PelsHeight		ULONG ?
BitsPerPel		ULONG ?
DeviceID		WCHAR 1 dup(?)
KSDISPLAYCHANGE		ENDS
PKSDISPLAYCHANGE	typedef ptr KSDISPLAYCHANGE

DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_INTERESTS macro Handler
	endm
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_PALETTE macro Handler
	endm
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORKEY macro Handler
	endm
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_CLIPLIST macro Handler
	endm
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_VIDEOPOSITION macro Handler
	endm
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_DISPLAYCHANGE macro Handler
	endm
DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORREF macro Handler
	endm

DEFINE_GUIDSTRUCT("6a2e0670-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_VIDEOCONTROL)

KSPROPERTY_VIDEOCONTROL_CAPS equ 0
KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE equ 1
KSPROPERTY_VIDEOCONTROL_FRAME_RATES equ 2
KSPROPERTY_VIDEOCONTROL_MODE equ 3

KS_VideoControlFlag_FlipHorizontal equ 0x0001
KS_VideoControlFlag_FlipVertical equ 0x0002
KS_Obsolete_VideoControlFlag_ExternalTriggerEnable equ 0x0010
KS_Obsolete_VideoControlFlag_Trigger equ 0x0020
KS_VideoControlFlag_ExternalTriggerEnable equ 0x0004
KS_VideoControlFlag_Trigger equ 0x0008

KSPROPERTY_VIDEOCONTROL_CAPS_S STRUC
Property		KSPROPERTY <>
StreamIndex		ULONG ?
VideoControlCaps	ULONG ?
KSPROPERTY_VIDEOCONTROL_CAPS_S ENDS
PKSPROPERTY_VIDEOCONTROL_CAPS_S typedef ptr KSPROPERTY_VIDEOCONTROL_CAPS_S

KSPROPERTY_VIDEOCONTROL_MODE_S STRUC
Property		KSPROPERTY <>
StreamIndex		ULONG ?
Mode			LONG ?
KSPROPERTY_VIDEOCONTROL_MODE_S ENDS
PKSPROPERTY_VIDEOCONTROL_MODE_S typedef ptr KSPROPERTY_VIDEOCONTROL_MODE_S

KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S STRUC
Property		KSPROPERTY <>
StreamIndex		ULONG ?
RangeIndex		ULONG ?
Dimensions		SIZEL <>
CurrentActualFrameRate	LONGLONG ?
CurrentMaxAvailableFrameRate LONGLONG ?
KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S ENDS
PKSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S typedef ptr KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S

KSPROPERTY_VIDEOCONTROL_FRAME_RATES_S STRUC
Property		KSPROPERTY <>
StreamIndex		ULONG ?
RangeIndex		ULONG ?
Dimensions		SIZEL <>
KSPROPERTY_VIDEOCONTROL_FRAME_RATES_S ENDS
PKSPROPERTY_VIDEOCONTROL_FRAME_RATES_S typedef ptr KSPROPERTY_VIDEOCONTROL_FRAME_RATES_S

DEFINE_GUIDSTRUCT("C6E13344-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_DROPPEDFRAMES)

KSPROPERTY_DROPPEDFRAMES_CURRENT equ 0

KSPROPERTY_DROPPEDFRAMES_CURRENT_S STRUC
Property		KSPROPERTY <>
PictureNumber		LONGLONG ?
DropCount		LONGLONG ?
AverageFrameSize	ULONG ?
KSPROPERTY_DROPPEDFRAMES_CURRENT_S ENDS
PKSPROPERTY_DROPPEDFRAMES_CURRENT_S typedef ptr KSPROPERTY_DROPPEDFRAMES_CURRENT_S


DEFINE_GUIDSTRUCT("bc29a660-30e3-11d0-9e69-00c04fd7c15b", KSPROPSETID_VPConfig)
DEFINE_GUIDSTRUCT("ec529b00-1a1f-11d1-bad9-00609744111a", KSPROPSETID_VPVBIConfig)


KSPROPERTY_VPCONFIG_NUMCONNECTINFO equ 0
KSPROPERTY_VPCONFIG_GETCONNECTINFO equ 1
KSPROPERTY_VPCONFIG_SETCONNECTINFO equ 2
KSPROPERTY_VPCONFIG_VPDATAINFO equ 3
KSPROPERTY_VPCONFIG_MAXPIXELRATE equ 4
KSPROPERTY_VPCONFIG_INFORMVPINPUT equ 5
KSPROPERTY_VPCONFIG_NUMVIDEOFORMAT equ 6
KSPROPERTY_VPCONFIG_GETVIDEOFORMAT equ 7
KSPROPERTY_VPCONFIG_SETVIDEOFORMAT equ 8
KSPROPERTY_VPCONFIG_INVERTPOLARITY equ 9
KSPROPERTY_VPCONFIG_DECIMATIONCAPABILITY equ 10
KSPROPERTY_VPCONFIG_SCALEFACTOR equ 11
KSPROPERTY_VPCONFIG_DDRAWHANDLE equ 12
KSPROPERTY_VPCONFIG_VIDEOPORTID equ 13
KSPROPERTY_VPCONFIG_DDRAWSURFACEHANDLE equ 14
KSPROPERTY_VPCONFIG_SURFACEPARAMS equ 15

if (NTDDI_VERSION GE NTDDI_WINXP)
DEFINE_GUIDSTRUCT("b9f8ac3e-0f71-11d2-b72c-00c04fb6bd3d", CLSID_KsIBasicAudioInterfaceHandler)
endif

ifdef __IVPType__

KSVPMAXPIXELRATE	STRUC
Size			AMVPSIZE ?
MaxPixelsPerSecond	dd ?
Reserved		dd ?
KSVPMAXPIXELRATE	ENDS
PKSVPMAXPIXELRATE	typedef ptr KSVPMAXPIXELRATE

KSVPSIZE_PROP		STRUC
Property		KSPROPERTY <>
Size			AMVPSIZE ?
KSVPSIZE_PROP		ENDS
PKSVPSIZE_PROP		typedef ptr KSVPSIZE_PROP

KSVPSURFACEPARAMS	STRUC
dwPitch			dd ?
dwXOrigin		dd ?
dwYOrigin		dd ?
KSVPSURFACEPARAMS	ENDS
PKSVPSURFACEPARAMS	typedef ptr KSVPSURFACEPARAMS

else

ifndef __DDRAW_INCLUDED__

DDPF_FOURCC		equ 0x00000004

DDPIXELFORMAT		STRUC
dwSize			dd ?
dwFlags			dd ?
dwFourCC		dd ?
UNION
 dwRGBBitCount		dd ?
 dwYUVBitCount		dd ?
 dwZBufferBitDepth	dd ?
 dwAlphaBitDepth	dd ?
ENDS
UNION
 dwRBitMask		dd ?
 dwYBitMask		dd ?
ENDS
UNION
 dwGBitMask		dd ?
 dwUBitMask		dd ?
ENDS
UNION
 dwBBitMask		dd ?
 dwVBitMask		dd ?
ENDS
UNION
 dwRGBAlphaBitMask	dd ?
 dwYUVAlphaBitMask	dd ?
 dwRGBZBitMask		dd ?
 dwYUVZBitMask		dd ?
ENDS
DDPIXELFORMAT		ENDS
LPDDPIXELFORMAT		typedef ptr DDPIXELFORMAT

endif ;; !defined(__DDRAW_INCLUDED__)

ifndef __DVP_INCLUDED__

DDVIDEOPORTCONNECT	STRUC
dwSize			dd ?
dwPortWidth		dd ?
guidTypeID		GUID <>
dwFlags			dd ?
dwReserved1		ULONG_PTR ?
DDVIDEOPORTCONNECT	ENDS
LPDDVIDEOPORTCONNECT	typedef ptr DDVIDEOPORTCONNECT

DDVPTYPE_E_HREFH_VREFH	equ <0x54F39980,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8>
DDVPTYPE_E_HREFL_VREFL	equ <0xE09C77E0,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8>

endif

KS_AMPixAspectRatio	typedef SDWORD
KS_PixAspectRatio_NTSC4x3	equ 0
KS_PixAspectRatio_NTSC16x9	equ 1
KS_PixAspectRatio_PAL4x3	equ 2
KS_PixAspectRatio_PAL16x9	equ 3

KS_AMVP_SELECTFORMATBY	typedef SDWORD
KS_AMVP_DO_NOT_CARE	equ 0
KS_AMVP_BEST_BANDWIDTH	equ 1
KS_AMVP_INPUT_SAME_AS_OUTPUT equ 2

KS_AMVP_MODE		typedef SDWORD
KS_AMVP_MODE_WEAVE	equ 0
KS_AMVP_MODE_BOBINTERLEAVED	equ 1
KS_AMVP_MODE_BOBNONINTERLEAVED	equ 2
KS_AMVP_MODE_SKIPEVEN	equ 3
KS_AMVP_MODE_SKIPODD	equ 4

KS_AMVPDIMINFO		STRUC
dwFieldWidth		dd ?
dwFieldHeight		dd ?
dwVBIWidth		dd ?
dwVBIHeight		dd ?
rcValidRegion		RECT <>
KS_AMVPDIMINFO		ENDS
PKS_AMVPDIMINFO		typedef ptr KS_AMVPDIMINFO

KS_AMVPDATAINFO		STRUC
dwSize			dd ?
dwMicrosecondsPerField	dd ?
amvpDimInfo		KS_AMVPDIMINFO <>
dwPictAspectRatioX	dd ?
dwPictAspectRatioY	dd ?
bEnableDoubleClock	BOOL ?
bEnableVACT		BOOL ?
bDataIsInterlaced	BOOL ?
lHalfLinesOdd		LONG ?
bFieldPolarityInverted	BOOL ?
dwNumLinesInVREF	dd ?
lHalfLinesEven		LONG ?
dwReserved1		dd ?
KS_AMVPDATAINFO		ENDS
PKS_AMVPDATAINFO	typedef ptr KS_AMVPDATAINFO

KS_AMVPSIZE		STRUC
dwWidth			dd ?
dwHeight		dd ?
KS_AMVPSIZE		ENDS
PKS_AMVPSIZE		typedef ptr KS_AMVPSIZE


KSVPMAXPIXELRATE	STRUC
Size			KS_AMVPSIZE <>
MaxPixelsPerSecond	dd ?
Reserved		dd ?
KSVPMAXPIXELRATE	ENDS
PKSVPMAXPIXELRATE	typedef ptr KSVPMAXPIXELRATE

KSVPSIZE_PROP		STRUC
Property		KSPROPERTY <>
Size			KS_AMVPSIZE <>
KSVPSIZE_PROP		ENDS
PKSVPSIZE_PROP		typedef ptr KSVPSIZE_PROP

KSVPSURFACEPARAMS	STRUC
dwPitch			dd ?
dwXOrigin		dd ?
dwYOrigin		dd ?
KSVPSURFACEPARAMS	ENDS
PKSVPSURFACEPARAMS	typedef ptr KSVPSURFACEPARAMS

endif ;; __IVPType__

DEFINE_GUIDSTRUCT("20c5598e-d3c8-11d0-8dfc-00c04fd7c08b", KSEVENTSETID_VPNotify)

KSEVENT_VPNOTIFY_FORMATCHANGE equ 0

DEFINE_GUIDSTRUCT("DB47DE20-F628-11d1-BA41-00A0C90D2B05", KSEVENTSETID_VIDCAPTOSTI)

KSEVENT_VIDCAPTOSTI_EXT_TRIGGER equ 0
if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)
KSEVENT_VIDCAP_AUTO_UPDATE equ 1
KSEVENT_VIDCAP_SEARCH equ 2
endif

if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)

KSPROPERTY_EXTENSION_UNIT_INFO equ 0
KSPROPERTY_EXTENSION_UNIT_CONTROL equ 1
KSPROPERTY_EXTENSION_UNIT_PASS_THROUGH equ 0xffff

endif

DEFINE_GUIDSTRUCT("ec529b01-1a1f-11d1-bad9-00609744111a", KSEVENTSETID_VPVBINotify)

KSEVENT_VPVBINOTIFY_FORMATCHANGE equ 0

DEFINE_GUIDSTRUCT("670aea80-3a82-11d0-b79b-00aa003767a7", KSDATAFORMAT_TYPE_AUXLine21Data)
DEFINE_GUIDSTRUCT("6e8d4a22-310c-11d0-b79a-00aa003767a7", KSDATAFORMAT_SUBTYPE_Line21_BytePair)
DEFINE_GUIDSTRUCT("6e8d4a23-310c-11d0-b79a-00aa003767a7", KSDATAFORMAT_SUBTYPE_Line21_GOPPacket)

KSGOP_USERDATA		STRUC
sc			ULONG ?
reserved1		ULONG ?
cFields			db ?
l21Data			db 3 dup(?)
KSGOP_USERDATA		ENDS
PKSGOP_USERDATA		typedef ptr KSGOP_USERDATA

DEFINE_GUIDSTRUCT("ed0b916a-044d-11d1-aa78-00c04fc31d60", KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK)

KS_AM_UseNewCSSKey	equ 0x0001

DEFINE_GUIDSTRUCT("A503C5C0-1D1D-11D1-AD80-444553540000", KSPROPSETID_TSRateChange)

KS_AM_RATE_SimpleRateChange equ 1
KS_AM_RATE_ExactRateChange equ 2
KS_AM_RATE_MaxFullDataRate equ 3
KS_AM_RATE_Step		equ 4

KS_AM_SimpleRateChange	STRUC
StartTime		REFERENCE_TIME ?
Rate			LONG ?
KS_AM_SimpleRateChange	ENDS
PKS_AM_SimpleRateChange typedef ptr KS_AM_SimpleRateChange

KS_AM_ExactRateChange	STRUC
OutputZeroTime		REFERENCE_TIME ?
Rate			LONG ?
KS_AM_ExactRateChange	ENDS
PKS_AM_ExactRateChange	typedef ptr KS_AM_ExactRateChange

if (NTDDI_VERSION GE NTDDI_WINXPSP1)

DEFINE_GUIDSTRUCT("19689BF6-C384-48fd-AD51-90E58C79F70B", KSCATEGORY_ENCODER)
DEFINE_GUIDSTRUCT("7A5DE1D3-01A1-452c-B481-4FA2B96271E8", KSCATEGORY_MULTIPLEXER)

ifndef __ENCODER_API_GUIDS__
define __ENCODER_API_GUIDS__

DEFINE_GUIDSTRUCT("49CC4C43-CA83-4ad4-A9AF-F3696AF666DF", ENCAPIPARAM_BITRATE)
DEFINE_GUIDSTRUCT("703F16A9-3D48-44a1-B077-018DFF915D19", ENCAPIPARAM_PEAK_BITRATE)
DEFINE_GUIDSTRUCT("EE5FB25C-C713-40d1-9D58-C0D7241E250F", ENCAPIPARAM_BITRATE_MODE)

if ( (NTDDI_VERSION GE NTDDI_WINXPSP2) AND (NTDDI_VERSION LT NTDDI_WS03) ) OR (NTDDI_VERSION GE NTDDI_WS03SP1)
DEFINE_GUIDSTRUCT("62B12ACF-F6B0-47D9-9456-96F22C4E0B9D", CODECAPI_CHANGELISTS )
DEFINE_GUIDSTRUCT("7112E8E1-3D03-47EF-8E60-03F1CF537301", CODECAPI_VIDEO_ENCODER )
DEFINE_GUIDSTRUCT("B9D19A3E-F897-429C-BC46-8138B7272B2D", CODECAPI_AUDIO_ENCODER )
DEFINE_GUIDSTRUCT("6C5E6A7C-ACF8-4F55-A999-1A628109051B", CODECAPI_SETALLDEFAULTS )
DEFINE_GUIDSTRUCT("6A577E92-83E1-4113-ADC2-4FCEC32F83A1", CODECAPI_ALLSETTINGS )
DEFINE_GUIDSTRUCT("0581AF97-7693-4DBD-9DCA-3F9EBD6585A1", CODECAPI_SUPPORTSEVENTS )
DEFINE_GUIDSTRUCT("1CB14E83-7D72-4657-83FD-47A2C5B9D13D", CODECAPI_CURRENTCHANGELIST )
endif
endif ;; __ENCODER_API_GUIDS__

ifndef __ENCODER_API_DEFINES__
__ENCODER_API_DEFINES__ equ 1

ConstantBitRate		equ 0
VariableBitRateAverage	equ 1
VariableBitRatePeak	equ 2

endif

DEFINE_GUIDSTRUCT("4509F757-2D46-4637-8E62-CE7DB944F57B", KSPROPSETID_Jack)

KSPROPERTY_JACK_DESCRIPTION equ 1
KSPROPERTY_JACK_DESCRIPTION2 equ 2
KSPROPERTY_JACK_SINK_INFO equ 3

eConnTypeUnknown	equ 0
eConnType3Point5mm	equ 1
eConnTypeQuarter	equ 2
eConnTypeAtapiInternal	equ 3
eConnTypeRCA		equ 4
eConnTypeOptical	equ 5
eConnTypeOtherDigital	equ 6
eConnTypeOtherAnalog	equ 7
eConnTypeMultichannelAnalogDIN equ 8
eConnTypeXlrProfessional equ 9
eConnTypeRJ11Modem	equ 10
eConnTypeCombination	equ 11

eGeoLocRear		equ 0x1
eGeoLocFront		equ 1
eGeoLocLeft		equ 2
eGeoLocRight		equ 3
eGeoLocTop		equ 4
eGeoLocBottom		equ 5
eGeoLocRearPanel	equ 6
eGeoLocRiser		equ 7
eGeoLocInsideMobileLid	equ 8
eGeoLocDrivebay		equ 9
eGeoLocHDMI		equ 10
eGeoLocOutsideMobileLid equ 11
eGeoLocATAPI		equ 12
eGeoLocReserved5	equ 13
eGeoLocReserved6	equ 14
EPcxGeoLocation_enum_count equ 15
EPcxGeoLocation		typedef SDWORD

eGenLocPrimaryBox	equ 0
eGenLocInternal		equ 1
eGenLocSeparate		equ 2
eGenLocOther		equ 3
EPcxGenLocation_enum_count equ 4
EPcxGenLocation		typedef SDWORD

ePortConnJack		equ 0
ePortConnIntegratedDevice equ 1
ePortConnBothIntegratedAndJack equ 2
ePortConnUnknown	equ 3
EPcxConnectionType	typedef SDWORD
EPxcPortConnection	typedef SDWORD

KSJACK_DESCRIPTION	STRUC
ChannelMapping		dd ?
Color			COLORREF ?
ConnectionType		EPcxConnectionType ?
GeoLocation		EPcxGeoLocation ?
GenLocation		EPcxGenLocation ?
PortConnection		EPxcPortConnection ?
IsConnected		BOOL ?
KSJACK_DESCRIPTION	ENDS
PKSJACK_DESCRIPTION	typedef ptr KSJACK_DESCRIPTION

KSJACK_SINK_CONNECTIONTYPE_HDMI equ 0
KSJACK_SINK_CONNECTIONTYPE_DISPLAYPORT equ 1
KSJACK_SINK_CONNECTIONTYPE typedef SDWORD

MAX_SINK_DESCRIPTION_NAME_LENGTH equ 32
KSJACK_SINK_INFORMATION STRUC
ConnType		KSJACK_SINK_CONNECTIONTYPE ?
ManufacturerId		dw ?
ProductId		dw ?
AudioLatency		dw ?
HDCPCapable		BOOL ?
AICapable		BOOL ?
SinkDescriptionLength	UCHAR ?
SinkDescription		WCHAR MAX_SINK_DESCRIPTION_NAME_LENGTH dup(?)
PortId			LUID <>
KSJACK_SINK_INFORMATION ENDS
PKSJACK_SINK_INFORMATION typedef ptr KSJACK_SINK_INFORMATION

JACKDESC2_PRESENCE_DETECT_CAPABILITY equ 0x00000001
JACKDESC2_DYNAMIC_FORMAT_CHANGE_CAPABILITY equ 0x00000002

KSJACK_DESCRIPTION2	STRUC
DeviceStateInfo		dd ?
JackCapabilities	dd ?
KSJACK_DESCRIPTION2	ENDS
PKSJACK_DESCRIPTION2	typedef ptr KSJACK_DESCRIPTION2

endif ;; (NTDDI_VERSION GE NTDDI_WINXPSP1)

DEFINE_GUIDSTRUCT("4E73C07F-23CC-4955-A7EA-3DA502496290", KSPROPSETID_AudioBufferDuration)

KSPROPERTY_AUDIO_BUFFER_DURATION equ 1

endif
