1 | cpp_quote("/**")
|
---|
2 | cpp_quote(" * This file is part of the mingw-w64 runtime package.")
|
---|
3 | cpp_quote(" * No warranty is given; refer to the file DISCLAIMER within this package.")
|
---|
4 | cpp_quote(" */")
|
---|
5 | cpp_quote("")
|
---|
6 |
|
---|
7 | import "unknwn.idl";
|
---|
8 | import "propsys.idl";
|
---|
9 | import "mfidl.idl";
|
---|
10 | import "evr.idl";
|
---|
11 |
|
---|
12 | cpp_quote("#if (WINVER >= _WIN32_WINNT_WIN7)")
|
---|
13 | interface IMFPMediaPlayer;
|
---|
14 | interface IMFPMediaItem;
|
---|
15 | interface IMFPMediaPlayerCallback;
|
---|
16 | interface IMFMediaEvent;
|
---|
17 | interface IMFNetCredential;
|
---|
18 | cpp_quote("")
|
---|
19 | cpp_quote("interface IMFMediaEvent;")
|
---|
20 | cpp_quote("interface IMFNetCredential;")
|
---|
21 |
|
---|
22 | cpp_quote("")
|
---|
23 | typedef UINT32 MFP_CREATION_OPTIONS;
|
---|
24 | cpp_quote("")
|
---|
25 | typedef [v1_enum] enum _MFP_CREATION_OPTIONS {
|
---|
26 | MFP_OPTION_NONE = 0x00,
|
---|
27 | MFP_OPTION_FREE_THREADED_CALLBACK = 0x01,
|
---|
28 | MFP_OPTION_NO_MMCSS = 0x02,
|
---|
29 | MFP_OPTION_NO_REMOTE_DESKTOP_OPTIMIZATION = 0x04,
|
---|
30 | } _MFP_CREATION_OPTIONS;
|
---|
31 |
|
---|
32 | cpp_quote("")
|
---|
33 | typedef [v1_enum] enum MFP_MEDIAPLAYER_STATE {
|
---|
34 | MFP_MEDIAPLAYER_STATE_EMPTY = 0x00,
|
---|
35 | MFP_MEDIAPLAYER_STATE_STOPPED = 0x01,
|
---|
36 | MFP_MEDIAPLAYER_STATE_PLAYING = 0x02,
|
---|
37 | MFP_MEDIAPLAYER_STATE_PAUSED = 0x03,
|
---|
38 | MFP_MEDIAPLAYER_STATE_SHUTDOWN = 0x04,
|
---|
39 | } MFP_MEDIAPLAYER_STATE;
|
---|
40 |
|
---|
41 | cpp_quote("")
|
---|
42 | typedef UINT32 MFP_MEDIAITEM_CHARACTERISTICS;
|
---|
43 | cpp_quote("")
|
---|
44 | typedef [v1_enum] enum _MFP_MEDIAITEM_CHARACTERISTICS {
|
---|
45 | MFP_MEDIAITEM_IS_LIVE = 0x01,
|
---|
46 | MFP_MEDIAITEM_CAN_SEEK = 0x02,
|
---|
47 | MFP_MEDIAITEM_CAN_PAUSE = 0x04,
|
---|
48 | MFP_MEDIAITEM_HAS_SLOW_SEEK = 0x08,
|
---|
49 | } _MFP_MEDIAITEM_CHARACTERISTICS;
|
---|
50 |
|
---|
51 | cpp_quote("")
|
---|
52 | typedef UINT32 MFP_CREDENTIAL_FLAGS;
|
---|
53 | cpp_quote("")
|
---|
54 | typedef [v1_enum] enum _MFP_CREDENTIAL_FLAGS{
|
---|
55 | MFP_CREDENTIAL_PROMPT = 0x01,
|
---|
56 | MFP_CREDENTIAL_SAVE = 0x02,
|
---|
57 | MFP_CREDENTIAL_DO_NOT_CACHE = 0x04,
|
---|
58 | MFP_CREDENTIAL_CLEAR_TEXT = 0x08,
|
---|
59 | MFP_CREDENTIAL_PROXY = 0x10,
|
---|
60 | MFP_CREDENTIAL_LOGGED_ON_USER = 0x20,
|
---|
61 | } _MFP_CREDENTIAL_FLAGS;
|
---|
62 |
|
---|
63 | cpp_quote("STDAPI MFPCreateMediaPlayer(LPCWSTR pwszURL, BOOL fStartPlayback, MFP_CREATION_OPTIONS creationOptions, IMFPMediaPlayerCallback * pCallback, HWND hWnd, IMFPMediaPlayer ** ppMediaPlayer);")
|
---|
64 |
|
---|
65 | cpp_quote("")
|
---|
66 | [local, object, uuid(A714590A-58AF-430a-85BF-44F5EC838D85),]
|
---|
67 | interface IMFPMediaPlayer : IUnknown {
|
---|
68 | HRESULT Play();
|
---|
69 | HRESULT Pause();
|
---|
70 | HRESULT Stop();
|
---|
71 | HRESULT FrameStep();
|
---|
72 | HRESULT SetPosition([in, annotation("__in")] REFGUID guidPositionType, [in] const PROPVARIANT * pvPositionValue);
|
---|
73 | HRESULT GetPosition([in] REFGUID guidPositionType, [out] PROPVARIANT * pvPositionValue);
|
---|
74 | HRESULT GetDuration([in] REFGUID guidPositionType, [out] PROPVARIANT * pvDurationValue);
|
---|
75 | HRESULT SetRate([in] float flRate);
|
---|
76 | HRESULT GetRate([out] float *pflRate);
|
---|
77 | HRESULT GetSupportedRates([in] BOOL fForwardDirection, [out] float *pflSlowestRate, [out] float *pflFastestRate);
|
---|
78 | HRESULT GetState([out] MFP_MEDIAPLAYER_STATE * peState);
|
---|
79 | HRESULT CreateMediaItemFromURL([in] LPCWSTR pwszURL, [in] BOOL fSync, [in] DWORD_PTR dwUserData, [out] IMFPMediaItem ** ppMediaItem);
|
---|
80 | HRESULT CreateMediaItemFromObject([in] IUnknown * pIUnknownObj, [in] BOOL fSync, [in] DWORD_PTR dwUserData, [out] IMFPMediaItem ** ppMediaItem);
|
---|
81 | HRESULT SetMediaItem([in] IMFPMediaItem * pIMFPMediaItem);
|
---|
82 | HRESULT ClearMediaItem();
|
---|
83 | HRESULT GetMediaItem([out]IMFPMediaItem ** ppIMFPMediaItem);
|
---|
84 | HRESULT GetVolume([out] float *pflVolume);
|
---|
85 | HRESULT SetVolume([in] float flVolume);
|
---|
86 | HRESULT GetBalance([out] float *pflBalance);
|
---|
87 | HRESULT SetBalance([in] float flBalance);
|
---|
88 | HRESULT GetMute([out] BOOL * pfMute);
|
---|
89 | HRESULT SetMute([in] BOOL fMute);
|
---|
90 | HRESULT GetNativeVideoSize([out] SIZE *pszVideo, [out] SIZE *pszARVideo);
|
---|
91 | HRESULT GetIdealVideoSize([out] SIZE *pszMin, [out] SIZE *pszMax );
|
---|
92 | HRESULT SetVideoSourceRect([in] MFVideoNormalizedRect const *pnrcSource);
|
---|
93 | HRESULT GetVideoSourceRect([out] MFVideoNormalizedRect *pnrcSource);
|
---|
94 | HRESULT SetAspectRatioMode([in] DWORD dwAspectRatioMode);
|
---|
95 | HRESULT GetAspectRatioMode([out] DWORD *pdwAspectRatioMode);
|
---|
96 | HRESULT GetVideoWindow([out] HWND *phwndVideo );
|
---|
97 | HRESULT UpdateVideo();
|
---|
98 | HRESULT SetBorderColor([in] COLORREF Clr);
|
---|
99 | HRESULT GetBorderColor([out] COLORREF *pClr );
|
---|
100 | HRESULT InsertEffect([in, annotation("__in")] IUnknown * pEffect, [in] BOOL fOptional);
|
---|
101 | HRESULT RemoveEffect([in] IUnknown * pEffect);
|
---|
102 | HRESULT RemoveAllEffects();
|
---|
103 | HRESULT Shutdown();
|
---|
104 | };
|
---|
105 |
|
---|
106 | cpp_quote("EXTERN_GUID( MFP_POSITIONTYPE_100NS, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 );")
|
---|
107 | cpp_quote("")
|
---|
108 | [local, object, uuid(90EB3E6B-ECBF-45cc-B1DA-C6FE3EA70D57),]
|
---|
109 | interface IMFPMediaItem : IUnknown {
|
---|
110 | HRESULT GetMediaPlayer([out] IMFPMediaPlayer ** ppMediaPlayer );
|
---|
111 | HRESULT GetURL([out] LPWSTR * ppwszURL );
|
---|
112 | HRESULT GetObject([out] IUnknown ** ppIUnknown );
|
---|
113 | HRESULT GetUserData([out] DWORD_PTR * pdwUserData );
|
---|
114 | HRESULT SetUserData([in] DWORD_PTR dwUserData );
|
---|
115 | HRESULT GetStartStopPosition([out] GUID * pguidStartPositionType, [out] PROPVARIANT * pvStartValue, [out] GUID * pguidStopPositionType, [out] PROPVARIANT * pvStopValue);
|
---|
116 | HRESULT SetStartStopPosition([in] const GUID * pguidStartPositionType, [in] const PROPVARIANT * pvStartValue, [in] const GUID * pguidStopPositionType, [in] const PROPVARIANT * pvStopValue);
|
---|
117 | HRESULT HasVideo([out] BOOL * pfHasVideo, [out] BOOL * pfSelected);
|
---|
118 | HRESULT HasAudio([out] BOOL * pfHasAudio, [out] BOOL * pfSelected);
|
---|
119 | HRESULT IsProtected([out] BOOL * pfProtected);
|
---|
120 | HRESULT GetDuration([in] REFGUID guidPositionType, [out] PROPVARIANT * pvDurationValue);
|
---|
121 | HRESULT GetNumberOfStreams([out] DWORD * pdwStreamCount);
|
---|
122 | HRESULT GetStreamSelection([in] DWORD dwStreamIndex, [out] BOOL * pfEnabled);
|
---|
123 | HRESULT SetStreamSelection([in] DWORD dwStreamIndex,[in] BOOL fEnabled);
|
---|
124 | HRESULT GetStreamAttribute([in] DWORD dwStreamIndex, [in] REFGUID guidMFAttribute, [out] PROPVARIANT * pvValue);
|
---|
125 | HRESULT GetPresentationAttribute([in] REFGUID guidMFAttribute, [out] PROPVARIANT * pvValue);
|
---|
126 | HRESULT GetCharacteristics([out] MFP_MEDIAITEM_CHARACTERISTICS * pCharacteristics);
|
---|
127 | HRESULT SetStreamSink([in] DWORD dwStreamIndex, [in] IUnknown* pMediaSink);
|
---|
128 | HRESULT GetMetadata([out] IPropertyStore** ppMetadataStore );
|
---|
129 | };
|
---|
130 |
|
---|
131 | cpp_quote("")
|
---|
132 | typedef enum MFP_EVENT_TYPE {
|
---|
133 | MFP_EVENT_TYPE_PLAY = 0,
|
---|
134 | MFP_EVENT_TYPE_PAUSE = 1,
|
---|
135 | MFP_EVENT_TYPE_STOP = 2,
|
---|
136 | MFP_EVENT_TYPE_POSITION_SET = 3,
|
---|
137 | MFP_EVENT_TYPE_RATE_SET = 4,
|
---|
138 | MFP_EVENT_TYPE_MEDIAITEM_CREATED = 5,
|
---|
139 | MFP_EVENT_TYPE_MEDIAITEM_SET = 6,
|
---|
140 | MFP_EVENT_TYPE_FRAME_STEP = 7,
|
---|
141 | MFP_EVENT_TYPE_MEDIAITEM_CLEARED = 8,
|
---|
142 | MFP_EVENT_TYPE_MF = 9,
|
---|
143 | MFP_EVENT_TYPE_ERROR = 10,
|
---|
144 | MFP_EVENT_TYPE_PLAYBACK_ENDED = 11,
|
---|
145 | MFP_EVENT_TYPE_ACQUIRE_USER_CREDENTIAL = 12,
|
---|
146 | }
|
---|
147 | MFP_EVENT_TYPE;
|
---|
148 |
|
---|
149 | cpp_quote("")
|
---|
150 | typedef struct MFP_EVENT_HEADER {
|
---|
151 | MFP_EVENT_TYPE eEventType;
|
---|
152 | HRESULT hrEvent;
|
---|
153 | IMFPMediaPlayer * pMediaPlayer;
|
---|
154 | MFP_MEDIAPLAYER_STATE eState;
|
---|
155 | IPropertyStore * pPropertyStore;
|
---|
156 | } MFP_EVENT_HEADER;
|
---|
157 |
|
---|
158 |
|
---|
159 | cpp_quote("")
|
---|
160 | typedef struct MFP_PLAY_EVENT {
|
---|
161 | MFP_EVENT_HEADER header;
|
---|
162 | IMFPMediaItem * pMediaItem;
|
---|
163 | } MFP_PLAY_EVENT;
|
---|
164 |
|
---|
165 |
|
---|
166 | cpp_quote("")
|
---|
167 | typedef struct MFP_PAUSE_EVENT {
|
---|
168 | MFP_EVENT_HEADER header;
|
---|
169 | IMFPMediaItem * pMediaItem;
|
---|
170 | } MFP_PAUSE_EVENT;
|
---|
171 |
|
---|
172 | cpp_quote("")
|
---|
173 | typedef struct MFP_STOP_EVENT {
|
---|
174 | MFP_EVENT_HEADER header;
|
---|
175 | IMFPMediaItem * pMediaItem;
|
---|
176 | } MFP_STOP_EVENT;
|
---|
177 |
|
---|
178 | cpp_quote("")
|
---|
179 | typedef struct MFP_POSITION_SET_EVENT {
|
---|
180 | MFP_EVENT_HEADER header;
|
---|
181 | IMFPMediaItem * pMediaItem;
|
---|
182 | } MFP_POSITION_SET_EVENT;
|
---|
183 |
|
---|
184 | cpp_quote("")
|
---|
185 | typedef struct MFP_RATE_SET_EVENT {
|
---|
186 | MFP_EVENT_HEADER header;
|
---|
187 | IMFPMediaItem * pMediaItem;
|
---|
188 | float flRate;
|
---|
189 | } MFP_RATE_SET_EVENT;
|
---|
190 |
|
---|
191 | cpp_quote("")
|
---|
192 | typedef struct MFP_MEDIAITEM_CREATED_EVENT {
|
---|
193 | MFP_EVENT_HEADER header;
|
---|
194 | IMFPMediaItem * pMediaItem;
|
---|
195 | DWORD_PTR dwUserData;
|
---|
196 | } MFP_MEDIAITEM_CREATED_EVENT;
|
---|
197 |
|
---|
198 | cpp_quote("")
|
---|
199 | typedef struct MFP_MEDIAITEM_SET_EVENT {
|
---|
200 | MFP_EVENT_HEADER header;
|
---|
201 | IMFPMediaItem * pMediaItem;
|
---|
202 | } MFP_MEDIAITEM_SET_EVENT;
|
---|
203 |
|
---|
204 | cpp_quote("")
|
---|
205 | typedef struct MFP_FRAME_STEP_EVENT {
|
---|
206 | MFP_EVENT_HEADER header;
|
---|
207 | IMFPMediaItem * pMediaItem;
|
---|
208 | } MFP_FRAME_STEP_EVENT;
|
---|
209 |
|
---|
210 | cpp_quote("")
|
---|
211 | typedef struct MFP_MEDIAITEM_CLEARED_EVENT {
|
---|
212 | MFP_EVENT_HEADER header;
|
---|
213 | IMFPMediaItem * pMediaItem;
|
---|
214 | } MFP_MEDIAITEM_CLEARED_EVENT;
|
---|
215 |
|
---|
216 | cpp_quote("")
|
---|
217 | typedef struct MFP_MF_EVENT {
|
---|
218 | MFP_EVENT_HEADER header;
|
---|
219 | MediaEventType MFEventType;
|
---|
220 | IMFMediaEvent * pMFMediaEvent;
|
---|
221 | IMFPMediaItem * pMediaItem;
|
---|
222 | } MFP_MF_EVENT;
|
---|
223 |
|
---|
224 | cpp_quote("")
|
---|
225 | typedef struct MFP_ERROR_EVENT {
|
---|
226 | MFP_EVENT_HEADER header;
|
---|
227 | } MFP_ERROR_EVENT;
|
---|
228 |
|
---|
229 | cpp_quote("")
|
---|
230 | typedef struct MFP_PLAYBACK_ENDED_EVENT {
|
---|
231 | MFP_EVENT_HEADER header;
|
---|
232 | IMFPMediaItem * pMediaItem;
|
---|
233 | } MFP_PLAYBACK_ENDED_EVENT;
|
---|
234 |
|
---|
235 | cpp_quote("")
|
---|
236 | typedef struct MFP_ACQUIRE_USER_CREDENTIAL_EVENT {
|
---|
237 | MFP_EVENT_HEADER header;
|
---|
238 | DWORD_PTR dwUserData;
|
---|
239 | BOOL fProceedWithAuthentication;
|
---|
240 | HRESULT hrAuthenticationStatus;
|
---|
241 | LPCWSTR pwszURL;
|
---|
242 | LPCWSTR pwszSite;
|
---|
243 | LPCWSTR pwszRealm;
|
---|
244 | LPCWSTR pwszPackage;
|
---|
245 | LONG nRetries;
|
---|
246 | MFP_CREDENTIAL_FLAGS flags;
|
---|
247 | IMFNetCredential * pCredential;
|
---|
248 | } MFP_ACQUIRE_USER_CREDENTIAL_EVENT;
|
---|
249 |
|
---|
250 | cpp_quote("EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFP_PKEY_StreamIndex = { { 0xa7cf9740, 0xe8d9, 0x4a87, { 0xbd, 0x8e, 0x29, 0x67, 0x0, 0x1f, 0xd3, 0xad } }, 0x00 };")
|
---|
251 |
|
---|
252 | cpp_quote("EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFP_PKEY_StreamRenderingResults = { { 0xa7cf9740, 0xe8d9, 0x4a87, { 0xbd, 0x8e, 0x29, 0x67, 0x0, 0x1f, 0xd3, 0xad } }, 0x01 };")
|
---|
253 |
|
---|
254 | cpp_quote("#define __MFP_CAST_EVENT( pHdr, Tag ) (((pHdr)->eEventType == MFP_EVENT_TYPE_##Tag ) ? (MFP_##Tag##_EVENT*)(pHdr) : NULL)")
|
---|
255 |
|
---|
256 | cpp_quote("#define MFP_GET_PLAY_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, PLAY )")
|
---|
257 | cpp_quote("#define MFP_GET_PAUSE_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, PAUSE )")
|
---|
258 | cpp_quote("#define MFP_GET_STOP_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, STOP )")
|
---|
259 | cpp_quote("#define MFP_GET_POSITION_SET_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, POSITION_SET )")
|
---|
260 | cpp_quote("#define MFP_GET_RATE_SET_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, RATE_SET )")
|
---|
261 | cpp_quote("#define MFP_GET_MEDIAITEM_CREATED_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, MEDIAITEM_CREATED )")
|
---|
262 | cpp_quote("#define MFP_GET_MEDIAITEM_SET_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, MEDIAITEM_SET )")
|
---|
263 | cpp_quote("#define MFP_GET_FRAME_STEP_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, FRAME_STEP )")
|
---|
264 | cpp_quote("#define MFP_GET_MEDIAITEM_CLEARED_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, MEDIAITEM_CLEARED )")
|
---|
265 | cpp_quote("#define MFP_GET_MF_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, MF )")
|
---|
266 | cpp_quote("#define MFP_GET_ERROR_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, ERROR )")
|
---|
267 | cpp_quote("#define MFP_GET_PLAYBACK_ENDED_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, PLAYBACK_ENDED )")
|
---|
268 | cpp_quote("#define MFP_GET_ACQUIRE_USER_CREDENTIAL_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, ACQUIRE_USER_CREDENTIAL )")
|
---|
269 |
|
---|
270 | cpp_quote("")
|
---|
271 | [local, object, uuid(766C8FFB-5FDB-4fea-A28D-B912996F51BD),]
|
---|
272 | interface IMFPMediaPlayerCallback : IUnknown {
|
---|
273 | void OnMediaPlayerEvent([in] MFP_EVENT_HEADER * pEventHeader);
|
---|
274 | };
|
---|
275 | cpp_quote("#endif // (WINVER >= _WIN32_WINNT_WIN7)")
|
---|