' ########################################################################################
' Microsoft Windows
' File: mfobjects.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_mfobjects_PBI)
#DEFINE PBX_mfobjects_PBI
%EQUATE `MFOBJECTS_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/Unknwn.inc"
#INCLUDE ONCE "Legacy/System/propsys.inc"
#INCLUDE ONCE "Legacy/Media/mediaobj.inc"
'typedef ULONGLONG QWORD;
#INCLUDE ONCE "Legacy/System/MMReg.inc"
' enum MF_ATTRIBUTE_TYPE
%EQUATE `MF_ATTRIBUTE_UINT32 = %VT_UI4
%EQUATE `MF_ATTRIBUTE_UINT64 = %VT_UI8
%EQUATE `MF_ATTRIBUTE_DOUBLE = %VT_R8
%EQUATE `MF_ATTRIBUTE_GUID = %VT_CLSID
%EQUATE `MF_ATTRIBUTE_STRING = %VT_LPWSTR
%EQUATE `MF_ATTRIBUTE_BLOB = %VT_VECTOR OR %VT_UI1
%EQUATE `MF_ATTRIBUTE_IUNKNOWN = %VT_UNKNOWN
' enum MF_ATTRIBUTES_MATCH_TYPE
%EQUATE `MF_ATTRIBUTES_MATCH_OUR_ITEMS = 0
%EQUATE `MF_ATTRIBUTES_MATCH_THEIR_ITEMS = 1
%EQUATE `MF_ATTRIBUTES_MATCH_ALL_ITEMS = 2
%EQUATE `MF_ATTRIBUTES_MATCH_INTERSECTION = 3
%EQUATE `MF_ATTRIBUTES_MATCH_SMALLER = 4
' ########################################################################################
' Interface name = IMFAttributes
' IID = 2CD2D921-C447-44A7-A13C-4ADABFC247E3
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFAttributes_INTERFACE_DEFINED)
 %IMFAttributes_INTERFACE_DEFINED = 1
$IID_IMFAttributes = GUID$("{2CD2D921-C447-44A7-A13C-4ADABFC247E3}")
INTERFACE IMFAttributes $IID_IMFAttributes
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFAttributes_INTERFACE_DEFINED__ */
' enum MF_ATTRIBUTE_SERIALIZE_OPTIONS
%EQUATE `MF_ATTRIBUTE_SERIALIZE_UNKNOWN_BYREF = &H1
DECLARE FUNCTION MFSerializeAttributesToStream LIB "mfplat.dll" ALIAS "MFSerializeAttributesToStream" ( BYVAL pAttr AS IMFAttributes , BYVAL dwOptions AS QUAD , BYVAL pStm AS IStream ) AS LONG
DECLARE FUNCTION MFDeserializeAttributesFromStream LIB "mfplat.dll" ALIAS "MFDeserializeAttributesFromStream" ( BYVAL pAttr AS IMFAttributes
 , BYVAL dwOptions AS DWORD
 , BYVAL pStm AS IStream
 ) AS LONG
' ########################################################################################
' Interface name = IMFMediaBuffer
' IID = 045FA593-8799-42B8-BC8D-8968C6453507
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFMediaBuffer_INTERFACE_DEFINED)
 %IMFMediaBuffer_INTERFACE_DEFINED = 1
