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(96406bd6
-2b2b
-11d3
-b36b
-00c04f6108ff
),
186 pointer_default(unique),
189 interface IWMReader
: IUnknown
192 [in] const WCHAR
*pwszURL
,
193 [in] IWMReaderCallback
*pCallback
,
194 [in] void *pvContext
);
198 HRESULT GetOutputCount
(
199 [out] DWORD
*pcOutputs
);
201 HRESULT GetOutputProps
(
202 [in] DWORD dwOutputNum
,
203 [out] IWMOutputMediaProps
**ppOutput
);
205 HRESULT SetOutputProps
(
206 [in] DWORD dwOutputNum
,
207 [in] IWMOutputMediaProps
*pOutput
);
209 HRESULT GetOutputFormatCount
(
210 [in] DWORD dwOutputNumber
,
211 [out] DWORD
*pcFormats
);
213 HRESULT GetOutputFormat
(
214 [in] DWORD dwOutputNumber
,
215 [in] DWORD dwFormatNumber
,
216 [out] IWMOutputMediaProps
** ppProps
);
220 [in] QWORD cnsDuration
,
222 [in] void *pvContext
);
233 uuid(9397f121
-7705-4dc9
-b049
-98b698188414
),
234 pointer_default( unique ),
237 interface IWMSyncReader
: IUnknown
240 [in] const WCHAR
*pwszFilename
);
245 [in] QWORD cnsStartTime
,
246 [in] LONGLONG cnsDuration
);
248 HRESULT SetRangeByFrame
(
249 [in] WORD wStreamNum
,
250 [in] QWORD qwFrameNumber
,
251 [in] LONGLONG cFramesToRead
);
253 HRESULT GetNextSample
(
254 [in] WORD wStreamNum
,
255 [out] INSSBuffer
**ppSample
,
256 [out] QWORD
*pcnsSampleTime
,
257 [out] QWORD
*pcnsDuration
,
258 [out] DWORD
*pdwFlags
,
259 [out] DWORD
*pdwOutputNum
,
260 [out] WORD
*pwStreamNum
);
262 HRESULT SetStreamsSelected
(
263 [in] WORD cStreamCount
,
264 [in] WORD
*pwStreamNumbers
,
265 [in] WMT_STREAM_SELECTION
*pSelections
);
267 HRESULT GetStreamSelected
(
268 [in] WORD wStreamNum
,
269 [out] WMT_STREAM_SELECTION
*pSelection
);
271 HRESULT SetReadStreamSamples
(
272 [in] WORD wStreamNum
,
273 [in] BOOL fCompressed
);
275 HRESULT GetReadStreamSamples
(
276 [in] WORD wStreamNum
,
277 [out] BOOL
*pfCompressed
);
279 HRESULT GetOutputSetting
(
280 [in] DWORD dwOutputNum
,
281 [in] LPCWSTR pszName
,
282 [out] WMT_ATTR_DATATYPE
*pType
,
283 [out, size_is(*pcbLength
)] BYTE *pValue
,
284 [in, out] WORD
*pcbLength
);
286 HRESULT SetOutputSetting
(
287 [in] DWORD dwOutputNum
,
288 [in] LPCWSTR pszName
,
289 [in] WMT_ATTR_DATATYPE Type
,
290 [in, size_is(cbLength
)] const BYTE *pValue
,
293 HRESULT GetOutputCount
(
294 [out] DWORD
*pcOutputs
);
296 HRESULT GetOutputProps
(
297 [in] DWORD dwOutputNum
,
298 [out] IWMOutputMediaProps
**ppOutput
);
300 HRESULT SetOutputProps
(
301 [in] DWORD dwOutputNum
,
302 [in] IWMOutputMediaProps
*pOutput
);
304 HRESULT GetOutputFormatCount
(
305 [in] DWORD dwOutputNum
,
306 [out] DWORD
*pcFormats
);
308 HRESULT GetOutputFormat
(
309 [in] DWORD dwOutputNum
,
310 [in] DWORD dwFormatNum
,
311 [out] IWMOutputMediaProps
**ppProps
);
313 HRESULT GetOutputNumberForStream
(
314 [in] WORD wStreamNum
,
315 [out] DWORD
*pdwOutputNum
);
317 HRESULT GetStreamNumberForOutput
(
318 [in] DWORD dwOutputNum
,
319 [out] WORD
*pwStreamNum
);
321 HRESULT GetMaxOutputSampleSize
(
323 [out] DWORD
*pcbMax
);
325 HRESULT GetMaxStreamSampleSize
(
327 [out] DWORD
*pcbMax
);
330 [in] IStream
*pStream
);