Add extern "C"
[reactos.git] / include / dxsdk / medparam.idl
1
2
3 import "oaidl.idl";
4 import "ocidl.idl";
5 import "strmif.idl";
6
7
8 typedef float MP_DATA;
9
10 typedef enum _MP_Type
11 {
12 MPT_INT,
13 MPT_FLOAT,
14 MPT_BOOL,
15 MPT_ENUM,
16 MPT_MAX,
17 } MP_TYPE;
18
19 cpp_quote("const MP_DATA MPBOOL_TRUE = 1.0;")
20 cpp_quote("const MP_DATA MPBOOL_FALSE = 0.0;")
21
22
23 typedef enum _MP_CURVE_TYPE
24 {
25 MP_CURVE_JUMP = 0x0001,
26 MP_CURVE_LINEAR = 0x0002,
27 MP_CURVE_SQUARE = 0x0004,
28 MP_CURVE_INVSQUARE = 0x0008,
29 MP_CURVE_SINE = 0x0010,
30 } MP_CURVE_TYPE;
31
32
33 typedef DWORD MP_CAPS;
34 const MP_CAPS MP_CAPS_CURVE_JUMP = MP_CURVE_JUMP;
35 const MP_CAPS MP_CAPS_CURVE_LINEAR = MP_CURVE_LINEAR;
36 const MP_CAPS MP_CAPS_CURVE_SQUARE = MP_CURVE_SQUARE;
37 const MP_CAPS MP_CAPS_CURVE_INVSQUARE = MP_CURVE_INVSQUARE;
38 const MP_CAPS MP_CAPS_CURVE_SINE = MP_CURVE_SINE;
39
40 typedef struct _MP_PARAMINFO
41 {
42 MP_TYPE mpType;
43 MP_CAPS mopCaps;
44 MP_DATA mpdMinValue;
45 MP_DATA mpdMaxValue;
46 MP_DATA mpdNeutralValue;
47 WCHAR szUnitText[32];
48 WCHAR szLabel[32];
49 } MP_PARAMINFO;
50
51 const DWORD DWORD_ALLPARAMS = -1;
52 typedef DWORD MP_TIMEDATA;
53
54 cpp_quote("DEFINE_GUID(GUID_TIME_REFERENCE, 0x93ad712b, 0xdaa0, 0x4ffe, 0xbc, 0x81, 0xb0, 0xce, 0x50, 0x0f, 0xcd, 0xd9);")
55 cpp_quote("DEFINE_GUID(GUID_TIME_MUSIC, 0x0574c49d, 0x5b04, 0x4b15, 0xa5, 0x42, 0xae, 0x28, 0x20, 0x30, 0x11, 0x7b);")
56 cpp_quote("DEFINE_GUID(GUID_TIME_SAMPLES, 0xa8593d05, 0x0c43, 0x4984, 0x9a, 0x63, 0x97, 0xaf, 0x9e, 0x02, 0xc4, 0xc0);")
57
58 typedef DWORD MP_FLAGS;
59 const MP_FLAGS MPF_ENVLP_STANDARD = 0x0000;
60 const MP_FLAGS MPF_ENVLP_BEGIN_CURRENTVAL = 0x0001;
61 const MP_FLAGS MPF_ENVLP_BEGIN_NEUTRALVAL = 0x0002;
62
63 typedef struct _MP_ENVELOPE_SEGMENT
64 {
65 REFERENCE_TIME rtStart;
66 REFERENCE_TIME rtEnd;
67 MP_DATA valStart;
68 MP_DATA valEnd;
69 MP_CURVE_TYPE iCurve;
70 MP_FLAGS flags;
71 } MP_ENVELOPE_SEGMENT;
72
73
74 const MP_FLAGS MPF_PUNCHIN_REFTIME = 0;
75 const MP_FLAGS MPF_PUNCHIN_NOW = 0x0001;
76 const MP_FLAGS MPF_PUNCHIN_STOPPED = 0x0002;
77
78 [
79 object,
80 uuid(6d6cbb60-a223-44aa-842f-a2f06750be6d),
81 version(1.0)
82 ]
83 interface IMediaParamInfo : IUnknown
84 {
85 HRESULT GetParamCount ([out] DWORD * pdwParams);
86 HRESULT GetParamInfo ([in] DWORD dwParamIndex, [out] MP_PARAMINFO * pInfo);
87 HRESULT GetParamText ([in] DWORD dwParamIndex, [out] WCHAR **ppwchText);
88 HRESULT GetNumTimeFormats ([out] DWORD * pdwNumTimeFormats);
89 HRESULT GetSupportedTimeFormat([in] DWORD dwFormatIndex, [out] GUID *pguidTimeFormat);
90 HRESULT GetCurrentTimeFormat ([out] GUID *pguidTimeFormat, [out] MP_TIMEDATA *pTimeData);
91 }
92
93 [
94 object,
95 uuid(6d6cbb61-a223-44aa-842f-a2f06750be6e),
96 version(1.0)
97 ]
98 interface IMediaParams : IUnknown
99 {
100 HRESULT GetParam ([in] DWORD dwParamIndex, [out] MP_DATA *pValue);
101 HRESULT SetParam ([in] DWORD dwParamIndex, [in] MP_DATA value);
102 HRESULT AddEnvelope ([in] DWORD dwParamIndex, [in] DWORD cSegments, [in] MP_ENVELOPE_SEGMENT * pEnvelopeSegments);
103 HRESULT FlushEnvelope ([in] DWORD dwParamIndex, [in] REFERENCE_TIME refTimeStart, [in] REFERENCE_TIME refTimeEnd);
104 HRESULT SetTimeFormat ([in] GUID guidTimeFormat, [in] MP_TIMEDATA mpTimeData);
105 }
106