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
;
113 typedef enum WMT_VERSION
115 WMT_VER_4_0
= 0x00040000,
116 WMT_VER_7_0
= 0x00070000,
117 WMT_VER_8_0
= 0x00080000,
118 WMT_VER_9_0
= 0x00090000
121 typedef LPCWSTR LPCWSTR_WMSDK_TYPE_SAFE
;
125 uuid(6d7cdc70
-9888-11d3
-8edc
-00c04f6109cf
),
126 pointer_default(unique),
129 interface IWMStatusCallback
: IUnknown
132 [in] WMT_STATUS Status
,
134 [in] WMT_ATTR_DATATYPE dwType
,
136 [in] void *pvContext
);
141 uuid(96406bd8
-2b2b
-11d3
-b36b
-00c04f6108ff
),
142 pointer_default(unique),
145 interface IWMReaderCallback
: IWMStatusCallback
148 [in] DWORD dwOutputNum
,
149 [in] QWORD cnsSampleTime
,
150 [in] QWORD cnsSampleDuration
,
152 [in] INSSBuffer
*pSample
,
153 [in] void *pvContext
);
158 uuid(96406Bdd
-2b2b
-11d3
-b36b
-00c04f6108ff
),
159 pointer_default(unique),
162 interface IWMStreamList
: IUnknown
165 [out, size_is(*pcStreams
)] WORD
*pwStreamNumArray
,
166 [in, out] WORD
*pcStreams
);
168 HRESULT AddStream
([in] WORD wStreamNum
);
169 HRESULT RemoveStream
([in] WORD wStreamNum
);
174 uuid(96406Bde
-2b2b
-11d3
-b36b
-00c04f6108ff
),
175 pointer_default(unique),
178 interface IWMMutualExclusion
: IWMStreamList
180 HRESULT GetType
([out] GUID
*pguidType
);
181 HRESULT SetType
([in] REFGUID guidType
);
186 uuid(96406Bdc
-2b2b
-11d3
-b36b
-00c04f6108ff
),
187 pointer_default(unique),
190 interface IWMStreamConfig
: IUnknown
192 HRESULT GetStreamType
([out] GUID
*pguidStreamType
);
193 HRESULT GetStreamNumber
([out] WORD
*pwStreamNum
);
194 HRESULT SetStreamNumber
([in] WORD wStreamNum
);
196 HRESULT GetStreamName
(
197 [out, size_is(*pcchStreamName
)] WCHAR
*pwszStreamName
,
198 [in, out] WORD
*pcchStreamName
);
200 HRESULT SetStreamName
([in] LPCWSTR_WMSDK_TYPE_SAFE pwszStreamName
);
202 HRESULT GetConnectionName
(
203 [out, size_is(*pcchInputName
)] WCHAR
*pwszInputName
,
204 [in, out] WORD
*pcchInputName
);
206 HRESULT SetConnectionName
([in] LPCWSTR_WMSDK_TYPE_SAFE pwszInputName
);
207 HRESULT GetBitrate
([out] DWORD
*pdwBitrate
);
208 HRESULT SetBitrate
([in] DWORD pdwBitrate
);
209 HRESULT GetBufferWindow
([out] DWORD
*pmsBufferWindow
);
210 HRESULT SetBufferWindow
([in] DWORD msBufferWindow
);
215 uuid(96406bdb
-2b2b
-11d3
-b36b
-00c04f6108ff
),
216 pointer_default(unique),
219 interface IWMProfile
: IUnknown
222 [out] WMT_VERSION
*pdwVersion
);
225 [out, size_is(*pcchName
)] WCHAR
*pwszName
,
226 [in, out] DWORD
*pcchName
);
229 [in] const WCHAR
*pwszName
);
231 HRESULT GetDescription
(
232 [out, size_is(*pcchDescription
)] WCHAR
*pwszDescription
,
233 [in, out] DWORD
*pcchDescription
);
235 HRESULT SetDescription
(
236 [in] const WCHAR
*pwszDescription
);
238 HRESULT GetStreamCount
(
239 [out] DWORD
*pcStreams
);
242 [in] DWORD dwStreamIndex
,
243 [out] IWMStreamConfig
**ppConfig
);
245 HRESULT GetStreamByNumber
(
246 [in] WORD wStreamNum
,
247 [out] IWMStreamConfig
**ppConfig
);
249 HRESULT RemoveStream
(
250 [in] IWMStreamConfig
*pConfig
);
252 HRESULT RemoveStreamByNumber
(
253 [in] WORD wStreamNum
);
256 [in] IWMStreamConfig
*pConfig
);
258 HRESULT ReconfigStream
(
259 [in] IWMStreamConfig
*pConfig
);
261 HRESULT CreateNewStream
(
262 [in] REFGUID guidStreamType
,
263 [out] IWMStreamConfig
**ppConfig
);
265 HRESULT GetMutualExclusionCount
(
268 HRESULT GetMutualExclusion
(
269 [in] DWORD dwMEIndex
,
270 [out] IWMMutualExclusion
**ppME
);
272 HRESULT RemoveMutualExclusion
(
273 [in] IWMMutualExclusion
*pME
);
275 HRESULT AddMutualExclusion
(
276 [in] IWMMutualExclusion
*pME
);
278 HRESULT CreateNewMutualExclusion
(
279 [out] IWMMutualExclusion
**ppME
);
284 uuid(d16679f2
-6ca0
-472d
-8d31
-2f5d55aee155
),
285 pointer_default(unique),
288 interface IWMProfileManager
: IUnknown
290 HRESULT CreateEmptyProfile
(
291 [in] WMT_VERSION dwVersion
,
292 [out] IWMProfile
**ppProfile
);
294 HRESULT LoadProfileByID
(
295 [in] REFGUID guidProfile
,
296 [out] IWMProfile
**ppProfile
);
298 HRESULT LoadProfileByData
(
299 [in] const WCHAR
*pwszProfile
,
300 [out] IWMProfile
**ppProfile
);
303 [in] IWMProfile
*pIWMProfile
,
304 [in] WCHAR
*pwszProfile
,
305 [in, out] DWORD
*pdwLength
);
307 HRESULT GetSystemProfileCount
(
308 [out] DWORD
*pcProfiles
);
310 HRESULT LoadSystemProfile
(
311 [in] DWORD dwProfileIndex
,
312 [out] IWMProfile
**ppProfile
);
315 cpp_quote
("HRESULT WINAPI WMCreateProfileManager(IWMProfileManager**);")
319 uuid(96406bce
-2b2b
-11d3
-b36b
-00c04f6108ff
),
320 pointer_default(unique),
323 interface IWMMediaProps
: IUnknown
326 [out] GUID
*pguidType
);
328 HRESULT GetMediaType
(
329 [out] WM_MEDIA_TYPE
*pType
,
330 [in, out] DWORD
*pcbType
);
332 HRESULT SetMediaType
(
333 [in] WM_MEDIA_TYPE
*pType
);
338 uuid(96406bd7
-2b2b
-11d3
-b36b
-00c04f6108ff
),
339 pointer_default(unique),
342 interface IWMOutputMediaProps
: IWMMediaProps
344 HRESULT GetStreamGroupName
(
345 [out, size_is(*pcchName
)] WCHAR
*pwszName
,
346 [in, out] WORD
*pcchName
);
348 HRESULT GetConnectionName
(
349 [out, size_is(*pcchName
)] WCHAR
*pwszName
,
350 [in, out] WORD
*pcchName
);
355 uuid(96406bd9
-2b2b
-11d3
-b36b
-00c04f6108ff
),
356 pointer_default(unique),
359 interface IWMMetadataEditor
: IUnknown
362 [in] const WCHAR
*pwszFilename
);
371 uuid(96406bd6
-2b2b
-11d3
-b36b
-00c04f6108ff
),
372 pointer_default(unique),
375 interface IWMReader
: IUnknown
378 [in] const WCHAR
*pwszURL
,
379 [in] IWMReaderCallback
*pCallback
,
380 [in] void *pvContext
);
384 HRESULT GetOutputCount
(
385 [out] DWORD
*pcOutputs
);
387 HRESULT GetOutputProps
(
388 [in] DWORD dwOutputNum
,
389 [out] IWMOutputMediaProps
**ppOutput
);
391 HRESULT SetOutputProps
(
392 [in] DWORD dwOutputNum
,
393 [in] IWMOutputMediaProps
*pOutput
);
395 HRESULT GetOutputFormatCount
(
396 [in] DWORD dwOutputNumber
,
397 [out] DWORD
*pcFormats
);
399 HRESULT GetOutputFormat
(
400 [in] DWORD dwOutputNumber
,
401 [in] DWORD dwFormatNumber
,
402 [out] IWMOutputMediaProps
** ppProps
);
406 [in] QWORD cnsDuration
,
408 [in] void *pvContext
);
419 uuid(9397f121
-7705-4dc9
-b049
-98b698188414
),
420 pointer_default( unique ),
423 interface IWMSyncReader
: IUnknown
426 [in] const WCHAR
*pwszFilename
);
431 [in] QWORD cnsStartTime
,
432 [in] LONGLONG cnsDuration
);
434 HRESULT SetRangeByFrame
(
435 [in] WORD wStreamNum
,
436 [in] QWORD qwFrameNumber
,
437 [in] LONGLONG cFramesToRead
);
439 HRESULT GetNextSample
(
440 [in] WORD wStreamNum
,
441 [out] INSSBuffer
**ppSample
,
442 [out] QWORD
*pcnsSampleTime
,
443 [out] QWORD
*pcnsDuration
,
444 [out] DWORD
*pdwFlags
,
445 [out] DWORD
*pdwOutputNum
,
446 [out] WORD
*pwStreamNum
);
448 HRESULT SetStreamsSelected
(
449 [in] WORD cStreamCount
,
450 [in] WORD
*pwStreamNumbers
,
451 [in] WMT_STREAM_SELECTION
*pSelections
);
453 HRESULT GetStreamSelected
(
454 [in] WORD wStreamNum
,
455 [out] WMT_STREAM_SELECTION
*pSelection
);
457 HRESULT SetReadStreamSamples
(
458 [in] WORD wStreamNum
,
459 [in] BOOL fCompressed
);
461 HRESULT GetReadStreamSamples
(
462 [in] WORD wStreamNum
,
463 [out] BOOL
*pfCompressed
);
465 HRESULT GetOutputSetting
(
466 [in] DWORD dwOutputNum
,
467 [in] LPCWSTR pszName
,
468 [out] WMT_ATTR_DATATYPE
*pType
,
469 [out, size_is(*pcbLength
)] BYTE *pValue
,
470 [in, out] WORD
*pcbLength
);
472 HRESULT SetOutputSetting
(
473 [in] DWORD dwOutputNum
,
474 [in] LPCWSTR pszName
,
475 [in] WMT_ATTR_DATATYPE Type
,
476 [in, size_is(cbLength
)] const BYTE *pValue
,
479 HRESULT GetOutputCount
(
480 [out] DWORD
*pcOutputs
);
482 HRESULT GetOutputProps
(
483 [in] DWORD dwOutputNum
,
484 [out] IWMOutputMediaProps
**ppOutput
);
486 HRESULT SetOutputProps
(
487 [in] DWORD dwOutputNum
,
488 [in] IWMOutputMediaProps
*pOutput
);
490 HRESULT GetOutputFormatCount
(
491 [in] DWORD dwOutputNum
,
492 [out] DWORD
*pcFormats
);
494 HRESULT GetOutputFormat
(
495 [in] DWORD dwOutputNum
,
496 [in] DWORD dwFormatNum
,
497 [out] IWMOutputMediaProps
**ppProps
);
499 HRESULT GetOutputNumberForStream
(
500 [in] WORD wStreamNum
,
501 [out] DWORD
*pdwOutputNum
);
503 HRESULT GetStreamNumberForOutput
(
504 [in] DWORD dwOutputNum
,
505 [out] WORD
*pwStreamNum
);
507 HRESULT GetMaxOutputSampleSize
(
509 [out] DWORD
*pcbMax
);
511 HRESULT GetMaxStreamSampleSize
(
513 [out] DWORD
*pcbMax
);
516 [in] IStream
*pStream
);
519 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_Base, 0x00000000,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
520 cpp_quote
("EXTERN_GUID(WMMEDIATYPE_Video, 0x73646976,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
521 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB1, 0xe436eb78,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
522 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB4, 0xe436eb79,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
523 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB8, 0xe436eb7a,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
524 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB565, 0xe436eb7b,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
525 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB555, 0xe436eb7c,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
526 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB24, 0xe436eb7d,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
527 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB32, 0xe436eb7e,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
528 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_I420, 0x30323449,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
529 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_IYUV, 0x56555949,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
530 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_YV12, 0x32315659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
531 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_YUY2, 0x32595559,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
532 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_P422, 0x32323450,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
533 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_UYVY, 0x59565955,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
534 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_YVYU, 0x55595659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
535 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_YVU9, 0x39555659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
536 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_VIDEOIMAGE, 0x1d4a45f2,0xe5f6,0x4b44,0x83,0x88,0xf0,0xae,0x5c,0x0e,0x0c,0x37);")
537 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_MP43, 0x3334504d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
538 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_MP4S, 0x5334504d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
539 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_M4S2, 0x3253344d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
540 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMV1, 0x31564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
541 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMV2, 0x32564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
542 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_MSS1, 0x3153534d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
543 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_MPEG2_VIDEO, 0xe06d8026,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);")
544 cpp_quote
("EXTERN_GUID(WMMEDIATYPE_Audio, 0x73647561,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
545 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_PCM, 0x00000001,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
546 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_DRM, 0x00000009,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
547 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMAudioV9, 0x00000162,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
548 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMAudio_Lossless, 0x00000163,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
549 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_MSS2, 0x3253534d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
550 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMSP1, 0x0000000a,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
551 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMSP2, 0x0000000b,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
552 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMV3, 0x33564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
553 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMVP, 0x50564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
554 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WVP2, 0x32505657,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
555 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMVA, 0x41564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
556 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WVC1, 0x31435657,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")