[PSDK] Add missing BCRYPT_HASH_HANDLE.
[reactos.git] / reactos / include / psdk / wmsdkidl.idl
1 /*
2 * Copyright 2012 André Hentschel
3 *
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.
8 *
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.
13 *
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
17 */
18
19 import "oaidl.idl";
20 import "wmsbuffer.idl";
21 /* import "drmexternals.idl"; */
22
23 typedef unsigned __int64 QWORD;
24
25 typedef struct _WMMediaType
26 {
27 GUID majortype;
28 GUID subtype;
29 BOOL bFixedSizeSamples;
30 BOOL bTemporalCompression;
31 ULONG lSampleSize;
32 GUID formattype;
33 IUnknown *pUnk;
34 ULONG cbFormat;
35 [size_is(cbFormat)] BYTE *pbFormat;
36 } WM_MEDIA_TYPE;
37
38 typedef struct _WMWriterStatistics
39 {
40 QWORD qwSampleCount;
41 QWORD qwByteCount;
42 QWORD qwDroppedSampleCount;
43 QWORD qwDroppedByteCount;
44 DWORD dwCurrentBitrate;
45 DWORD dwAverageBitrate;
46 DWORD dwExpectedBitrate;
47 DWORD dwCurrentSampleRate;
48 DWORD dwAverageSampleRate;
49 DWORD dwExpectedSampleRate;
50 } WM_WRITER_STATISTICS;
51
52 typedef struct _WMWriterStatisticsEx
53 {
54 DWORD dwBitratePlusOverhead;
55 DWORD dwCurrentSampleDropRateInQueue;
56 DWORD dwCurrentSampleDropRateInCodec;
57 DWORD dwCurrentSampleDropRateInMultiplexer;
58 DWORD dwTotalSampleDropsInQueue;
59 DWORD dwTotalSampleDropsInCodec;
60 DWORD dwTotalSampleDropsInMultiplexer;
61 } WM_WRITER_STATISTICS_EX;
62
63 typedef struct _WMReaderStatistics
64 {
65 DWORD cbSize;
66 DWORD dwBandwidth;
67 DWORD cPacketsReceived;
68 DWORD cPacketsRecovered;
69 DWORD cPacketsLost;
70 WORD wQuality;
71 } WM_READER_STATISTICS;
72
73 typedef struct _WMReaderClientInfo
74 {
75 DWORD cbSize;
76 WCHAR *wszLang;
77 WCHAR *wszBrowserUserAgent;
78 WCHAR *wszBrowserWebPage;
79 QWORD qwReserved;
80 LPARAM *pReserved;
81 WCHAR *wszHostExe;
82 QWORD qwHostVersion;
83 WCHAR *wszPlayerUserAgent;
84 } WM_READER_CLIENTINFO;
85
86 typedef enum WMT_ATTR_DATATYPE
87 {
88 WMT_TYPE_DWORD = 0,
89 WMT_TYPE_STRING = 1,
90 WMT_TYPE_BINARY = 2,
91 WMT_TYPE_BOOL = 3,
92 WMT_TYPE_QWORD = 4,
93 WMT_TYPE_WORD = 5,
94 WMT_TYPE_GUID = 6,
95 } WMT_ATTR_DATATYPE;
96
97 typedef enum WMT_STATUS
98 {
99 WMT_ERROR = 0,
100 WMT_OPENED = 1,
101 WMT_BUFFERING_START = 2,
102 WMT_BUFFERING_STOP = 3,
103 WMT_EOF = 4,
104 WMT_END_OF_FILE = 4,
105 WMT_END_OF_SEGMENT = 5,
106 WMT_END_OF_STREAMING = 6,
107 WMT_LOCATING = 7,
108 WMT_CONNECTING = 8,
109 WMT_NO_RIGHTS = 9,
110 WMT_MISSING_CODEC = 10,
111 WMT_STARTED = 11,
112 WMT_STOPPED = 12,
113 WMT_CLOSED = 13,
114 WMT_STRIDING = 14,
115 WMT_TIMER = 15,
116 WMT_INDEX_PROGRESS = 16,
117 WMT_SAVEAS_START = 17,
118 WMT_SAVEAS_STOP = 18,
119 WMT_NEW_SOURCEFLAGS = 19,
120 WMT_NEW_METADATA = 20,
121 WMT_BACKUPRESTORE_BEGIN = 21,
122 WMT_SOURCE_SWITCH = 22,
123 WMT_ACQUIRE_LICENSE = 23,
124 WMT_INDIVIDUALIZE = 24,
125 WMT_NEEDS_INDIVIDUALIZATION = 25,
126 WMT_NO_RIGHTS_EX = 26,
127 WMT_BACKUPRESTORE_END = 27,
128 WMT_BACKUPRESTORE_CONNECTING = 28,
129 WMT_BACKUPRESTORE_DISCONNECTING = 29,
130 WMT_ERROR_WITHURL = 30,
131 WMT_RESTRICTED_LICENSE = 31,
132 WMT_CLIENT_CONNECT = 32,
133 WMT_CLIENT_DISCONNECT = 33,
134 WMT_NATIVE_OUTPUT_PROPS_CHANGED = 34,
135 WMT_RECONNECT_START = 35,
136 WMT_RECONNECT_END = 36,
137 WMT_CLIENT_CONNECT_EX = 37,
138 WMT_CLIENT_DISCONNECT_EX = 38,
139 WMT_SET_FEC_SPAN = 39,
140 WMT_PREROLL_READY = 40,
141 WMT_PREROLL_COMPLETE = 41,
142 WMT_CLIENT_PROPERTIES = 42,
143 WMT_LICENSEURL_SIGNATURE_STATE = 43,
144 WMT_INIT_PLAYLIST_BURN = 44,
145 WMT_TRANSCRYPTOR_INIT = 45,
146 WMT_TRANSCRYPTOR_SEEKED = 46,
147 WMT_TRANSCRYPTOR_READ = 47,
148 WMT_TRANSCRYPTOR_CLOSED = 48,
149 WMT_PROXIMITY_RESULT = 49,
150 WMT_PROXIMITY_COMPLETED = 50,
151 WMT_CONTENT_ENABLER = 51
152 } WMT_STATUS;
153
154 typedef enum WMT_STREAM_SELECTION
155 {
156 WMT_OFF = 0,
157 WMT_CLEANPOINT_ONLY = 1,
158 WMT_ON = 2,
159 } WMT_STREAM_SELECTION;
160
161 typedef enum WMT_VERSION
162 {
163 WMT_VER_4_0 = 0x00040000,
164 WMT_VER_7_0 = 0x00070000,
165 WMT_VER_8_0 = 0x00080000,
166 WMT_VER_9_0 = 0x00090000
167 } WMT_VERSION;
168
169 typedef enum WMT_PLAY_MODE
170 {
171 WMT_PLAY_MODE_AUTOSELECT,
172 WMT_PLAY_MODE_LOCAL,
173 WMT_PLAY_MODE_DOWNLOAD,
174 WMT_PLAY_MODE_STREAMING
175 } WMT_PLAY_MODE;
176
177 typedef enum tagWMT_OFFSET_FORMAT
178 {
179 WMT_OFFSET_FORMAT_100NS,
180 WMT_OFFSET_FORMAT_FRAME_NUMBERS,
181 WMT_OFFSET_FORMAT_PLAYLIST_OFFSET,
182 WMT_OFFSET_FORMAT_TIMECODE,
183 WMT_OFFSET_FORMAT_100NS_APPROXIMATE
184 } WMT_OFFSET_FORMAT;
185
186 typedef LPCWSTR LPCWSTR_WMSDK_TYPE_SAFE;
187
188 [
189 object,
190 uuid(6d7cdc70-9888-11d3-8edc-00c04f6109cf),
191 pointer_default(unique),
192 local
193 ]
194 interface IWMStatusCallback : IUnknown
195 {
196 HRESULT OnStatus(
197 [in] WMT_STATUS Status,
198 [in] HRESULT hr,
199 [in] WMT_ATTR_DATATYPE dwType,
200 [in] BYTE *pValue,
201 [in] void *pvContext);
202 };
203
204 [
205 object,
206 uuid(96406bd8-2b2b-11d3-b36b-00c04f6108ff),
207 pointer_default(unique),
208 local
209 ]
210 interface IWMReaderCallback : IWMStatusCallback
211 {
212 HRESULT OnSample(
213 [in] DWORD dwOutputNum,
214 [in] QWORD cnsSampleTime,
215 [in] QWORD cnsSampleDuration,
216 [in] DWORD dwFlags,
217 [in] INSSBuffer *pSample,
218 [in] void *pvContext);
219 };
220
221 [
222 object,
223 uuid(96406Bdd-2b2b-11d3-b36b-00c04f6108ff),
224 pointer_default(unique),
225 local
226 ]
227 interface IWMStreamList : IUnknown
228 {
229 HRESULT GetStreams(
230 [out, size_is(*pcStreams)] WORD *pwStreamNumArray,
231 [in, out] WORD *pcStreams);
232
233 HRESULT AddStream([in] WORD wStreamNum);
234 HRESULT RemoveStream([in] WORD wStreamNum);
235 }
236
237 [
238 object,
239 uuid(96406Bde-2b2b-11d3-b36b-00c04f6108ff),
240 pointer_default(unique),
241 local
242 ]
243 interface IWMMutualExclusion : IWMStreamList
244 {
245 HRESULT GetType([out] GUID *pguidType);
246 HRESULT SetType([in] REFGUID guidType);
247 }
248
249 [
250 object,
251 uuid(96406Bdc-2b2b-11d3-b36b-00c04f6108ff),
252 pointer_default(unique),
253 local
254 ]
255 interface IWMStreamConfig : IUnknown
256 {
257 HRESULT GetStreamType([out] GUID *pguidStreamType);
258 HRESULT GetStreamNumber([out] WORD *pwStreamNum);
259 HRESULT SetStreamNumber([in] WORD wStreamNum);
260
261 HRESULT GetStreamName(
262 [out, size_is(*pcchStreamName)] WCHAR *pwszStreamName,
263 [in, out] WORD *pcchStreamName);
264
265 HRESULT SetStreamName([in] LPCWSTR_WMSDK_TYPE_SAFE pwszStreamName);
266
267 HRESULT GetConnectionName(
268 [out, size_is(*pcchInputName)] WCHAR *pwszInputName,
269 [in, out] WORD *pcchInputName);
270
271 HRESULT SetConnectionName([in] LPCWSTR_WMSDK_TYPE_SAFE pwszInputName);
272 HRESULT GetBitrate([out] DWORD *pdwBitrate);
273 HRESULT SetBitrate([in] DWORD pdwBitrate);
274 HRESULT GetBufferWindow([out] DWORD *pmsBufferWindow);
275 HRESULT SetBufferWindow([in] DWORD msBufferWindow);
276 }
277
278 [
279 object,
280 uuid(96406bdb-2b2b-11d3-b36b-00c04f6108ff),
281 pointer_default(unique),
282 local
283 ]
284 interface IWMProfile : IUnknown
285 {
286 HRESULT GetVersion(
287 [out] WMT_VERSION *pdwVersion);
288
289 HRESULT GetName(
290 [out, size_is(*pcchName)] WCHAR *pwszName,
291 [in, out] DWORD *pcchName);
292
293 HRESULT SetName(
294 [in] const WCHAR *pwszName);
295
296 HRESULT GetDescription(
297 [out, size_is(*pcchDescription)] WCHAR *pwszDescription,
298 [in, out] DWORD *pcchDescription);
299
300 HRESULT SetDescription(
301 [in] const WCHAR *pwszDescription);
302
303 HRESULT GetStreamCount(
304 [out] DWORD *pcStreams);
305
306 HRESULT GetStream(
307 [in] DWORD dwStreamIndex,
308 [out] IWMStreamConfig **ppConfig);
309
310 HRESULT GetStreamByNumber(
311 [in] WORD wStreamNum,
312 [out] IWMStreamConfig **ppConfig);
313
314 HRESULT RemoveStream(
315 [in] IWMStreamConfig *pConfig);
316
317 HRESULT RemoveStreamByNumber(
318 [in] WORD wStreamNum);
319
320 HRESULT AddStream(
321 [in] IWMStreamConfig *pConfig);
322
323 HRESULT ReconfigStream(
324 [in] IWMStreamConfig *pConfig);
325
326 HRESULT CreateNewStream(
327 [in] REFGUID guidStreamType,
328 [out] IWMStreamConfig **ppConfig);
329
330 HRESULT GetMutualExclusionCount(
331 [out] DWORD *pcME);
332
333 HRESULT GetMutualExclusion(
334 [in] DWORD dwMEIndex,
335 [out] IWMMutualExclusion **ppME);
336
337 HRESULT RemoveMutualExclusion(
338 [in] IWMMutualExclusion *pME);
339
340 HRESULT AddMutualExclusion(
341 [in] IWMMutualExclusion *pME);
342
343 HRESULT CreateNewMutualExclusion(
344 [out] IWMMutualExclusion **ppME);
345 }
346
347 [
348 object,
349 uuid(d16679f2-6ca0-472d-8d31-2f5d55aee155),
350 pointer_default(unique),
351 local
352 ]
353 interface IWMProfileManager : IUnknown
354 {
355 HRESULT CreateEmptyProfile(
356 [in] WMT_VERSION dwVersion,
357 [out] IWMProfile **ppProfile);
358
359 HRESULT LoadProfileByID(
360 [in] REFGUID guidProfile,
361 [out] IWMProfile **ppProfile);
362
363 HRESULT LoadProfileByData(
364 [in] const WCHAR *pwszProfile,
365 [out] IWMProfile **ppProfile);
366
367 HRESULT SaveProfile(
368 [in] IWMProfile *pIWMProfile,
369 [in] WCHAR *pwszProfile,
370 [in, out] DWORD *pdwLength);
371
372 HRESULT GetSystemProfileCount(
373 [out] DWORD *pcProfiles);
374
375 HRESULT LoadSystemProfile(
376 [in] DWORD dwProfileIndex,
377 [out] IWMProfile **ppProfile);
378 }
379
380 cpp_quote("HRESULT WINAPI WMCreateProfileManager(IWMProfileManager**);")
381
382 [
383 object,
384 uuid(96406bce-2b2b-11d3-b36b-00c04f6108ff),
385 pointer_default(unique),
386 local
387 ]
388 interface IWMMediaProps : IUnknown
389 {
390 HRESULT GetType(
391 [out] GUID *pguidType);
392
393 HRESULT GetMediaType(
394 [out] WM_MEDIA_TYPE *pType,
395 [in, out] DWORD *pcbType);
396
397 HRESULT SetMediaType(
398 [in] WM_MEDIA_TYPE *pType);
399 };
400
401 [
402 object,
403 uuid(96406bd7-2b2b-11d3-b36b-00c04f6108ff),
404 pointer_default(unique),
405 local
406 ]
407 interface IWMOutputMediaProps : IWMMediaProps
408 {
409 HRESULT GetStreamGroupName(
410 [out, size_is(*pcchName)] WCHAR *pwszName,
411 [in, out] WORD *pcchName);
412
413 HRESULT GetConnectionName(
414 [out, size_is(*pcchName)] WCHAR *pwszName,
415 [in, out] WORD *pcchName);
416 };
417
418 [
419 object,
420 uuid(96406bd9-2b2b-11d3-b36b-00c04f6108ff),
421 pointer_default(unique),
422 local
423 ]
424 interface IWMMetadataEditor : IUnknown
425 {
426 HRESULT Open(
427 [in] const WCHAR *pwszFilename);
428
429 HRESULT Close();
430
431 HRESULT Flush();
432 };
433
434 [
435 object,
436 uuid(96406bd6-2b2b-11d3-b36b-00c04f6108ff),
437 pointer_default(unique),
438 local
439 ]
440 interface IWMReader : IUnknown
441 {
442 HRESULT Open(
443 [in] const WCHAR *pwszURL,
444 [in] IWMReaderCallback *pCallback,
445 [in] void *pvContext);
446
447 HRESULT Close();
448
449 HRESULT GetOutputCount(
450 [out] DWORD *pcOutputs);
451
452 HRESULT GetOutputProps(
453 [in] DWORD dwOutputNum,
454 [out] IWMOutputMediaProps **ppOutput);
455
456 HRESULT SetOutputProps(
457 [in] DWORD dwOutputNum,
458 [in] IWMOutputMediaProps *pOutput);
459
460 HRESULT GetOutputFormatCount(
461 [in] DWORD dwOutputNumber,
462 [out] DWORD *pcFormats);
463
464 HRESULT GetOutputFormat(
465 [in] DWORD dwOutputNumber,
466 [in] DWORD dwFormatNumber,
467 [out] IWMOutputMediaProps** ppProps);
468
469 HRESULT Start(
470 [in] QWORD cnsStart,
471 [in] QWORD cnsDuration,
472 [in] float fRate,
473 [in] void *pvContext);
474
475 HRESULT Stop();
476
477 HRESULT Pause();
478
479 HRESULT Resume();
480 };
481
482 [
483 object,
484 uuid(e5b7ca9a-0f1c-4f66-9002-74ec50d8b304),
485 pointer_default(unique),
486 local
487 ]
488 interface IWMPlayerHook : IUnknown
489 {
490 HRESULT PreDecode();
491 }
492
493 [
494 object,
495 uuid(96406bea-2b2b-11d3-b36b-00c04f6108ff),
496 pointer_default(unique),
497 local
498 ]
499 interface IWMReaderAdvanced : IUnknown
500 {
501 HRESULT SetUserProvidedClock(
502 [in] BOOL fUserClock);
503
504 HRESULT GetUserProvidedClock(
505 [out] BOOL *pfUserClock);
506
507 HRESULT DeliverTime(
508 [in] QWORD cnsTime);
509
510 HRESULT SetManualStreamSelection(
511 [in] BOOL fSelection);
512
513 HRESULT GetManualStreamSelection(
514 [out] BOOL *pfSelection);
515
516 HRESULT SetStreamsSelected(
517 [in] WORD cStreamCount,
518 [in] WORD *pwStreamNumbers,
519 [in] WMT_STREAM_SELECTION *pSelections);
520
521 HRESULT GetStreamSelected(
522 [in] WORD wStreamNum,
523 [out] WMT_STREAM_SELECTION *pSelection);
524
525 HRESULT SetReceiveSelectionCallbacks(
526 [in] BOOL fGetCallbacks);
527
528 HRESULT GetReceiveSelectionCallbacks(
529 [out] BOOL *pfGetCallbacks);
530
531 HRESULT SetReceiveStreamSamples(
532 [in] WORD wStreamNum,
533 [in] BOOL fReceiveStreamSamples);
534
535 HRESULT GetReceiveStreamSamples(
536 [in] WORD wStreamNum,
537 [out] BOOL *pfReceiveStreamSamples);
538
539 HRESULT SetAllocateForOutput(
540 [in] DWORD dwOutputNum,
541 [in] BOOL fAllocate);
542
543 HRESULT GetAllocateForOutput(
544 [in] DWORD dwOutputNum,
545 [out] BOOL *pfAllocate);
546
547 HRESULT SetAllocateForStream(
548 [in] WORD wStreamNum,
549 [in] BOOL fAllocate);
550
551 HRESULT GetAllocateForStream(
552 [in] WORD dwSreamNum,
553 [out] BOOL *pfAllocate);
554
555 HRESULT GetStatistics(
556 [in, out] WM_READER_STATISTICS *pStatistics);
557
558 HRESULT SetClientInfo(
559 [in] WM_READER_CLIENTINFO *pClientInfo);
560
561 HRESULT GetMaxOutputSampleSize(
562 [in] DWORD dwOutput,
563 [out] DWORD *pcbMax);
564
565 HRESULT GetMaxStreamSampleSize(
566 [in] WORD wStream,
567 [out] DWORD *pcbMax);
568
569 HRESULT NotifyLateDelivery(
570 QWORD cnsLateness);
571 }
572
573 [
574 object,
575 uuid(ae14a945-b90c-4d0d-9127-80d665f7d73e),
576 pointer_default(unique),
577 local
578 ]
579 interface IWMReaderAdvanced2 : IWMReaderAdvanced
580 {
581 HRESULT SetPlayMode(
582 [in] WMT_PLAY_MODE Mode);
583
584 HRESULT GetPlayMode(
585 [out] WMT_PLAY_MODE *pMode);
586
587 HRESULT GetBufferProgress(
588 [out] DWORD *pdwPercent,
589 [out] QWORD *pcnsBuffering);
590
591 HRESULT GetDownloadProgress(
592 [out] DWORD *pdwPercent,
593 [out] QWORD *pqwBytesDownloaded,
594 [out] QWORD *pcnsDownload);
595
596 HRESULT GetSaveAsProgress(
597 [out] DWORD *pdwPercent);
598
599 HRESULT SaveFileAs(
600 [in] const WCHAR *pwszFilename);
601
602 HRESULT GetProtocolName(
603 [out, size_is(*pcchProtocol)] WCHAR *pwszProtocol,
604 [in, out] DWORD *pcchProtocol);
605
606 HRESULT StartAtMarker(
607 [in] WORD wMarkerIndex,
608 [in] QWORD cnsDuration,
609 [in] float fRate,
610 [in] void *pvContext);
611
612 HRESULT GetOutputSetting(
613 [in] DWORD dwOutputNum,
614 [in] LPCWSTR pszName,
615 [out] WMT_ATTR_DATATYPE *pType,
616 [out, size_is(*pcbLength)] BYTE *pValue,
617 [in, out] WORD *pcbLength);
618
619 HRESULT SetOutputSetting(
620 [in] DWORD dwOutputNum,
621 [in] LPCWSTR pszName,
622 [in] WMT_ATTR_DATATYPE Type,
623 [in, size_is(cbLength)] const BYTE *pValue,
624 [in] WORD cbLength);
625
626 HRESULT Preroll(
627 [in] QWORD cnsStart,
628 [in] QWORD cnsDuration,
629 [in] float fRate);
630
631 HRESULT SetLogClientID(
632 [in] BOOL fLogClientID);
633
634 HRESULT GetLogClientID(
635 [out] BOOL *pfLogClientID);
636
637 HRESULT StopBuffering();
638
639 HRESULT OpenStream(
640 [in] IStream *pStream,
641 [in] IWMReaderCallback *pCallback,
642 [in] void *pvContext);
643 }
644
645 [
646 object,
647 uuid(5dc0674b-f04B-4a4e-9f2a-b1afde2c8100),
648 pointer_default(unique),
649 local
650 ]
651 interface IWMReaderAdvanced3 : IWMReaderAdvanced2
652 {
653 HRESULT StopNetStreaming();
654
655 HRESULT StartAtPosition(
656 [in] WORD wStreamNum,
657 [in] void *pvOffsetStart,
658 [in] void *pvDuration,
659 [in] WMT_OFFSET_FORMAT dwOffsetFormat,
660 [in] float fRate,
661 [in] void *pvContext);
662 }
663
664 [
665 object,
666 uuid(945a76a2-12ae-4d48-bd3c-cd1d90399b85),
667 pointer_default(unique),
668 local
669 ]
670 interface IWMReaderAdvanced4 : IWMReaderAdvanced3
671 {
672 HRESULT GetLanguageCount(
673 [in] DWORD dwOutputNum,
674 [out] WORD *pwLanguageCount);
675
676 HRESULT GetLanguage(
677 [in] DWORD dwOutputNum,
678 [in] WORD wLanguage,
679 [out, size_is(*pcchLanguageStringLength)] WCHAR *pwszLanguageString,
680 [in, out] WORD *pcchLanguageStringLength);
681
682 HRESULT GetMaxSpeedFactor(
683 [out] double *pdblFactor);
684
685 HRESULT IsUsingFastCache(
686 [out] BOOL *pfUsingFastCache);
687
688 HRESULT AddLogParam(
689 [in] LPCWSTR wszNameSpace,
690 [in] LPCWSTR wszName,
691 [in] LPCWSTR wszValue);
692
693 HRESULT SendLogParams();
694
695 HRESULT CanSaveFileAs(
696 [out] BOOL *pfCanSave);
697
698 HRESULT CancelSaveFileAs();
699
700 HRESULT GetURL(
701 [out, size_is(*pcchURL)] WCHAR *pwszURL,
702 [in, out] DWORD *pcchURL);
703 }
704
705 [
706 object,
707 uuid(24c44db0-55d1-49ae-a5cc-f13815e36363),
708 pointer_default(unique),
709 local
710 ]
711 interface IWMReaderAdvanced5 : IWMReaderAdvanced4
712 {
713 HRESULT SetPlayerHook(
714 [in] DWORD dwOutputNum,
715 [in] IWMPlayerHook *pHook);
716 }
717
718 [
719 object,
720 uuid(18a2e7f8-428f-4acd-8a00-e64639bc93de),
721 pointer_default(unique),
722 local
723 ]
724 interface IWMReaderAdvanced6 : IWMReaderAdvanced5
725 {
726 HRESULT SetProtectStreamSamples(
727 [in, size_is(cbCertificate)] BYTE *pbCertificate,
728 [in] DWORD cbCertificate,
729 [in] DWORD dwCertificateType,
730 [in] DWORD dwFlags,
731 [out, size_is(*pcbInitializationVector)] BYTE *pbInitializationVector,
732 [in, out] DWORD *pcbInitializationVector);
733 }
734
735 [
736 object,
737 uuid(9397f121-7705-4dc9-b049-98b698188414),
738 pointer_default( unique ),
739 local
740 ]
741 interface IWMSyncReader : IUnknown
742 {
743 HRESULT Open(
744 [in] const WCHAR *pwszFilename);
745
746 HRESULT Close();
747
748 HRESULT SetRange(
749 [in] QWORD cnsStartTime,
750 [in] LONGLONG cnsDuration);
751
752 HRESULT SetRangeByFrame(
753 [in] WORD wStreamNum,
754 [in] QWORD qwFrameNumber,
755 [in] LONGLONG cFramesToRead);
756
757 HRESULT GetNextSample(
758 [in] WORD wStreamNum,
759 [out] INSSBuffer **ppSample,
760 [out] QWORD *pcnsSampleTime,
761 [out] QWORD *pcnsDuration,
762 [out] DWORD *pdwFlags,
763 [out] DWORD *pdwOutputNum,
764 [out] WORD *pwStreamNum);
765
766 HRESULT SetStreamsSelected(
767 [in] WORD cStreamCount,
768 [in] WORD *pwStreamNumbers,
769 [in] WMT_STREAM_SELECTION *pSelections);
770
771 HRESULT GetStreamSelected(
772 [in] WORD wStreamNum,
773 [out] WMT_STREAM_SELECTION *pSelection);
774
775 HRESULT SetReadStreamSamples(
776 [in] WORD wStreamNum,
777 [in] BOOL fCompressed);
778
779 HRESULT GetReadStreamSamples(
780 [in] WORD wStreamNum,
781 [out] BOOL *pfCompressed);
782
783 HRESULT GetOutputSetting(
784 [in] DWORD dwOutputNum,
785 [in] LPCWSTR pszName,
786 [out] WMT_ATTR_DATATYPE *pType,
787 [out, size_is(*pcbLength)] BYTE *pValue,
788 [in, out] WORD *pcbLength);
789
790 HRESULT SetOutputSetting(
791 [in] DWORD dwOutputNum,
792 [in] LPCWSTR pszName,
793 [in] WMT_ATTR_DATATYPE Type,
794 [in, size_is(cbLength)] const BYTE *pValue,
795 [in] WORD cbLength);
796
797 HRESULT GetOutputCount(
798 [out] DWORD *pcOutputs);
799
800 HRESULT GetOutputProps(
801 [in] DWORD dwOutputNum,
802 [out] IWMOutputMediaProps **ppOutput);
803
804 HRESULT SetOutputProps(
805 [in] DWORD dwOutputNum,
806 [in] IWMOutputMediaProps *pOutput);
807
808 HRESULT GetOutputFormatCount(
809 [in] DWORD dwOutputNum,
810 [out] DWORD *pcFormats);
811
812 HRESULT GetOutputFormat(
813 [in] DWORD dwOutputNum,
814 [in] DWORD dwFormatNum,
815 [out] IWMOutputMediaProps **ppProps);
816
817 HRESULT GetOutputNumberForStream(
818 [in] WORD wStreamNum,
819 [out] DWORD *pdwOutputNum);
820
821 HRESULT GetStreamNumberForOutput(
822 [in] DWORD dwOutputNum,
823 [out] WORD *pwStreamNum);
824
825 HRESULT GetMaxOutputSampleSize(
826 [in] DWORD dwOutput,
827 [out] DWORD *pcbMax);
828
829 HRESULT GetMaxStreamSampleSize(
830 [in] WORD wStream,
831 [out] DWORD *pcbMax);
832
833 HRESULT OpenStream(
834 [in] IStream *pStream);
835 };
836
837 [
838 object,
839 uuid(96406bd5-2b2b-11d3-b36b-00c04f6108ff),
840 pointer_default(unique),
841 local
842 ]
843 interface IWMInputMediaProps : IWMMediaProps
844 {
845 HRESULT GetConnectionName(
846 [out, size_is(*pcchName)] WCHAR *pwszName,
847 [in, out] WORD *pcchName);
848
849 HRESULT GetGroupName(
850 [out, size_is(*pcchName)] WCHAR *pwszName,
851 [in, out] WORD *pcchName);
852 }
853
854 [
855 object,
856 uuid(96406be4-2b2b-11d3-b36b-00c04f6108ff),
857 pointer_default(unique),
858 local
859 ]
860 interface IWMWriterSink : IUnknown
861 {
862 HRESULT OnHeader(
863 [in] INSSBuffer *pHeader);
864
865 HRESULT IsRealTime(
866 [out] BOOL *pfRealTime);
867
868 HRESULT AllocateDataUnit(
869 [in] DWORD cbDataUnit,
870 [out] INSSBuffer **ppDataUnit);
871
872 HRESULT OnDataUnit(
873 [in] INSSBuffer *pDataUnit);
874
875 HRESULT OnEndWriting();
876 }
877
878 [
879 object,
880 uuid(96406bd4-2b2b-11d3-b36b-00c04f6108ff),
881 pointer_default(unique),
882 local
883 ]
884 interface IWMWriter : IUnknown
885 {
886 HRESULT SetProfileByID(
887 [in] REFGUID guidProfile);
888
889 HRESULT SetProfile(
890 [in] IWMProfile *pProfile);
891
892 HRESULT SetOutputFilename(
893 [in] const WCHAR *pwszFilename);
894
895 HRESULT GetInputCount(
896 [out] DWORD *pcInputs);
897
898 HRESULT GetInputProps(
899 [in] DWORD dwInputNum,
900 [out] IWMInputMediaProps **ppInput);
901
902 HRESULT SetInputProps(
903 [in] DWORD dwInputNum,
904 [in] IWMInputMediaProps *pInput);
905
906 HRESULT GetInputFormatCount(
907 [in] DWORD dwInputNumber,
908 [out] DWORD *pcFormats);
909
910 HRESULT GetInputFormat(
911 [in] DWORD dwInputNumber,
912 [in] DWORD dwFormatNumber,
913 [out] IWMInputMediaProps **pProps);
914
915 HRESULT BeginWriting();
916
917 HRESULT EndWriting();
918
919 HRESULT AllocateSample(
920 [in] DWORD dwSampleSize,
921 [out] INSSBuffer **ppSample);
922
923 HRESULT WriteSample(
924 [in] DWORD dwInputNum,
925 [in] QWORD cnsSampleTime,
926 [in] DWORD dwFlags,
927 [in] INSSBuffer *pSample);
928
929 HRESULT Flush();
930 }
931
932 [
933 object,
934 uuid(96406be3-2b2b-11d3-b36b-00C04f6108ff),
935 pointer_default(unique),
936 local
937 ]
938 interface IWMWriterAdvanced : IUnknown
939 {
940 HRESULT GetSinkCount(
941 [out] DWORD *pcSinks);
942
943 HRESULT GetSink(
944 [in] DWORD dwSinkNum,
945 [out] IWMWriterSink **ppSink);
946
947 HRESULT AddSink(
948 [in] IWMWriterSink *pSink);
949
950 HRESULT RemoveSink(
951 [in] IWMWriterSink *pSink);
952
953 HRESULT WriteStreamSample(
954 [in] WORD wStreamNum,
955 [in] QWORD cnsSampleTime,
956 [in] DWORD msSampleSendTime,
957 [in] QWORD cnsSampleDuration,
958 [in] DWORD dwFlags,
959 [in] INSSBuffer *pSample);
960
961 HRESULT SetLiveSource(
962 BOOL fIsLiveSource);
963
964 HRESULT IsRealTime(
965 [out] BOOL *pfRealTime);
966
967 HRESULT GetWriterTime(
968 [out] QWORD *pCurrentTime);
969
970 HRESULT GetStatistics(
971 [in] WORD wStreamNum,
972 [out] WM_WRITER_STATISTICS *pStats);
973
974 HRESULT SetSyncTolerance(
975 [in] DWORD msWindow);
976
977 HRESULT GetSyncTolerance(
978 [out] DWORD *pmsWindow);
979 }
980
981 [
982 object,
983 uuid(962dc1ec-c046-4db8-9cc7-26ceae500817),
984 pointer_default(unique),
985 local
986 ]
987 interface IWMWriterAdvanced2 : IWMWriterAdvanced
988 {
989 HRESULT GetInputSetting(
990 [in] DWORD dwInputNum,
991 [in] LPCWSTR pszName,
992 [out] WMT_ATTR_DATATYPE *pType,
993 [out, size_is(*pcbLength)] BYTE *pValue,
994 [in, out] WORD *pcbLength);
995
996 HRESULT SetInputSetting(
997 [in] DWORD dwInputNum,
998 [in] LPCWSTR pszName,
999 [in] WMT_ATTR_DATATYPE Type,
1000 [in, size_is(cbLength)] const BYTE *pValue,
1001 [in] WORD cbLength);
1002 }
1003
1004 [
1005 object,
1006 uuid(2cd6492d-7c37-4e76-9d3b-59261183a22e),
1007 pointer_default(unique),
1008 local
1009 ]
1010 interface IWMWriterAdvanced3 : IWMWriterAdvanced2
1011 {
1012 HRESULT GetStatisticsEx(
1013 [in] WORD wStreamNum,
1014 [out] WM_WRITER_STATISTICS_EX *pStats);
1015
1016 HRESULT SetNonBlocking();
1017 }
1018
1019 cpp_quote("HRESULT WINAPI WMCreateWriter(IUnknown*,IWMWriter**);")
1020 cpp_quote("HRESULT WINAPI WMCreateReader(IUnknown*,DWORD,IWMReader**);")
1021
1022 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_Base, 0x00000000,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1023 cpp_quote("EXTERN_GUID(WMMEDIATYPE_Video, 0x73646976,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1024 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB1, 0xe436eb78,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1025 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB4, 0xe436eb79,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1026 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB8, 0xe436eb7a,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1027 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB565, 0xe436eb7b,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1028 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB555, 0xe436eb7c,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1029 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB24, 0xe436eb7d,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1030 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB32, 0xe436eb7e,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1031 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_I420, 0x30323449,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1032 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_IYUV, 0x56555949,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1033 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_YV12, 0x32315659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1034 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_YUY2, 0x32595559,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1035 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_P422, 0x32323450,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1036 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_UYVY, 0x59565955,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1037 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_YVYU, 0x55595659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1038 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_YVU9, 0x39555659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1039 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_VIDEOIMAGE, 0x1d4a45f2,0xe5f6,0x4b44,0x83,0x88,0xf0,0xae,0x5c,0x0e,0x0c,0x37);")
1040 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_MP43, 0x3334504d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1041 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_MP4S, 0x5334504d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1042 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_M4S2, 0x3253344d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1043 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMV1, 0x31564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1044 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMV2, 0x32564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1045 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_MSS1, 0x3153534d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1046 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_MPEG2_VIDEO, 0xe06d8026,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);")
1047 cpp_quote("EXTERN_GUID(WMMEDIATYPE_Audio, 0x73647561,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1048 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_PCM, 0x00000001,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1049 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_DRM, 0x00000009,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1050 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMAudioV9, 0x00000162,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1051 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMAudio_Lossless, 0x00000163,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1052 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_MSS2, 0x3253534d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1053 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMSP1, 0x0000000a,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1054 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMSP2, 0x0000000b,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1055 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMV3, 0x33564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1056 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMVP, 0x50564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1057 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WVP2, 0x32505657,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1058 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMVA, 0x41564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1059 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WVC1, 0x31435657,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")