' ########################################################################################
' Microsoft Windows
' File: medparam.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_medparam_PBI)
#DEFINE PBX_medparam_PBI
%EQUATE `MEDPARAM_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/COM/OCIdl.inc"
#INCLUDE ONCE "Legacy/System/strmif.inc"
'typedef float MP_DATA;
' enum MP_TYPE
%EQUATE `MPT_INT = 0
%EQUATE `MPT_FLOAT = %MPT_INT + 1
%EQUATE `MPT_BOOL = %MPT_FLOAT + 1
%EQUATE `MPT_ENUM = %MPT_BOOL + 1
%EQUATE `MPT_MAX = %MPT_ENUM + 1
%EQUATE `MPBOOL_TRUE = 1
%EQUATE `MPBOOL_FALSE = 0
' enum MP_CURVE_TYPE
%EQUATE `MP_CURVE_JUMP = &H1
%EQUATE `MP_CURVE_LINEAR = &H2
%EQUATE `MP_CURVE_SQUARE = &H4
%EQUATE `MP_CURVE_INVSQUARE = &H8
%EQUATE `MP_CURVE_SINE = &H10
'typedef DWORD MP_CAPS;
%EQUATE `MP_CAPS_CURVE_JUMP = %MP_CURVE_JUMP
%EQUATE `MP_CAPS_CURVE_LINEAR = %MP_CURVE_LINEAR
%EQUATE `MP_CAPS_CURVE_SQUARE = %MP_CURVE_SQUARE
%EQUATE `MP_CAPS_CURVE_INVSQUARE = %MP_CURVE_INVSQUARE
%EQUATE `MP_CAPS_CURVE_SINE = %MP_CURVE_SINE
' // Size = 148 bytes
TYPE MP_PARAMINFO DWORD
 mpType AS LONG ' MP_TYPE
 mopCaps AS DWORD ' MP_CAPS
 mpdMinValue AS SINGLE ' MP_DATA
 mpdMaxValue AS SINGLE ' MP_DATA
 mpdNeutralValue AS SINGLE ' MP_DATA
 szUnitText AS WSTRINGZ * 32 ' WCHAR[32]
 szLabel AS WSTRINGZ * 32 ' WCHAR[32]
END TYPE
'typedef DWORD DWORD;
%EQUATE `DWORD_ALLPARAMS = -1
'typedef DWORD MP_TIMEDATA;
$GUID_TIME_REFERENCE = GUID$("{93ad712b-daa0-4ffe-bc81-b0ce500fcdd9}")
$GUID_TIME_MUSIC = GUID$("{0574c49d-5b04-4b15-a542-ae282030117b}")
$GUID_TIME_SAMPLES = GUID$("{a8593d05-0c43-4984-9a63-97af9e02c4c0}")
'typedef DWORD MP_FLAGS;
%EQUATE `MPF_ENVLP_STANDARD = 0
%EQUATE `MPF_ENVLP_BEGIN_CURRENTVAL = &H1
%EQUATE `MPF_ENVLP_BEGIN_NEUTRALVAL = &H2
' // Size = 32 bytes
TYPE MP_ENVELOPE_SEGMENT ' Must be 8 byte aligned
 rtStart AS QUAD ' REFERENCE_TIME
 rtEnd AS QUAD ' REFERENCE_TIME
 valStart AS SINGLE ' MP_DATA
 valEnd AS SINGLE ' MP_DATA
 iCurve AS LONG ' MP_CURVE_TYPE
 flags AS DWORD ' MP_FLAGS
END TYPE
%EQUATE `MPF_PUNCHIN_REFTIME = 0
%EQUATE `MPF_PUNCHIN_NOW = &H1
%EQUATE `MPF_PUNCHIN_STOPPED = &H2
' ########################################################################################
' IMediaParamInfo interface
' IID = 6d6cbb60-a223-44aa-842f-a2f06750be6d
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMediaParamInfo_INTERFACE_DEFINED)
 %IMediaParamInfo_INTERFACE_DEFINED = 1
$IID_IMediaParamInfo = GUID$("{6d6cbb60-a223-44aa-842f-a2f06750be6d}")
INTERFACE IMediaParamInfo $IID_IMediaParamInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetParamCount ( ' VTable offset = 12
 BYREF pdwParams AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetParamInfo ( ' VTable offset = 16
 BYVAL dwParamIndex AS DWORD
 , BYREF pInfo AS MP_PARAMINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetParamText ( ' VTable offset = 20
 BYVAL dwParamIndex AS DWORD
 , BYREF ppwchText AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetNumTimeFormats ( ' VTable offset = 24
 BYREF pdwNumTimeFormats AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSupportedTimeFormat ( ' VTable offset = 28
 BYVAL dwFormatIndex AS DWORD
 , BYREF pguidTimeFormat AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetCurrentTimeFormat ( ' VTable offset = 32
 BYREF pguidTimeFormat AS GUID
 , BYREF pTimeData AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMediaParamInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' IMediaParams interface
' IID = 6d6cbb61-a223-44aa-842f-a2f06750be6e
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMediaParams_INTERFACE_DEFINED)
 %IMediaParams_INTERFACE_DEFINED = 1
$IID_IMediaParams = GUID$("{6d6cbb61-a223-44aa-842f-a2f06750be6e}")
INTERFACE IMediaParams $IID_IMediaParams
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetParam ( ' VTable offset = 12
 BYVAL dwParamIndex AS DWORD
 , BYREF pValue AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetParam ( ' VTable offset = 16
 BYVAL dwParamIndex AS DWORD
 , BYVAL value AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD AddEnvelope ( ' VTable offset = 20
 BYVAL dwParamIndex AS DWORD
 , BYVAL cSegments AS DWORD
 , BYREF pEnvelopeSegments AS MP_ENVELOPE_SEGMENT
 ) AS LONG
 ' =====================================================================================
 METHOD FlushEnvelope ( ' VTable offset = 24
 BYVAL dwParamIndex AS DWORD
 , BYVAL refTimeStart AS QUAD
 , BYVAL refTimeEnd AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SetTimeFormat ( ' VTable offset = 28
 BYVAL guidTimeFormat AS GUID
 , BYVAL mpTimeData AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMediaParams_INTERFACE_DEFINED__ */
#ENDIF