$IID_IMFMediaBuffer = GUID$("{045FA593-8799-42B8-BC8D-8968C6453507}")
INTERFACE IMFMediaBuffer $IID_IMFMediaBuffer
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Lock ( ' VTable offset = 12
 BYREF ppbBuffer AS DWORD
 , BYREF pcbMaxLength AS DWORD
 , BYREF pcbCurrentLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Unlock ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD GetCurrentLength ( ' VTable offset = 20
 BYREF pcbCurrentLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetCurrentLength ( ' VTable offset = 24
 BYVAL cbCurrentLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetMaxLength ( ' VTable offset = 28
 BYREF pcbMaxLength AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaBuffer_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFSample
' IID = C40A00F2-B93A-4D80-AE8C-5A1C634F58E4
' Inherited interface = IMFAttributes
' ########################################################################################
#IF NOT %DEF(%IMFSample_INTERFACE_DEFINED)
 %IMFSample_INTERFACE_DEFINED = 1
$IID_IMFSample = GUID$("{C40A00F2-B93A-4D80-AE8C-5A1C634F58E4}")
INTERFACE IMFSample $IID_IMFSample
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFAttributes methods
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFSample methods
 ' =====================================================================================
 METHOD GetSampleFlags ( ' VTable offset = 132
 BYREF pdwSampleFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSampleFlags ( ' VTable offset = 136
 BYVAL dwSampleFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSampleTime ( ' VTable offset = 140
 BYREF phnsSampleTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSampleTime ( ' VTable offset = 144
 BYVAL hnsSampleTime AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSampleDuration ( ' VTable offset = 148
 BYREF phnsSampleDuration AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSampleDuration ( ' VTable offset = 152
 BYVAL hnsSampleDuration AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBufferCount ( ' VTable offset = 156
 BYREF pdwBufferCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBufferByIndex ( ' VTable offset = 160
 BYVAL dwIndex AS DWORD
 , BYREF ppBuffer AS IMFMediaBuffer
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertToContiguousBuffer ( ' VTable offset = 164
 BYREF ppBuffer AS IMFMediaBuffer
 ) AS LONG
 ' =====================================================================================
 METHOD AddBuffer ( ' VTable offset = 168
 BYVAL pBuffer AS IMFMediaBuffer
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveBufferByIndex ( ' VTable offset = 172
 BYVAL dwIndex AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveAllBuffers ( ' VTable offset = 176
 ) AS LONG
 ' =====================================================================================
 METHOD GetTotalLength ( ' VTable offset = 180
 BYREF pcbTotalLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CopyToBuffer ( ' VTable offset = 184
 BYVAL pBuffer AS IMFMediaBuffer
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFSample_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMF2DBuffer
' IID = 7DC9D5F9-9ED9-44EC-9BBF-0600BB589FBB
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMF2DBuffer_INTERFACE_DEFINED)
 %IMF2DBuffer_INTERFACE_DEFINED = 1
$IID_IMF2DBuffer = GUID$("{7DC9D5F9-9ED9-44EC-9BBF-0600BB589FBB}")
INTERFACE IMF2DBuffer $IID_IMF2DBuffer
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Lock2D ( ' VTable offset = 12
 BYREF pbScanline0 AS DWORD
 , BYREF plPitch AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Unlock2D ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD GetScanline0AndPitch ( ' VTable offset = 20
 BYREF pbScanline0 AS DWORD
 , BYREF plPitch AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsContiguousFormat ( ' VTable offset = 24
 BYREF pfIsContiguous AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetContiguousLength ( ' VTable offset = 28
 BYREF pcbLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ContiguousCopyTo ( ' VTable offset = 32
 BYVAL pbDestBuffer AS DWORD
 , BYVAL cbDestBuffer AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ContiguousCopyFrom ( ' VTable offset = 36
 BYVAL pbSrcBuffer AS DWORD
 , BYVAL cbSrcBuffer AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMF2DBuffer_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFMediaType
' IID = 44AE0FA8-EA31-4109-8D2E-4CAE4997C555
' Inherited interface = IMFAttributes
' ########################################################################################
#IF NOT %DEF(%IMFMediaType_INTERFACE_DEFINED)
 %IMFMediaType_INTERFACE_DEFINED = 1
$IID_IMFMediaType = GUID$("{44AE0FA8-EA31-4109-8D2E-4CAE4997C555}")
INTERFACE IMFMediaType $IID_IMFMediaType
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFAttributes methods
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFMediaType methods
 ' =====================================================================================
 METHOD GetMajorType ( ' VTable offset = 132
 BYREF pguidMajorType AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD IsCompressedFormat ( ' VTable offset = 136
 BYREF pfCompressed AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsEqual ( ' VTable offset = 140
 BYVAL pIMediaType AS IMFMediaType
 , BYREF pdwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRepresentation ( ' VTable offset = 144
 BYREF guidRepresentation AS GUID
 , BYREF ppvRepresentation AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FreeRepresentation ( ' VTable offset = 148
 BYREF guidRepresentation AS GUID
 , BYVAL pvRepresentation AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaType_INTERFACE_DEFINED__ */
%EQUATE `MF_MEDIATYPE_EQUAL_MAJOR_TYPES = &H00000001
%EQUATE `MF_MEDIATYPE_EQUAL_FORMAT_TYPES = &H00000002
%EQUATE `MF_MEDIATYPE_EQUAL_FORMAT_DATA = &H00000004
%EQUATE `MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA = &H00000008
' ########################################################################################
' Interface name = IMFAudioMediaType
' IID = 26A0ADC3-CE26-4672-9304-69552EDD3FAF
' Inherited interface = IMFMediaType
' ########################################################################################
#IF NOT %DEF(%IMFAudioMediaType_INTERFACE_DEFINED)
 %IMFAudioMediaType_INTERFACE_DEFINED = 1
$IID_IMFAudioMediaType = GUID$("{26A0ADC3-CE26-4672-9304-69552EDD3FAF}")
INTERFACE IMFAudioMediaType $IID_IMFAudioMediaType
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFAttributes methods
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFMediaType methods
 ' =====================================================================================
 METHOD GetMajorType ( ' VTable offset = 132
 BYREF pguidMajorType AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD IsCompressedFormat ( ' VTable offset = 136
 BYREF pfCompressed AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsEqual ( ' VTable offset = 140
 BYVAL pIMediaType AS IMFMediaType
 , BYREF pdwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRepresentation ( ' VTable offset = 144
 BYREF guidRepresentation AS GUID
 , BYREF ppvRepresentation AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FreeRepresentation ( ' VTable offset = 148
 BYREF guidRepresentation AS GUID
 , BYVAL pvRepresentation AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFAudioMediaType method
 ' =====================================================================================
 METHOD GetAudioFormat ( ' VTable offset = 152
 ) AS WAVEFORMATEX ' WAVEFORMATEX *
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFAudioMediaType_INTERFACE_DEFINED__ */
#IF NOT %DEF(%WINGDI_INC)
' // Size = 40 bytes
TYPE BITMAPINFOHEADER DWORD FILL
 biSize AS DWORD
 biWidth AS LONG
 biHeight AS LONG
 biPlanes AS WORD
 biBitCount AS WORD
 biCompression AS DWORD
 biSizeImage AS DWORD
 biXPelsPerMeter AS LONG
 biYPelsPerMeter AS LONG
 biClrUsed AS DWORD
 biClrImportant AS DWORD
END TYPE
' // Size = 44 bytes
TYPE BITMAPINFO DWORD
 bmiHeader AS BITMAPINFOHEADER
 bmiColors (0) AS RGBQUAD ' RGBQUAD
END TYPE
#ENDIF
' // Size = 32 bytes
#IF NOT %DEF(%MFT_REGISTER_TYPE_INFO_DEFINED)
%EQUATE `MFT_REGISTER_TYPE_INFO_DEFINED = 1
TYPE MFT_REGISTER_TYPE_INFO DWORD
 guidMajorType AS GUID
 guidSubtype AS GUID
END TYPE
#ENDIF
#IF NOT %DEF(%MFVIDEOFORMAT)
 %MFVIDEOFORMAT = 1
' enum MFVideoInterlaceMode
%EQUATE `MFVideoInterlace_Unknown = 0
%EQUATE `MFVideoInterlace_Progressive = 2
%EQUATE `MFVideoInterlace_FieldInterleavedUpperFirst = 3
%EQUATE `MFVideoInterlace_FieldInterleavedLowerFirst = 4
%EQUATE `MFVideoInterlace_FieldSingleUpper = 5
%EQUATE `MFVideoInterlace_FieldSingleLower = 6
%EQUATE `MFVideoInterlace_MixedInterlaceOrProgressive = 7
%EQUATE `MFVideoInterlace_Last = %MFVideoInterlace_MixedInterlaceOrProgressive + 1
%EQUATE `MFVideoInterlace_ForceDWORD = &H7fffffff
%EQUATE `MFVideoInterlace_FieldSingleUpperFirst = %MFVideoInterlace_FieldSingleUpper
%EQUATE `MFVideoInterlace_FieldSingleLowerFirst = %MFVideoInterlace_FieldSingleLower
' enum MFVideoTransferFunction
%EQUATE `MFVideoTransFunc_Unknown = 0
%EQUATE `MFVideoTransFunc_10 = 1
%EQUATE `MFVideoTransFunc_18 = 2
%EQUATE `MFVideoTransFunc_20 = 3
%EQUATE `MFVideoTransFunc_22 = 4
%EQUATE `MFVideoTransFunc_709 = 5
%EQUATE `MFVideoTransFunc_240M = 6
%EQUATE `MFVideoTransFunc_sRGB = 7
%EQUATE `MFVideoTransFunc_28 = 8
%EQUATE `MFVideoTransFunc_Log_100 = 9
%EQUATE `MFVideoTransFunc_Log_316 = 10
%EQUATE `MFVideoTransFunc_709_sym = 11
%EQUATE `MFVideoTransFunc_Last = %MFVideoTransFunc_709_sym + 1
%EQUATE `MFVideoTransFunc_ForceDWORD = &H7fffffff
' enum MFVideoPrimaries
%EQUATE `MFVideoPrimaries_Unknown = 0
%EQUATE `MFVideoPrimaries_reserved = 1
%EQUATE `MFVideoPrimaries_BT709 = 2
%EQUATE `MFVideoPrimaries_BT470_2_SysM = 3
%EQUATE `MFVideoPrimaries_BT470_2_SysBG = 4
%EQUATE `MFVideoPrimaries_SMPTE170M = 5
%EQUATE `MFVideoPrimaries_SMPTE240M = 6
%EQUATE `MFVideoPrimaries_EBU3213 = 7
%EQUATE `MFVideoPrimaries_SMPTE_C = 8
%EQUATE `MFVideoPrimaries_Last = %MFVideoPrimaries_SMPTE_C + 1
%EQUATE `MFVideoPrimaries_ForceDWORD = &H7fffffff
' enum MFVideoLighting
%EQUATE `MFVideoLighting_Unknown = 0
%EQUATE `MFVideoLighting_bright = 1
%EQUATE `MFVideoLighting_office = 2
%EQUATE `MFVideoLighting_dim = 3
%EQUATE `MFVideoLighting_dark = 4
%EQUATE `MFVideoLighting_Last = %MFVideoLighting_dark + 1
%EQUATE `MFVideoLighting_ForceDWORD = &H7fffffff
' enum MFVideoTransferMatrix
%EQUATE `MFVideoTransferMatrix_Unknown = 0
%EQUATE `MFVideoTransferMatrix_BT709 = 1
%EQUATE `MFVideoTransferMatrix_BT601 = 2
%EQUATE `MFVideoTransferMatrix_SMPTE240M = 3
%EQUATE `MFVideoTransferMatrix_Last = %MFVideoTransferMatrix_SMPTE240M + 1
%EQUATE `MFVideoTransferMatrix_ForceDWORD = &H7fffffff
' enum MFVideoChromaSubsampling
%EQUATE `MFVideoChromaSubsampling_Unknown = 0
%EQUATE `MFVideoChromaSubsampling_ProgressiveChroma = &H8
%EQUATE `MFVideoChromaSubsampling_Horizontally_Cosited = &H4
%EQUATE `MFVideoChromaSubsampling_Vertically_Cosited = &H2
%EQUATE `MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes = &H1
%EQUATE `MFVideoChromaSubsampling_MPEG2 = %MFVideoChromaSubsampling_Horizontally_Cosited OR %MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes
%EQUATE `MFVideoChromaSubsampling_MPEG1 = %MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes
%EQUATE `MFVideoChromaSubsampling_DV_PAL = %MFVideoChromaSubsampling_Horizontally_Cosited OR %MFVideoChromaSubsampling_Vertically_Cosited
%EQUATE `MFVideoChromaSubsampling_Cosited = (%MFVideoChromaSubsampling_Horizontally_Cosited OR %MFVideoChromaSubsampling_Vertically_Cosited) OR %MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes
%EQUATE `MFVideoChromaSubsampling_Last = %MFVideoChromaSubsampling_Cosited + 1
%EQUATE `MFVideoChromaSubsampling_ForceDWORD = &H7fffffff
' enum MFNominalRange
%EQUATE `MFNominalRange_Unknown = 0
%EQUATE `MFNominalRange_Normal = 1
%EQUATE `MFNominalRange_Wide = 2
%EQUATE `MFNominalRange_0_255 = 1
%EQUATE `MFNominalRange_16_235 = 2
%EQUATE `MFNominalRange_48_208 = 3
%EQUATE `MFNominalRange_64_127 = 4
%EQUATE `MFNominalRange_Last = %MFNominalRange_64_127 + 1
%EQUATE `MFNominalRange_ForceDWORD = &H7fffffff
' enum MFVideoFlags
%EQUATE `MFVideoFlag_PAD_TO_Mask = &H1 OR &H2
%EQUATE `MFVideoFlag_PAD_TO_None = 0 * &H1
%EQUATE `MFVideoFlag_PAD_TO_4x3 = 1 * &H1
%EQUATE `MFVideoFlag_PAD_TO_16x9 = 2 * &H1
%EQUATE `MFVideoFlag_SrcContentHintMask = (&H4 OR &H8) OR &H10
%EQUATE `MFVideoFlag_SrcContentHintNone = 0 * &H4
%EQUATE `MFVideoFlag_SrcContentHint16x9 = 1 * &H4
%EQUATE `MFVideoFlag_SrcContentHint235_1 = 2 * &H4
%EQUATE `MFVideoFlag_AnalogProtected = &H20
%EQUATE `MFVideoFlag_DigitallyProtected = &H40
%EQUATE `MFVideoFlag_ProgressiveContent = &H80
%EQUATE `MFVideoFlag_FieldRepeatCountMask = (&H100 OR &H200) OR &H400
%EQUATE `MFVideoFlag_FieldRepeatCountShift = 8
%EQUATE `MFVideoFlag_ProgressiveSeqReset = &H800
%EQUATE `MFVideoFlag_PanScanEnabled = &H20000
%EQUATE `MFVideoFlag_LowerFieldFirst = &H40000
%EQUATE `MFVideoFlag_BottomUpLinearRep = &H80000
%EQUATE `MFVideoFlags_DXVASurface = &H100000
%EQUATE `MFVideoFlags_RenderTargetSurface = &H400000
%EQUATE `MFVideoFlags_ForceQWORD = &H7fffffff
' // Size = 8 bytes
TYPE MFRatio DWORD
 Numerator AS DWORD
 Denominator AS DWORD
END TYPE
' // Size = 4 bytes
TYPE MFOffset WORD
 fract AS WORD ' WORD
 value AS INTEGER ' short
END TYPE
' // Size = 16 bytes
TYPE MFVideoArea DWORD
 OffsetX AS MFOffset
 OffsetY AS MFOffset
 Area AS SIZE ' SIZE
END TYPE
' // Size = 112 bytes
TYPE MFVideoInfo QWORD FILL
 dwWidth AS DWORD
 dwHeight AS DWORD
 PixelAspectRatio AS MFRatio
 SourceChromaSubsampling AS DWORD ' MFVideoChromaSubsampling enum
 InterlaceMode AS DWORD ' MFVideoInterlaceMode enum
 TransferFunction AS DWORD ' MFVideoTransferFunction enum
 ColorPrimaries AS DWORD ' MFVideoPrimaries enum
 TransferMatrix AS DWORD ' MFVideoTransferMatrix enum
 SourceLighting AS DWORD ' MFVideoLighting enum
 FramesPerSecond AS MFRatio
 NominalRange AS DWORD ' MFNominalRange enum
 GeometricAperture AS MFVideoArea
 MinimumDisplayAperture AS MFVideoArea
 PanScanAperture AS MFVideoArea
 VideoFlags AS QUAD ' unsigned __int64
END TYPE
' // Size = 4 bytes
TYPE MFAYUVSample BYTE
 bCrValue AS BYTE ' BYTE
 bCbValue AS BYTE ' BYTE
 bYValue AS BYTE ' BYTE
 bSampleAlpha8 AS BYTE ' BYTE
END TYPE
' // Size = 4 bytes
TYPE MFARGB BYTE
 rgbBlue AS BYTE ' BYTE
 rgbGreen AS BYTE ' BYTE
 rgbRed AS BYTE ' BYTE
 rgbAlpha AS BYTE ' BYTE
END TYPE
' // Size = 4 bytes
UNION MFPaletteEntry
 ARGB AS MFARGB
 AYCbCr AS MFAYUVSample
END UNION
' // Size = 12 bytes
TYPE MFVideoSurfaceInfo DWORD
 Format AS DWORD
 PaletteEntries AS DWORD
 Palette(0) AS MFPaletteEntry
END TYPE
' // Size = 24 bytes
TYPE MFVideoCompressedInfo QWORD
 AvgBitrate AS QUAD ' LONGLONG
 AvgBitErrorRate AS QUAD ' LONGLONG
 MaxKeyFrameSpacing AS DWORD
END TYPE
' // Size = 176 bytes
TYPE MFVIDEOFORMAT QWORD
 dwSize AS DWORD
 videoInfo AS MFVideoInfo
 guidFormat AS GUID
 compressedInfo AS MFVideoCompressedInfo
 surfaceInfo AS MFVideoSurfaceInfo
END TYPE
' enum MFStandardVideoFormat
%EQUATE `MFStdVideoFormat_reserved = 0
%EQUATE `MFStdVideoFormat_NTSC = %MFStdVideoFormat_reserved + 1
%EQUATE `MFStdVideoFormat_PAL = %MFStdVideoFormat_NTSC + 1
%EQUATE `MFStdVideoFormat_DVD_NTSC = %MFStdVideoFormat_PAL + 1
%EQUATE `MFStdVideoFormat_DVD_PAL = %MFStdVideoFormat_DVD_NTSC + 1
%EQUATE `MFStdVideoFormat_DV_PAL = %MFStdVideoFormat_DVD_PAL + 1
%EQUATE `MFStdVideoFormat_DV_NTSC = %MFStdVideoFormat_DV_PAL + 1
%EQUATE `MFStdVideoFormat_ATSC_SD480i = %MFStdVideoFormat_DV_NTSC + 1
%EQUATE `MFStdVideoFormat_ATSC_HD1080i = %MFStdVideoFormat_ATSC_SD480i + 1
%EQUATE `MFStdVideoFormat_ATSC_HD720p = %MFStdVideoFormat_ATSC_HD1080i + 1
#ENDIF
' ########################################################################################
' Interface name = IMFVideoMediaType
' IID = B99F381F-A8F9-47A2-A5AF-CA3A225A3890
' Inherited interface = IMFMediaType
' ########################################################################################
#IF NOT %DEF(%IMFVideoMediaType_INTERFACE_DEFINED)
 %IMFVideoMediaType_INTERFACE_DEFINED = 1
$IID_IMFVideoMediaType = GUID$("{B99F381F-A8F9-47A2-A5AF-CA3A225A3890}")
INTERFACE IMFVideoMediaType $IID_IMFVideoMediaType
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFAttributes methods
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFMediaType methods
 ' =====================================================================================
 METHOD GetMajorType ( ' VTable offset = 132
 BYREF pguidMajorType AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD IsCompressedFormat ( ' VTable offset = 136
 BYREF pfCompressed AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsEqual ( ' VTable offset = 140
 BYVAL pIMediaType AS IMFMediaType
 , BYREF pdwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRepresentation ( ' VTable offset = 144
 BYREF guidRepresentation AS GUID
 , BYREF ppvRepresentation AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FreeRepresentation ( ' VTable offset = 148
 BYREF guidRepresentation AS GUID
 , BYVAL pvRepresentation AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFVideoMediaType methods
 ' =====================================================================================
 METHOD GetVideoFormat ( ' VTable offset = 152
 ) AS MFVIDEOFORMAT ' MFVIDEOFORMAT *
 ' =====================================================================================
 METHOD GetVideoRepresentation ( ' VTable offset = 156
 BYVAL guidRepresentation AS GUID
 , BYREF ppvRepresentation AS DWORD
 , BYVAL lStride AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFVideoMediaType_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFAsyncResult
' IID = AC6B7889-0740-4D51-8619-905994A55CC6
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFAsyncResult_INTERFACE_DEFINED)
 %IMFAsyncResult_INTERFACE_DEFINED = 1
$IID_IMFAsyncResult = GUID$("{AC6B7889-0740-4D51-8619-905994A55CC6}")
INTERFACE IMFAsyncResult $IID_IMFAsyncResult
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetState ( ' VTable offset = 12
 BYREF ppunkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD GetStatus ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD SetStatus ( ' VTable offset = 20
 BYVAL hrStatus AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetObject ( ' VTable offset = 24
 BYREF ppObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD GetStateNoAddRef ( ' VTable offset = 28
 ) AS IUnknown ' IUnknown
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFAsyncResult_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFAsyncCallback
' IID = A27003CF-2354-4F2A-8D6A-AB7CFF15437E
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFAsyncCallback_INTERFACE_DEFINED)
 %IMFAsyncCallback_INTERFACE_DEFINED = 1
$IID_IMFAsyncCallback = GUID$("{A27003CF-2354-4F2A-8D6A-AB7CFF15437E}")
INTERFACE IMFAsyncCallback $IID_IMFAsyncCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetParameters ( ' VTable offset = 12
 BYREF pdwFlags AS DWORD
 , BYREF pdwQueue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Invoke ( ' VTable offset = 16
 BYVAL pAsyncResult AS IMFAsyncResult
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFAsyncCallback_INTERFACE_DEFINED__ */
%EQUATE `MFASYNC_FAST_IO_PROCESSING_CALLBACK = &H00000001
%EQUATE `MFASYNC_SIGNAL_CALLBACK = &H00000002
%EQUATE `MFASYNC_CALLBACK_QUEUE_UNDEFINED = &H00000000
%EQUATE `MFASYNC_CALLBACK_QUEUE_STANDARD = &H00000001
%EQUATE `MFASYNC_CALLBACK_QUEUE_RT = &H00000002
%EQUATE `MFASYNC_CALLBACK_QUEUE_IO = &H00000003
%EQUATE `MFASYNC_CALLBACK_QUEUE_TIMER = &H00000004
%EQUATE `MFASYNC_CALLBACK_QUEUE_LONG_FUNCTION = &H00000007
%EQUATE `MFASYNC_CALLBACK_QUEUE_PRIVATE_MASK = &HFFFF0000
%EQUATE `MFASYNC_CALLBACK_QUEUE_ALL = &HFFFFFFFF
' enum __MIDL___MIDL_itf_mfobjects_0000_0009_0001
%EQUATE `MEUnknown = 0
%EQUATE `MEError = 1
%EQUATE `MEExtendedType = 2
%EQUATE `MENonFatalError = 3
%EQUATE `MEGenericV1Anchor = %MENonFatalError
%EQUATE `MESessionUnknown = 100
%EQUATE `MESessionTopologySet = 101
%EQUATE `MESessionTopologiesCleared = 102
%EQUATE `MESessionStarted = 103
%EQUATE `MESessionPaused = 104
%EQUATE `MESessionStopped = 105
%EQUATE `MESessionClosed = 106
%EQUATE `MESessionEnded = 107
%EQUATE `MESessionRateChanged = 108
%EQUATE `MESessionScrubSampleComplete = 109
%EQUATE `MESessionCapabilitiesChanged = 110
%EQUATE `MESessionTopologyStatus = 111
%EQUATE `MESessionNotifyPresentationTime = 112
%EQUATE `MENewPresentation = 113
%EQUATE `MELicenseAcquisitionStart = 114
%EQUATE `MELicenseAcquisitionCompleted = 115
%EQUATE `MEIndividualizationStart = 116
%EQUATE `MEIndividualizationCompleted = 117
%EQUATE `MEEnablerProgress = 118
%EQUATE `MEEnablerCompleted = 119
%EQUATE `MEPolicyError = 120
%EQUATE `MEPolicyReport = 121
%EQUATE `MEBufferingStarted = 122
%EQUATE `MEBufferingStopped = 123
%EQUATE `MEConnectStart = 124
%EQUATE `MEConnectEnd = 125
%EQUATE `MEReconnectStart = 126
%EQUATE `MEReconnectEnd = 127
%EQUATE `MERendererEvent = 128
%EQUATE `MESessionStreamSinkFormatChanged = 129
%EQUATE `MESessionV1Anchor = %MESessionStreamSinkFormatChanged
%EQUATE `MESourceUnknown = 200
%EQUATE `MESourceStarted = 201
%EQUATE `MEStreamStarted = 202
%EQUATE `MESourceSeeked = 203
%EQUATE `MEStreamSeeked = 204
%EQUATE `MENewStream = 205
%EQUATE `MEUpdatedStream = 206
%EQUATE `MESourceStopped = 207
%EQUATE `MEStreamStopped = 208
%EQUATE `MESourcePaused = 209
%EQUATE `MEStreamPaused = 210
%EQUATE `MEEndOfPresentation = 211
%EQUATE `MEEndOfStream = 212
%EQUATE `MEMediaSample = 213
%EQUATE `MEStreamTick = 214
%EQUATE `MEStreamThinMode = 215
%EQUATE `MEStreamFormatChanged = 216
%EQUATE `MESourceRateChanged = 217
%EQUATE `MEEndOfPresentationSegment = 218
%EQUATE `MESourceCharacteristicsChanged = 219
%EQUATE `MESourceRateChangeRequested = 220
%EQUATE `MESourceMetadataChanged = 221
%EQUATE `MESequencerSourceTopologyUpdated = 222
%EQUATE `MESourceV1Anchor = %MESequencerSourceTopologyUpdated
%EQUATE `MESinkUnknown = 300
%EQUATE `MEStreamSinkStarted = 301
%EQUATE `MEStreamSinkStopped = 302
%EQUATE `MEStreamSinkPaused = 303
%EQUATE `MEStreamSinkRateChanged = 304
%EQUATE `MEStreamSinkRequestSample = 305
%EQUATE `MEStreamSinkMarker = 306
%EQUATE `MEStreamSinkPrerolled = 307
%EQUATE `MEStreamSinkScrubSampleComplete = 308
%EQUATE `MEStreamSinkFormatChanged = 309
%EQUATE `MEStreamSinkDeviceChanged = 310
%EQUATE `MEQualityNotify = 311
%EQUATE `MESinkInvalidated = 312
%EQUATE `MEAudioSessionNameChanged = 313
%EQUATE `MEAudioSessionVolumeChanged = 314
%EQUATE `MEAudioSessionDeviceRemoved = 315
%EQUATE `MEAudioSessionServerShutdown = 316
%EQUATE `MEAudioSessionGroupingParamChanged = 317
%EQUATE `MEAudioSessionIconChanged = 318
%EQUATE `MEAudioSessionFormatChanged = 319
%EQUATE `MEAudioSessionDisconnected = 320
%EQUATE `MEAudioSessionExclusiveModeOverride = 321
%EQUATE `MESinkV1Anchor = %MEAudioSessionExclusiveModeOverride
%EQUATE `METrustUnknown = 400
%EQUATE `MEPolicyChanged = 401
%EQUATE `MEContentProtectionMessage = 402
%EQUATE `MEPolicySet = 403
%EQUATE `METrustV1Anchor = %MEPolicySet
%EQUATE `MEWMDRMLicenseBackupCompleted = 500
%EQUATE `MEWMDRMLicenseBackupProgress = 501
%EQUATE `MEWMDRMLicenseRestoreCompleted = 502
%EQUATE `MEWMDRMLicenseRestoreProgress = 503
%EQUATE `MEWMDRMLicenseAcquisitionCompleted = 506
%EQUATE `MEWMDRMIndividualizationCompleted = 508
%EQUATE `MEWMDRMIndividualizationProgress = 513
%EQUATE `MEWMDRMProximityCompleted = 514
%EQUATE `MEWMDRMLicenseStoreCleaned = 515
%EQUATE `MEWMDRMRevocationDownloadCompleted = 516
%EQUATE `MEWMDRMV1Anchor = %MEWMDRMRevocationDownloadCompleted
%EQUATE `METransformUnknown = 600
%EQUATE `METransformNeedInput = %METransformUnknown + 1
%EQUATE `METransformHaveOutput = %METransformNeedInput + 1
%EQUATE `METransformDrainComplete = %METransformHaveOutput + 1
%EQUATE `METransformMarker = %METransformDrainComplete + 1
%EQUATE `MEReservedMax = 10000
'typedef DWORD MediaEventType;
' ########################################################################################
' Interface name = IMFMediaEvent
' IID = DF598932-F10C-4E39-BBA2-C308F101DAA3
' Inherited interface = IMFAttributes
' ########################################################################################
#IF NOT %DEF(%IMFMediaEvent_INTERFACE_DEFINED)
 %IMFMediaEvent_INTERFACE_DEFINED = 1
$IID_IMFMediaEvent = GUID$("{DF598932-F10C-4E39-BBA2-C308F101DAA3}")
INTERFACE IMFMediaEvent $IID_IMFMediaEvent
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFAttributes methods
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFMediaEvent methods
 ' =====================================================================================
 METHOD GetType ( ' VTable offset = 132
 BYREF pmet AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetExtendedType ( ' VTable offset = 136
 BYREF pguidExtendedType AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStatus ( ' VTable offset = 140
 BYREF phrStatus AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetValue ( ' VTable offset = 144
 BYREF pvValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaEvent_INTERFACE_DEFINED__ */
%EQUATE `MF_EVENT_FLAG_NO_WAIT = &H00000001
' ########################################################################################
' Interface name = IMFMediaEventGenerator
' IID = 2CD0BD52-BCD5-4B89-B62C-EADC0C031E7D
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFMediaEventGenerator_INTERFACE_DEFINED)
 %IMFMediaEventGenerator_INTERFACE_DEFINED = 1
$IID_IMFMediaEventGenerator = GUID$("{2CD0BD52-BCD5-4B89-B62C-EADC0C031E7D}")
INTERFACE IMFMediaEventGenerator $IID_IMFMediaEventGenerator
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetEvent ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYREF ppEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD BeginGetEvent ( ' VTable offset = 16
 BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndGetEvent ( ' VTable offset = 20
 BYVAL pResult AS IMFAsyncResult
 , BYREF ppEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD QueueEvent ( ' VTable offset = 24
 BYVAL met AS DWORD
 , BYREF guidExtendedType AS GUID
 , BYVAL hrStatus AS LONG
 , BYREF pvValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaEventGenerator_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFRemoteAsyncCallback
' IID = A27003D0-2354-4F2A-8D6A-AB7CFF15437E
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFRemoteAsyncCallback_INTERFACE_DEFINED)
 %IMFRemoteAsyncCallback_INTERFACE_DEFINED = 1
$IID_IMFRemoteAsyncCallback = GUID$("{A27003D0-2354-4F2A-8D6A-AB7CFF15437E}")
INTERFACE IMFRemoteAsyncCallback $IID_IMFRemoteAsyncCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Invoke ( ' VTable offset = 12
 BYVAL hr AS LONG
 , BYVAL pRemoteResult AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFRemoteAsyncCallback_INTERFACE_DEFINED__ */
' enum MFBYTESTREAM_SEEK_ORIGIN
%EQUATE `msoBegin = 0
%EQUATE `msoCurrent = %msoBegin + 1
' ########################################################################################
' Interface name = IMFByteStream
' IID = AD4C1B00-4BF7-422F-9175-756693D9130D
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFByteStream_INTERFACE_DEFINED)
 %IMFByteStream_INTERFACE_DEFINED = 1
$IID_IMFByteStream = GUID$("{AD4C1B00-4BF7-422F-9175-756693D9130D}")
INTERFACE IMFByteStream $IID_IMFByteStream
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCapabilities ( ' VTable offset = 12
 BYREF pdwCapabilities AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetLength ( ' VTable offset = 16
 BYREF pqwLength AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetLength ( ' VTable offset = 20
 BYVAL qwLength AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCurrentPosition ( ' VTable offset = 24
 BYREF pqwPosition AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetCurrentPosition ( ' VTable offset = 28
 BYVAL qwPosition AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD IsEndOfStream ( ' VTable offset = 32
 BYREF pfEndOfStream AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Read ( ' VTable offset = 36
 BYVAL pb AS BYTE PTR
 , BYVAL cb AS DWORD
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD BeginRead ( ' VTable offset = 40
 BYVAL pb AS BYTE PTR
 , BYVAL cb AS DWORD
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndRead ( ' VTable offset = 44
 BYVAL pResult AS IMFAsyncResult
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Write ( ' VTable offset = 48
 BYVAL pb AS BYTE PTR
 , BYVAL cb AS DWORD
 , BYREF pcbWritten AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD BeginWrite ( ' VTable offset = 52
 BYVAL pb AS BYTE PTR
 , BYVAL cb AS DWORD
 , BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndWrite ( ' VTable offset = 56
 BYVAL pResult AS IMFAsyncResult
 , BYREF pcbWritten AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Seek ( ' VTable offset = 60
 BYVAL SeekOrigin AS LONG
 , BYVAL llSeekOffset AS QUAD
 , BYVAL dwSeekFlags AS DWORD
 , BYREF pqwCurrentPosition AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Flush ( ' VTable offset = 64
 ) AS LONG
 ' =====================================================================================
 METHOD Close ( ' VTable offset = 64
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFByteStream_INTERFACE_DEFINED__ */
%EQUATE `MFBYTESTREAM_IS_READABLE = &H00000001
%EQUATE `MFBYTESTREAM_IS_WRITABLE = &H00000002
%EQUATE `MFBYTESTREAM_IS_SEEKABLE = &H00000004
%EQUATE `MFBYTESTREAM_IS_REMOTE = &H00000008
%EQUATE `MFBYTESTREAM_IS_DIRECTORY = &H00000080
%EQUATE `MFBYTESTREAM_HAS_SLOW_SEEK = &H00000100
%EQUATE `MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED = &H00000200
'#if (WINVER >= _WIN32_WINNT_WIN7)
%EQUATE `MFBYTESTREAM_SHARE_WRITE = &H00000400
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
%EQUATE `MFBYTESTREAM_SEEK_FLAG_CANCEL_PENDING_IO = &H00000001
$MF_BYTESTREAM_ORIGIN_NAME = GUID$("{FC358288-3CB6-460C-A424-B6681260375A}")
$MF_BYTESTREAM_CONTENT_TYPE = GUID$("{FC358289-3CB6-460C-A424-B6681260375A}")
$MF_BYTESTREAM_DURATION = GUID$("{FC35828A-3CB6-460C-A424-B6681260375A}")
$MF_BYTESTREAM_LAST_MODIFIED_TIME = GUID$("{FC35828B-3CB6-460C-A424-B6681260375A}")
'#if (WINVER >= _WIN32_WINNT_WIN7)
$MF_BYTESTREAM_IFO_FILE_URI = GUID$("{FC35828C-3CB6-460C-A424-B6681260375A}")
$MF_BYTESTREAM_DLNA_PROFILE_ID = GUID$("{FC35828D-3CB6-460C-A424-B6681260375A}")
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
' enum MF_FILE_ACCESSMODE
%EQUATE `MF_ACCESSMODE_READ = 1
%EQUATE `MF_ACCESSMODE_WRITE = 2
%EQUATE `MF_ACCESSMODE_READWRITE = 3
' enum MF_FILE_OPENMODE
%EQUATE `MF_OPENMODE_FAIL_IF_NOT_EXIST = 0
%EQUATE `MF_OPENMODE_FAIL_IF_EXIST = 1
%EQUATE `MF_OPENMODE_RESET_IF_EXIST = 2
%EQUATE `MF_OPENMODE_APPEND_IF_EXIST = 3
%EQUATE `MF_OPENMODE_DELETE_IF_EXIST = 4
' enum MF_FILE_FLAGS
%EQUATE `MF_FILEFLAGS_NONE = 0
%EQUATE `MF_FILEFLAGS_NOBUFFERING = &H1
%EQUATE `MF_FILEFLAGS_ALLOW_WRITE_SHARING = &H2
' ########################################################################################
' Interface name = IMFCollection
' IID = 5BC8A76B-869A-46A3-9B03-FA218A66AEBE
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFCollection_INTERFACE_DEFINED)
 %IMFCollection_INTERFACE_DEFINED = 1
$IID_IMFCollection = GUID$("{5BC8A76B-869A-46A3-9B03-FA218A66AEBE}")
INTERFACE IMFCollection $IID_IMFCollection
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetElementCount ( ' VTable offset = 12
 BYREF pcElements AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetElement ( ' VTable offset = 16
 BYVAL dwElementIndex AS DWORD
 , BYREF ppUnkElement AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD AddElement ( ' VTable offset = 20
 BYVAL pUnkElement AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveElement ( ' VTable offset = 24
 BYVAL dwElementIndex AS DWORD
 , BYREF ppUnkElement AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD InsertElementAt ( ' VTable offset = 28
 BYVAL dwIndex AS DWORD
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveAllElements ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFCollection_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFMediaEventQueue
' IID = 36F846FC-2256-48B6-B58E-E2B638316581
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFMediaEventQueue_INTERFACE_DEFINED)
 %IMFMediaEventQueue_INTERFACE_DEFINED = 1
$IID_IMFMediaEventQueue = GUID$("{36F846FC-2256-48B6-B58E-E2B638316581}")
INTERFACE IMFMediaEventQueue $IID_IMFMediaEventQueue
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetEvent ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYREF ppEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD BeginGetEvent ( ' VTable offset = 16
 BYVAL pCallback AS IMFAsyncCallback
 , BYVAL punkState AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EndGetEvent ( ' VTable offset = 20
 BYVAL pResult AS IMFAsyncResult
 , BYREF ppEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD QueueEvent ( ' VTable offset = 24
 BYVAL pEvent AS IMFMediaEvent
 ) AS LONG
 ' =====================================================================================
 METHOD QueueEventParamVar ( ' VTable offset = 28
 BYVAL met AS DWORD
 , BYREF guidExtendedType AS GUID
 , BYVAL hrStatus AS LONG
 , BYREF pvValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD QueueEventParamUnk ( ' VTable offset = 32
 BYVAL met AS DWORD
 , BYREF guidExtendedType AS GUID
 , BYVAL hrStatus AS LONG
 , BYVAL pUnk AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD Shutdown ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFMediaEventQueue_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMFActivate
' IID = 7FEE9E9A-4A89-47A6-899C-B6A53A70FB67
' Inherited interface = IMFAttributes
' ########################################################################################
#IF NOT %DEF(%IMFActivate_INTERFACE_DEFINED)
 %IMFActivate_INTERFACE_DEFINED = 1
$IID_IMFActivate = GUID$("{7FEE9E9A-4A89-47A6-899C-B6A53A70FB67}")
INTERFACE IMFActivate $IID_IMFActivate
 INHERIT IUnknown
 ' =====================================================================================
 ' IMFAttributes Methods
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 12
 BYREF guidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemType ( ' VTable offset = 16
 BYREF guidKey AS GUID
 , BYREF pType AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CompareItem ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL pTheirs AS IMFAttributes
 , BYVAL MatchType AS LONG
 , BYREF pbResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT32 ( ' VTable offset = 28
 BYREF guidKey AS GUID
 , BYREF punValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUINT64 ( ' VTable offset = 32
 BYREF guidKey AS GUID
 , BYREF punValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDouble ( ' VTable offset = 36
 BYREF guidKey AS GUID
 , BYREF pfValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 40
 BYREF guidKey AS GUID
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringLength ( ' VTable offset = 44
 BYREF guidKey AS GUID
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetString ( ' VTable offset = 48
 BYREF guidKey AS GUID
 , BYREF pwszValue AS WSTRINGZ
 , BYVAL cchBufSize AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedString ( ' VTable offset = 52
 BYREF guidKey AS GUID
 , BYREF ppwszValue AS DWORD
 , BYREF pcchLength AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlobSize ( ' VTable offset = 56
 BYREF guidKey AS GUID
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBlob ( ' VTable offset = 60
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 , BYREF pcbBlobSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllocatedBlob ( ' VTable offset = 64
 BYREF guidKey AS GUID
 , BYVAL ppBuf AS DWORD
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUnknown ( ' VTable offset = 68
 BYREF guidKey AS GUID
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetItem ( ' VTable offset = 72
 BYREF guidKey AS GUID
 , BYREF Value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteItem ( ' VTable offset = 76
 BYREF guidKey AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAllItems ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT32 ( ' VTable offset = 84
 BYREF guidKey AS GUID
 , BYVAL unValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUINT64 ( ' VTable offset = 88
 BYREF guidKey AS GUID
 , BYVAL unValue AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDouble ( ' VTable offset = 92
 BYREF guidKey AS GUID
 , BYVAL fValue AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 96
 BYREF guidKey AS GUID
 , BYREF guidValue AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetString ( ' VTable offset = 100
 BYREF guidKey AS GUID
 , BYREF wszValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetBlob ( ' VTable offset = 104
 BYREF guidKey AS GUID
 , BYVAL pBuf AS DWORD
 , BYVAL cbBufSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetUnknown ( ' VTable offset = 108
 BYREF guidKey AS GUID
 , BYVAL pUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD LockStore ( ' VTable offset = 112
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockStore ( ' VTable offset = 116
 ) AS LONG
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 120
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetItemByIndex ( ' VTable offset = 124
 BYVAL unIndex AS DWORD
 , BYREF pguidKey AS GUID
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD CopyAllItems ( ' VTable offset = 128
 BYVAL pDest AS LONG
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMFActivate Methods
 ' =====================================================================================
 METHOD ActivateObject ( ' VTable offset = 132
 BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD ShutdownObject ( ' VTable offset = 136
 ) AS LONG
 ' =====================================================================================
 METHOD DetachObject ( ' VTable offset = 140
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFActivate_INTERFACE_DEFINED__ */
'#if (WINVER >= _WIN32_WINNT_WIN7)
' enum MF_Plugin_Type
%EQUATE `MF_Plugin_Type_MFT = 0
%EQUATE `MF_Plugin_Type_MediaSource = 1
' ########################################################################################
' Interface name = IMFPluginControl
' IID = 36F846FC-2256-48B6-B58E-E2B638316581
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMFPluginControl_INTERFACE_DEFINED)
 %IMFPluginControl_INTERFACE_DEFINED = 1
$IID_IMFPluginControl = GUID$("{36F846FC-2256-48B6-B58E-E2B638316581}")
INTERFACE IMFPluginControl $IID_IMFPluginControl
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetPreferredClsid ( ' VTable offset = 12
 BYVAL pluginType AS DWORD
 , BYREF selector AS WSTRINGZ
 , BYREF clsid AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetPreferredClsidByIndex ( ' VTable offset = 16
 BYVAL pluginType AS DWORD
 , BYVAL index AS DWORD
 , BYREF selector AS DWORD
 , BYREF clsid AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetPreferredClsid ( ' VTable offset = 20
 BYVAL pluginType AS DWORD
 , BYREF selector AS WSTRINGZ
 , BYREF clsid AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD IsDisabled ( ' VTable offset = 24
 BYVAL pluginType AS DWORD
 , BYREF clsid AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetDisabledByIndex ( ' VTable offset = 28
 BYVAL pluginType AS DWORD
 , BYVAL index AS DWORD
 , BYREF clsid AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetDisabled ( ' VTable offset = 32
 BYVAL pluginType AS DWORD
 , BYREF clsid AS GUID
 , BYVAL disabled AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMFPluginControl_INTERFACE_DEFINED__ */
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
#ENDIF
