2 * Copyright 2012 André Hentschel
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 import "wmsbuffer.idl";
21 /* import "drmexternals.idl"; */
23 typedef unsigned __int64 QWORD;
25 typedef struct _WMMediaType
29 BOOL bFixedSizeSamples;
30 BOOL bTemporalCompression;
35 [size_is(cbFormat)] BYTE *pbFormat;
38 typedef enum WMT_ATTR_DATATYPE
49 typedef enum WMT_STATUS
53 WMT_BUFFERING_START = 2,
54 WMT_BUFFERING_STOP = 3,
57 WMT_END_OF_SEGMENT = 5,
58 WMT_END_OF_STREAMING = 6,
62 WMT_MISSING_CODEC = 10,
68 WMT_INDEX_PROGRESS = 16,
69 WMT_SAVEAS_START = 17,
71 WMT_NEW_SOURCEFLAGS = 19,
72 WMT_NEW_METADATA = 20,
73 WMT_BACKUPRESTORE_BEGIN = 21,
74 WMT_SOURCE_SWITCH = 22,
75 WMT_ACQUIRE_LICENSE = 23,
76 WMT_INDIVIDUALIZE = 24,
77 WMT_NEEDS_INDIVIDUALIZATION = 25,
78 WMT_NO_RIGHTS_EX = 26,
79 WMT_BACKUPRESTORE_END = 27,
80 WMT_BACKUPRESTORE_CONNECTING = 28,
81 WMT_BACKUPRESTORE_DISCONNECTING = 29,
82 WMT_ERROR_WITHURL = 30,
83 WMT_RESTRICTED_LICENSE = 31,
84 WMT_CLIENT_CONNECT = 32,
85 WMT_CLIENT_DISCONNECT = 33,
86 WMT_NATIVE_OUTPUT_PROPS_CHANGED = 34,
87 WMT_RECONNECT_START = 35,
88 WMT_RECONNECT_END = 36,
89 WMT_CLIENT_CONNECT_EX = 37,
90 WMT_CLIENT_DISCONNECT_EX = 38,
91 WMT_SET_FEC_SPAN = 39,
92 WMT_PREROLL_READY = 40,
93 WMT_PREROLL_COMPLETE = 41,
94 WMT_CLIENT_PROPERTIES = 42,
95 WMT_LICENSEURL_SIGNATURE_STATE = 43,
96 WMT_INIT_PLAYLIST_BURN = 44,
97 WMT_TRANSCRYPTOR_INIT = 45,
98 WMT_TRANSCRYPTOR_SEEKED = 46,
99 WMT_TRANSCRYPTOR_READ = 47,
100 WMT_TRANSCRYPTOR_CLOSED = 48,
101 WMT_PROXIMITY_RESULT = 49,
102 WMT_PROXIMITY_COMPLETED = 50,
103 WMT_CONTENT_ENABLER = 51
106 typedef enum WMT_STREAM_SELECTION
109 WMT_CLEANPOINT_ONLY = 1,
111 } WMT_STREAM_SELECTION;
116 uuid(6d7cdc70-9888-11d3-8edc-00c04f6109cf),
117 pointer_default(unique),
120 interface IWMStatusCallback : IUnknown
123 [in] WMT_STATUS Status,
125 [in] WMT_ATTR_DATATYPE dwType,
127 [in] void *pvContext);
132 uuid(96406bd8-2b2b-11d3-b36b-00c04f6108ff),
133 pointer_default(unique),
136 interface IWMReaderCallback : IWMStatusCallback
139 [in] DWORD dwOutputNum,
140 [in] QWORD cnsSampleTime,
141 [in] QWORD cnsSampleDuration,
143 [in] INSSBuffer *pSample,
144 [in] void *pvContext);
149 uuid(96406bce-2b2b-11d3-b36b-00c04f6108ff),
150 pointer_default(unique),
153 interface IWMMediaProps : IUnknown
156 [out] GUID *pguidType);
158 HRESULT GetMediaType(
159 [out] WM_MEDIA_TYPE *pType,
160 [in, out] DWORD *pcbType);
162 HRESULT SetMediaType(
163 [in] WM_MEDIA_TYPE *pType);
168 uuid(96406bd7-2b2b-11d3-b36b-00c04f6108ff),
169 pointer_default(unique),
172 interface IWMOutputMediaProps : IWMMediaProps
174 HRESULT GetStreamGroupName(
175 [out, size_is(*pcchName)] WCHAR *pwszName,
176 [in, out] WORD *pcchName);
178 HRESULT GetConnectionName(
179 [out, size_is(*pcchName)] WCHAR *pwszName,
180 [in, out] WORD *pcchName);
185 uuid(96406bd9-2b2b-11d3-b36b-00c04f6108ff),
186 pointer_default(unique),
189 interface IWMMetadataEditor : IUnknown
192 [in] const WCHAR *pwszFilename);
201 uuid(96406bd6-2b2b-11d3-b36b-00c04f6108ff),
202 pointer_default(unique),
205 interface IWMReader : IUnknown
208 [in] const WCHAR *pwszURL,
209 [in] IWMReaderCallback *pCallback,
210 [in] void *pvContext);
214 HRESULT GetOutputCount(
215 [out] DWORD *pcOutputs);
217 HRESULT GetOutputProps(
218 [in] DWORD dwOutputNum,
219 [out] IWMOutputMediaProps **ppOutput);
221 HRESULT SetOutputProps(
222 [in] DWORD dwOutputNum,
223 [in] IWMOutputMediaProps *pOutput);
225 HRESULT GetOutputFormatCount(
226 [in] DWORD dwOutputNumber,
227 [out] DWORD *pcFormats);
229 HRESULT GetOutputFormat(
230 [in] DWORD dwOutputNumber,
231 [in] DWORD dwFormatNumber,
232 [out] IWMOutputMediaProps** ppProps);
236 [in] QWORD cnsDuration,
238 [in] void *pvContext);
249 uuid(9397f121-7705-4dc9-b049-98b698188414),
250 pointer_default( unique ),
253 interface IWMSyncReader : IUnknown
256 [in] const WCHAR *pwszFilename);
261 [in] QWORD cnsStartTime,
262 [in] LONGLONG cnsDuration);
264 HRESULT SetRangeByFrame(
265 [in] WORD wStreamNum,
266 [in] QWORD qwFrameNumber,
267 [in] LONGLONG cFramesToRead);
269 HRESULT GetNextSample(
270 [in] WORD wStreamNum,
271 [out] INSSBuffer **ppSample,
272 [out] QWORD *pcnsSampleTime,
273 [out] QWORD *pcnsDuration,
274 [out] DWORD *pdwFlags,
275 [out] DWORD *pdwOutputNum,
276 [out] WORD *pwStreamNum);
278 HRESULT SetStreamsSelected(
279 [in] WORD cStreamCount,
280 [in] WORD *pwStreamNumbers,
281 [in] WMT_STREAM_SELECTION *pSelections);
283 HRESULT GetStreamSelected(
284 [in] WORD wStreamNum,
285 [out] WMT_STREAM_SELECTION *pSelection);
287 HRESULT SetReadStreamSamples(
288 [in] WORD wStreamNum,
289 [in] BOOL fCompressed);
291 HRESULT GetReadStreamSamples(
292 [in] WORD wStreamNum,
293 [out] BOOL *pfCompressed);
295 HRESULT GetOutputSetting(
296 [in] DWORD dwOutputNum,
297 [in] LPCWSTR pszName,
298 [out] WMT_ATTR_DATATYPE *pType,
299 [out, size_is(*pcbLength)] BYTE *pValue,
300 [in, out] WORD *pcbLength);
302 HRESULT SetOutputSetting(
303 [in] DWORD dwOutputNum,
304 [in] LPCWSTR pszName,
305 [in] WMT_ATTR_DATATYPE Type,
306 [in, size_is(cbLength)] const BYTE *pValue,
309 HRESULT GetOutputCount(
310 [out] DWORD *pcOutputs);
312 HRESULT GetOutputProps(
313 [in] DWORD dwOutputNum,
314 [out] IWMOutputMediaProps **ppOutput);
316 HRESULT SetOutputProps(
317 [in] DWORD dwOutputNum,
318 [in] IWMOutputMediaProps *pOutput);
320 HRESULT GetOutputFormatCount(
321 [in] DWORD dwOutputNum,
322 [out] DWORD *pcFormats);
324 HRESULT GetOutputFormat(
325 [in] DWORD dwOutputNum,
326 [in] DWORD dwFormatNum,
327 [out] IWMOutputMediaProps **ppProps);
329 HRESULT GetOutputNumberForStream(
330 [in] WORD wStreamNum,
331 [out] DWORD *pdwOutputNum);
333 HRESULT GetStreamNumberForOutput(
334 [in] DWORD dwOutputNum,
335 [out] WORD *pwStreamNum);
337 HRESULT GetMaxOutputSampleSize(
339 [out] DWORD *pcbMax);
341 HRESULT GetMaxStreamSampleSize(
343 [out] DWORD *pcbMax);
346 [in] IStream *pStream);