source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/mfplay.idl@ 1172

Last change on this file since 1172 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 10.6 KB
Line 
1cpp_quote("/**")
2cpp_quote(" * This file is part of the mingw-w64 runtime package.")
3cpp_quote(" * No warranty is given; refer to the file DISCLAIMER within this package.")
4cpp_quote(" */")
5cpp_quote("")
6
7import "unknwn.idl";
8import "propsys.idl";
9import "mfidl.idl";
10import "evr.idl";
11
12cpp_quote("#if (WINVER >= _WIN32_WINNT_WIN7)")
13interface IMFPMediaPlayer;
14interface IMFPMediaItem;
15interface IMFPMediaPlayerCallback;
16interface IMFMediaEvent;
17interface IMFNetCredential;
18cpp_quote("")
19cpp_quote("interface IMFMediaEvent;")
20cpp_quote("interface IMFNetCredential;")
21
22cpp_quote("")
23typedef UINT32 MFP_CREATION_OPTIONS;
24cpp_quote("")
25typedef [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
32cpp_quote("")
33typedef [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
41cpp_quote("")
42typedef UINT32 MFP_MEDIAITEM_CHARACTERISTICS;
43cpp_quote("")
44typedef [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
51cpp_quote("")
52typedef UINT32 MFP_CREDENTIAL_FLAGS;
53cpp_quote("")
54typedef [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
63cpp_quote("STDAPI MFPCreateMediaPlayer(LPCWSTR pwszURL, BOOL fStartPlayback, MFP_CREATION_OPTIONS creationOptions, IMFPMediaPlayerCallback * pCallback, HWND hWnd, IMFPMediaPlayer ** ppMediaPlayer);")
64
65cpp_quote("")
66[local, object, uuid(A714590A-58AF-430a-85BF-44F5EC838D85),]
67interface 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
106cpp_quote("EXTERN_GUID( MFP_POSITIONTYPE_100NS, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 );")
107cpp_quote("")
108[local, object, uuid(90EB3E6B-ECBF-45cc-B1DA-C6FE3EA70D57),]
109interface 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
131cpp_quote("")
132typedef 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}
147MFP_EVENT_TYPE;
148
149cpp_quote("")
150typedef 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
159cpp_quote("")
160typedef struct MFP_PLAY_EVENT {
161 MFP_EVENT_HEADER header;
162 IMFPMediaItem * pMediaItem;
163} MFP_PLAY_EVENT;
164
165
166cpp_quote("")
167typedef struct MFP_PAUSE_EVENT {
168 MFP_EVENT_HEADER header;
169 IMFPMediaItem * pMediaItem;
170} MFP_PAUSE_EVENT;
171
172cpp_quote("")
173typedef struct MFP_STOP_EVENT {
174 MFP_EVENT_HEADER header;
175 IMFPMediaItem * pMediaItem;
176} MFP_STOP_EVENT;
177
178cpp_quote("")
179typedef struct MFP_POSITION_SET_EVENT {
180 MFP_EVENT_HEADER header;
181 IMFPMediaItem * pMediaItem;
182} MFP_POSITION_SET_EVENT;
183
184cpp_quote("")
185typedef struct MFP_RATE_SET_EVENT {
186 MFP_EVENT_HEADER header;
187 IMFPMediaItem * pMediaItem;
188 float flRate;
189} MFP_RATE_SET_EVENT;
190
191cpp_quote("")
192typedef struct MFP_MEDIAITEM_CREATED_EVENT {
193 MFP_EVENT_HEADER header;
194 IMFPMediaItem * pMediaItem;
195 DWORD_PTR dwUserData;
196} MFP_MEDIAITEM_CREATED_EVENT;
197
198cpp_quote("")
199typedef struct MFP_MEDIAITEM_SET_EVENT {
200 MFP_EVENT_HEADER header;
201 IMFPMediaItem * pMediaItem;
202} MFP_MEDIAITEM_SET_EVENT;
203
204cpp_quote("")
205typedef struct MFP_FRAME_STEP_EVENT {
206 MFP_EVENT_HEADER header;
207 IMFPMediaItem * pMediaItem;
208} MFP_FRAME_STEP_EVENT;
209
210cpp_quote("")
211typedef struct MFP_MEDIAITEM_CLEARED_EVENT {
212 MFP_EVENT_HEADER header;
213 IMFPMediaItem * pMediaItem;
214} MFP_MEDIAITEM_CLEARED_EVENT;
215
216cpp_quote("")
217typedef struct MFP_MF_EVENT {
218 MFP_EVENT_HEADER header;
219 MediaEventType MFEventType;
220 IMFMediaEvent * pMFMediaEvent;
221 IMFPMediaItem * pMediaItem;
222} MFP_MF_EVENT;
223
224cpp_quote("")
225typedef struct MFP_ERROR_EVENT {
226 MFP_EVENT_HEADER header;
227} MFP_ERROR_EVENT;
228
229cpp_quote("")
230typedef struct MFP_PLAYBACK_ENDED_EVENT {
231 MFP_EVENT_HEADER header;
232 IMFPMediaItem * pMediaItem;
233} MFP_PLAYBACK_ENDED_EVENT;
234
235cpp_quote("")
236typedef 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
250cpp_quote("EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFP_PKEY_StreamIndex = { { 0xa7cf9740, 0xe8d9, 0x4a87, { 0xbd, 0x8e, 0x29, 0x67, 0x0, 0x1f, 0xd3, 0xad } }, 0x00 };")
251
252cpp_quote("EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFP_PKEY_StreamRenderingResults = { { 0xa7cf9740, 0xe8d9, 0x4a87, { 0xbd, 0x8e, 0x29, 0x67, 0x0, 0x1f, 0xd3, 0xad } }, 0x01 };")
253
254cpp_quote("#define __MFP_CAST_EVENT( pHdr, Tag ) (((pHdr)->eEventType == MFP_EVENT_TYPE_##Tag ) ? (MFP_##Tag##_EVENT*)(pHdr) : NULL)")
255
256cpp_quote("#define MFP_GET_PLAY_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, PLAY )")
257cpp_quote("#define MFP_GET_PAUSE_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, PAUSE )")
258cpp_quote("#define MFP_GET_STOP_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, STOP )")
259cpp_quote("#define MFP_GET_POSITION_SET_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, POSITION_SET )")
260cpp_quote("#define MFP_GET_RATE_SET_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, RATE_SET )")
261cpp_quote("#define MFP_GET_MEDIAITEM_CREATED_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, MEDIAITEM_CREATED )")
262cpp_quote("#define MFP_GET_MEDIAITEM_SET_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, MEDIAITEM_SET )")
263cpp_quote("#define MFP_GET_FRAME_STEP_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, FRAME_STEP )")
264cpp_quote("#define MFP_GET_MEDIAITEM_CLEARED_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, MEDIAITEM_CLEARED )")
265cpp_quote("#define MFP_GET_MF_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, MF )")
266cpp_quote("#define MFP_GET_ERROR_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, ERROR )")
267cpp_quote("#define MFP_GET_PLAYBACK_ENDED_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, PLAYBACK_ENDED )")
268cpp_quote("#define MFP_GET_ACQUIRE_USER_CREDENTIAL_EVENT( pHdr ) __MFP_CAST_EVENT( pHdr, ACQUIRE_USER_CREDENTIAL )")
269
270cpp_quote("")
271[local, object, uuid(766C8FFB-5FDB-4fea-A28D-B912996F51BD),]
272interface IMFPMediaPlayerCallback : IUnknown {
273 void OnMediaPlayerEvent([in] MFP_EVENT_HEADER * pEventHeader);
274};
275cpp_quote("#endif // (WINVER >= _WIN32_WINNT_WIN7)")
Note: See TracBrowser for help on using the repository browser.