xref: /reactos/sdk/include/psdk/wmsdkidl.idl (revision 50cf16b3)
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
19import "oaidl.idl";
20import "wmsbuffer.idl";
21import "drmexternals.idl";
22
23typedef unsigned __int64 QWORD;
24
25typedef 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
38typedef 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
52typedef 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
63typedef 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
73typedef 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
86typedef 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
97typedef 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
154typedef enum WMT_STREAM_SELECTION
155{
156    WMT_OFF               = 0,
157    WMT_CLEANPOINT_ONLY   = 1,
158    WMT_ON                = 2,
159} WMT_STREAM_SELECTION;
160
161typedef 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
169typedef 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
177typedef 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
186typedef enum WMT_CODEC_INFO_TYPE
187{
188    WMT_CODECINFO_AUDIO   = 0,
189    WMT_CODECINFO_VIDEO   = 1,
190    WMT_CODECINFO_UNKNOWN = 0xFFFFFFFF,
191} WMT_CODEC_INFO_TYPE;
192
193typedef enum WMT_PROXY_SETTINGS
194{
195    WMT_PROXY_SETTING_NONE     = 0,
196    WMT_PROXY_SETTING_MANUAL   = 1,
197    WMT_PROXY_SETTING_AUTO     = 2,
198    WMT_PROXY_SETTING_BROWSER  = 3,
199    WMT_PROXY_SETTING_MAX
200} WMT_PROXY_SETTINGS;
201
202typedef enum tagWMT_STORAGE_FORMAT
203{
204    WMT_Storage_Format_MP3  = 0,
205    WMT_Storage_Format_V1   = 1
206} WMT_STORAGE_FORMAT;
207
208#include <pshpack2.h>
209typedef struct _WMStreamPrioritizationRecord
210{
211    WORD wStreamNumber;
212    BOOL fMandatory;
213} WM_STREAM_PRIORITY_RECORD;
214#include <poppack.h>
215
216typedef struct _WM_PORT_NUMBER_RANGE
217{
218    WORD wPortBegin;
219    WORD wPortEnd;
220} WM_PORT_NUMBER_RANGE;
221
222typedef LPCWSTR LPCWSTR_WMSDK_TYPE_SAFE;
223
224[
225    object,
226    uuid(6d7cdc70-9888-11d3-8edc-00c04f6109cf),
227    pointer_default(unique),
228    local
229]
230interface IWMStatusCallback : IUnknown
231{
232    HRESULT OnStatus(
233        [in] WMT_STATUS Status,
234        [in] HRESULT hr,
235        [in] WMT_ATTR_DATATYPE dwType,
236        [in] BYTE *pValue,
237        [in] void *pvContext);
238};
239
240[
241    object,
242    uuid(96406bd8-2b2b-11d3-b36b-00c04f6108ff),
243    pointer_default(unique),
244    local
245]
246interface IWMReaderCallback : IWMStatusCallback
247{
248    HRESULT OnSample(
249        [in] DWORD dwOutputNum,
250        [in] QWORD cnsSampleTime,
251        [in] QWORD cnsSampleDuration,
252        [in] DWORD dwFlags,
253        [in] INSSBuffer *pSample,
254        [in] void *pvContext);
255};
256
257[
258    object,
259    uuid(96406Bdd-2b2b-11d3-b36b-00c04f6108ff),
260    pointer_default(unique),
261    local
262]
263interface IWMStreamList : IUnknown
264{
265    HRESULT GetStreams(
266        [out, size_is(*pcStreams)] WORD *pwStreamNumArray,
267        [in, out] WORD *pcStreams);
268
269    HRESULT AddStream([in] WORD wStreamNum);
270    HRESULT RemoveStream([in] WORD wStreamNum);
271}
272
273[
274    object,
275    uuid(96406Bde-2b2b-11d3-b36b-00c04f6108ff),
276    pointer_default(unique),
277    local
278]
279interface IWMMutualExclusion : IWMStreamList
280{
281    HRESULT GetType([out] GUID *pguidType);
282    HRESULT SetType([in] REFGUID guidType);
283}
284
285[
286    object,
287    uuid(ad694af1-f8d9-42f8-bc47-70311b0c4f9e),
288    pointer_default(unique),
289    local
290]
291interface IWMBandwidthSharing : IWMStreamList
292{
293    HRESULT GetType([out] GUID *guid);
294    HRESULT SetType([in] REFGUID guid);
295
296    HRESULT GetBandwidth(
297        [out] DWORD *bitrate,
298        [out] DWORD *buffer);
299
300    HRESULT SetBandwidth(
301        [in] DWORD bitrate,
302        [in] DWORD buffer);
303};
304
305[
306    object,
307    uuid(8c1c6090-f9a8-4748-8ec3-dd1108ba1e77),
308    pointer_default(unique),
309    local
310]
311interface IWMStreamPrioritization : IUnknown
312{
313    HRESULT GetPriorityRecords(
314        [out] WM_STREAM_PRIORITY_RECORD *array,
315        [in, out] WORD *records);
316
317    HRESULT SetPriorityRecords(
318        [in] WM_STREAM_PRIORITY_RECORD *array,
319        [in] WORD records);
320}
321
322[
323    object,
324    uuid(96406Bdc-2b2b-11d3-b36b-00c04f6108ff),
325    pointer_default(unique),
326    local
327]
328interface IWMStreamConfig : IUnknown
329{
330    HRESULT GetStreamType([out] GUID *pguidStreamType);
331    HRESULT GetStreamNumber([out] WORD *pwStreamNum);
332    HRESULT SetStreamNumber([in] WORD wStreamNum);
333
334    HRESULT GetStreamName(
335        [out, size_is(*pcchStreamName)] WCHAR *pwszStreamName,
336        [in, out] WORD *pcchStreamName);
337
338    HRESULT SetStreamName([in] LPCWSTR_WMSDK_TYPE_SAFE pwszStreamName);
339
340    HRESULT GetConnectionName(
341        [out, size_is(*pcchInputName)] WCHAR *pwszInputName,
342        [in, out] WORD *pcchInputName);
343
344    HRESULT SetConnectionName([in] LPCWSTR_WMSDK_TYPE_SAFE pwszInputName);
345    HRESULT GetBitrate([out] DWORD *pdwBitrate);
346    HRESULT SetBitrate([in] DWORD pdwBitrate);
347    HRESULT GetBufferWindow([out] DWORD *pmsBufferWindow);
348    HRESULT SetBufferWindow([in] DWORD msBufferWindow);
349}
350
351[
352    object,
353    uuid(96406bdb-2b2b-11d3-b36b-00c04f6108ff),
354    pointer_default(unique),
355    local
356]
357interface IWMProfile : IUnknown
358{
359    HRESULT GetVersion(
360        [out] WMT_VERSION *pdwVersion);
361
362    HRESULT GetName(
363        [out, size_is(*pcchName)] WCHAR *pwszName,
364        [in, out] DWORD *pcchName);
365
366    HRESULT SetName(
367        [in] const WCHAR *pwszName);
368
369    HRESULT GetDescription(
370        [out, size_is(*pcchDescription)] WCHAR *pwszDescription,
371        [in, out] DWORD *pcchDescription);
372
373    HRESULT SetDescription(
374        [in] const WCHAR *pwszDescription);
375
376    HRESULT GetStreamCount(
377        [out] DWORD *pcStreams);
378
379    HRESULT GetStream(
380        [in] DWORD dwStreamIndex,
381        [out] IWMStreamConfig **ppConfig);
382
383    HRESULT GetStreamByNumber(
384        [in] WORD wStreamNum,
385        [out] IWMStreamConfig **ppConfig);
386
387    HRESULT RemoveStream(
388        [in] IWMStreamConfig *pConfig);
389
390    HRESULT RemoveStreamByNumber(
391        [in] WORD wStreamNum);
392
393    HRESULT AddStream(
394        [in] IWMStreamConfig *pConfig);
395
396    HRESULT ReconfigStream(
397        [in] IWMStreamConfig *pConfig);
398
399    HRESULT CreateNewStream(
400        [in] REFGUID guidStreamType,
401        [out] IWMStreamConfig **ppConfig);
402
403    HRESULT GetMutualExclusionCount(
404        [out] DWORD *pcME);
405
406    HRESULT GetMutualExclusion(
407        [in] DWORD dwMEIndex,
408        [out] IWMMutualExclusion **ppME);
409
410    HRESULT RemoveMutualExclusion(
411        [in] IWMMutualExclusion *pME);
412
413    HRESULT AddMutualExclusion(
414        [in] IWMMutualExclusion *pME);
415
416    HRESULT CreateNewMutualExclusion(
417        [out] IWMMutualExclusion **ppME);
418}
419
420[
421    object,
422    uuid(07e72d33-d94e-4be7-8843-60ae5ff7e5f5),
423    pointer_default(unique),
424    local
425]
426interface IWMProfile2 : IWMProfile
427{
428    HRESULT GetProfileID([out] GUID *guid);
429}
430
431[
432    object,
433    uuid(00ef96cc-a461-4546-8bcd-c9a28f0e06f5),
434    pointer_default(unique),
435    local
436]
437interface IWMProfile3 : IWMProfile2
438{
439    HRESULT GetStorageFormat([out] WMT_STORAGE_FORMAT *storage);
440    HRESULT SetStorageFormat([in] WMT_STORAGE_FORMAT storage);
441
442    HRESULT GetBandwidthSharingCount([out] DWORD *count);
443
444    HRESULT GetBandwidthSharing(
445        [in] DWORD index,
446        [out] IWMBandwidthSharing **bandwidth);
447
448    HRESULT RemoveBandwidthSharing([in] IWMBandwidthSharing *bandwidth);
449
450    HRESULT AddBandwidthSharing([in] IWMBandwidthSharing *bandwidth);
451
452    HRESULT CreateNewBandwidthSharing([out] IWMBandwidthSharing **bandwidth);
453
454    HRESULT GetStreamPrioritization([out] IWMStreamPrioritization **stream);
455
456    HRESULT SetStreamPrioritization([in] IWMStreamPrioritization *stream);
457
458    HRESULT RemoveStreamPrioritization();
459
460    HRESULT CreateNewStreamPrioritization([out] IWMStreamPrioritization **stream);
461
462    HRESULT GetExpectedPacketCount(
463        [in] QWORD duration,
464        [out] QWORD *packets);
465};
466
467[
468    object,
469    uuid(d16679f2-6ca0-472d-8d31-2f5d55aee155),
470    pointer_default(unique),
471    local
472]
473interface IWMProfileManager : IUnknown
474{
475    HRESULT CreateEmptyProfile(
476        [in] WMT_VERSION dwVersion,
477        [out] IWMProfile **ppProfile);
478
479    HRESULT LoadProfileByID(
480        [in] REFGUID guidProfile,
481        [out] IWMProfile **ppProfile);
482
483    HRESULT LoadProfileByData(
484        [in] const WCHAR *pwszProfile,
485        [out] IWMProfile **ppProfile);
486
487    HRESULT SaveProfile(
488        [in] IWMProfile *pIWMProfile,
489        [in] WCHAR *pwszProfile,
490        [in, out] DWORD *pdwLength);
491
492    HRESULT GetSystemProfileCount(
493        [out] DWORD *pcProfiles);
494
495    HRESULT LoadSystemProfile(
496        [in] DWORD dwProfileIndex,
497        [out] IWMProfile **ppProfile);
498}
499
500cpp_quote("HRESULT WINAPI WMCreateProfileManager(IWMProfileManager**);")
501
502[
503    object,
504    uuid(96406bce-2b2b-11d3-b36b-00c04f6108ff),
505    pointer_default(unique),
506    local
507]
508interface IWMMediaProps : IUnknown
509{
510    HRESULT GetType(
511        [out] GUID *pguidType);
512
513    HRESULT GetMediaType(
514        [out] WM_MEDIA_TYPE *pType,
515        [in, out] DWORD *pcbType);
516
517    HRESULT SetMediaType(
518        [in] WM_MEDIA_TYPE *pType);
519};
520
521[
522    object,
523    uuid(96406bd7-2b2b-11d3-b36b-00c04f6108ff),
524    pointer_default(unique),
525    local
526]
527interface IWMOutputMediaProps : IWMMediaProps
528{
529    HRESULT GetStreamGroupName(
530        [out, size_is(*pcchName)] WCHAR *pwszName,
531        [in, out] WORD *pcchName);
532
533    HRESULT GetConnectionName(
534        [out, size_is(*pcchName)] WCHAR *pwszName,
535        [in, out] WORD *pcchName);
536};
537
538[
539    object,
540    uuid(96406bd9-2b2b-11d3-b36b-00c04f6108ff),
541    pointer_default(unique),
542    local
543]
544interface IWMMetadataEditor : IUnknown
545{
546    HRESULT Open(
547        [in] const WCHAR *pwszFilename);
548
549    HRESULT Close();
550
551    HRESULT Flush();
552};
553
554[
555    object,
556    uuid(96406bd6-2b2b-11d3-b36b-00c04f6108ff),
557    pointer_default(unique),
558    local
559]
560interface IWMReader : IUnknown
561{
562    HRESULT Open(
563        [in] const WCHAR *pwszURL,
564        [in] IWMReaderCallback *pCallback,
565        [in] void *pvContext);
566
567    HRESULT Close();
568
569    HRESULT GetOutputCount(
570        [out] DWORD *pcOutputs);
571
572    HRESULT GetOutputProps(
573        [in] DWORD dwOutputNum,
574        [out] IWMOutputMediaProps **ppOutput);
575
576    HRESULT SetOutputProps(
577        [in] DWORD dwOutputNum,
578        [in] IWMOutputMediaProps *pOutput);
579
580    HRESULT GetOutputFormatCount(
581        [in] DWORD dwOutputNumber,
582        [out] DWORD *pcFormats);
583
584    HRESULT GetOutputFormat(
585        [in] DWORD dwOutputNumber,
586        [in] DWORD dwFormatNumber,
587        [out] IWMOutputMediaProps** ppProps);
588
589    HRESULT Start(
590        [in] QWORD cnsStart,
591        [in] QWORD cnsDuration,
592        [in] float fRate,
593        [in] void *pvContext);
594
595    HRESULT Stop();
596
597    HRESULT Pause();
598
599    HRESULT Resume();
600};
601
602[
603    object,
604    uuid(e5b7ca9a-0f1c-4f66-9002-74ec50d8b304),
605    pointer_default(unique),
606    local
607]
608interface IWMPlayerHook : IUnknown
609{
610    HRESULT PreDecode();
611}
612
613[
614    object,
615    uuid(96406bea-2b2b-11d3-b36b-00c04f6108ff),
616    pointer_default(unique),
617    local
618]
619interface IWMReaderAdvanced : IUnknown
620{
621    HRESULT SetUserProvidedClock(
622        [in] BOOL fUserClock);
623
624    HRESULT GetUserProvidedClock(
625        [out] BOOL *pfUserClock);
626
627    HRESULT DeliverTime(
628        [in] QWORD cnsTime);
629
630    HRESULT SetManualStreamSelection(
631        [in] BOOL fSelection);
632
633    HRESULT GetManualStreamSelection(
634        [out] BOOL *pfSelection);
635
636    HRESULT SetStreamsSelected(
637        [in] WORD cStreamCount,
638        [in] WORD *pwStreamNumbers,
639        [in] WMT_STREAM_SELECTION *pSelections);
640
641    HRESULT GetStreamSelected(
642        [in] WORD wStreamNum,
643        [out] WMT_STREAM_SELECTION *pSelection);
644
645    HRESULT SetReceiveSelectionCallbacks(
646        [in] BOOL fGetCallbacks);
647
648    HRESULT GetReceiveSelectionCallbacks(
649        [out] BOOL *pfGetCallbacks);
650
651    HRESULT SetReceiveStreamSamples(
652        [in] WORD wStreamNum,
653        [in] BOOL fReceiveStreamSamples);
654
655    HRESULT GetReceiveStreamSamples(
656        [in] WORD wStreamNum,
657        [out] BOOL *pfReceiveStreamSamples);
658
659    HRESULT SetAllocateForOutput(
660        [in] DWORD dwOutputNum,
661        [in] BOOL fAllocate);
662
663    HRESULT GetAllocateForOutput(
664        [in] DWORD dwOutputNum,
665        [out] BOOL *pfAllocate);
666
667    HRESULT SetAllocateForStream(
668        [in] WORD wStreamNum,
669        [in] BOOL fAllocate);
670
671    HRESULT GetAllocateForStream(
672        [in] WORD dwStreamNum,
673        [out] BOOL *pfAllocate);
674
675    HRESULT GetStatistics(
676        [in, out] WM_READER_STATISTICS *pStatistics);
677
678    HRESULT SetClientInfo(
679        [in] WM_READER_CLIENTINFO *pClientInfo);
680
681    HRESULT GetMaxOutputSampleSize(
682        [in] DWORD dwOutput,
683        [out] DWORD *pcbMax);
684
685    HRESULT GetMaxStreamSampleSize(
686        [in] WORD wStream,
687        [out] DWORD *pcbMax);
688
689    HRESULT NotifyLateDelivery(
690        QWORD cnsLateness);
691}
692
693[
694    object,
695    uuid(ae14a945-b90c-4d0d-9127-80d665f7d73e),
696    pointer_default(unique),
697    local
698]
699interface IWMReaderAdvanced2 : IWMReaderAdvanced
700{
701    HRESULT SetPlayMode(
702        [in] WMT_PLAY_MODE Mode);
703
704    HRESULT GetPlayMode(
705        [out] WMT_PLAY_MODE *pMode);
706
707    HRESULT GetBufferProgress(
708        [out] DWORD *pdwPercent,
709        [out] QWORD *pcnsBuffering);
710
711    HRESULT GetDownloadProgress(
712        [out] DWORD *pdwPercent,
713        [out] QWORD *pqwBytesDownloaded,
714        [out] QWORD *pcnsDownload);
715
716    HRESULT GetSaveAsProgress(
717        [out] DWORD *pdwPercent);
718
719    HRESULT SaveFileAs(
720        [in] const WCHAR *pwszFilename);
721
722    HRESULT GetProtocolName(
723        [out, size_is(*pcchProtocol)] WCHAR *pwszProtocol,
724        [in, out] DWORD *pcchProtocol);
725
726    HRESULT StartAtMarker(
727        [in] WORD wMarkerIndex,
728        [in] QWORD cnsDuration,
729        [in] float fRate,
730        [in] void *pvContext);
731
732    HRESULT GetOutputSetting(
733        [in] DWORD dwOutputNum,
734        [in] LPCWSTR pszName,
735        [out] WMT_ATTR_DATATYPE *pType,
736        [out, size_is(*pcbLength)] BYTE *pValue,
737        [in, out] WORD *pcbLength);
738
739    HRESULT SetOutputSetting(
740        [in] DWORD dwOutputNum,
741        [in] LPCWSTR pszName,
742        [in] WMT_ATTR_DATATYPE Type,
743        [in, size_is(cbLength)] const BYTE *pValue,
744        [in] WORD cbLength);
745
746    HRESULT Preroll(
747        [in] QWORD cnsStart,
748        [in] QWORD cnsDuration,
749        [in] float fRate);
750
751    HRESULT SetLogClientID(
752        [in] BOOL fLogClientID);
753
754    HRESULT GetLogClientID(
755        [out] BOOL *pfLogClientID);
756
757    HRESULT StopBuffering();
758
759    HRESULT OpenStream(
760        [in] IStream *pStream,
761        [in] IWMReaderCallback *pCallback,
762        [in] void *pvContext);
763}
764
765[
766    object,
767    uuid(5dc0674b-f04B-4a4e-9f2a-b1afde2c8100),
768    pointer_default(unique),
769    local
770]
771interface IWMReaderAdvanced3 : IWMReaderAdvanced2
772{
773    HRESULT StopNetStreaming();
774
775    HRESULT StartAtPosition(
776        [in] WORD wStreamNum,
777        [in] void *pvOffsetStart,
778        [in] void *pvDuration,
779        [in] WMT_OFFSET_FORMAT dwOffsetFormat,
780        [in] float fRate,
781        [in] void *pvContext);
782}
783
784[
785    object,
786    uuid(945a76a2-12ae-4d48-bd3c-cd1d90399b85),
787    pointer_default(unique),
788    local
789]
790interface IWMReaderAdvanced4 : IWMReaderAdvanced3
791{
792    HRESULT GetLanguageCount(
793        [in] DWORD dwOutputNum,
794        [out] WORD *pwLanguageCount);
795
796    HRESULT GetLanguage(
797        [in] DWORD dwOutputNum,
798        [in] WORD wLanguage,
799        [out, size_is(*pcchLanguageStringLength)] WCHAR *pwszLanguageString,
800        [in, out] WORD *pcchLanguageStringLength);
801
802    HRESULT GetMaxSpeedFactor(
803        [out] double *pdblFactor);
804
805    HRESULT IsUsingFastCache(
806        [out] BOOL *pfUsingFastCache);
807
808    HRESULT AddLogParam(
809        [in] LPCWSTR wszNameSpace,
810        [in] LPCWSTR wszName,
811        [in] LPCWSTR wszValue);
812
813    HRESULT SendLogParams();
814
815    HRESULT CanSaveFileAs(
816        [out] BOOL *pfCanSave);
817
818    HRESULT CancelSaveFileAs();
819
820    HRESULT GetURL(
821        [out, size_is(*pcchURL)] WCHAR *pwszURL,
822        [in, out] DWORD *pcchURL);
823}
824
825[
826    object,
827    uuid(24c44db0-55d1-49ae-a5cc-f13815e36363),
828    pointer_default(unique),
829    local
830]
831interface IWMReaderAdvanced5 : IWMReaderAdvanced4
832{
833    HRESULT SetPlayerHook(
834        [in] DWORD dwOutputNum,
835        [in] IWMPlayerHook *pHook);
836}
837
838[
839    object,
840    uuid(18a2e7f8-428f-4acd-8a00-e64639bc93de),
841    pointer_default(unique),
842    local
843]
844interface IWMReaderAdvanced6 : IWMReaderAdvanced5
845{
846    HRESULT SetProtectStreamSamples(
847        [in, size_is(cbCertificate)] BYTE *pbCertificate,
848        [in] DWORD cbCertificate,
849        [in] DWORD dwCertificateType,
850        [in] DWORD dwFlags,
851        [out, size_is(*pcbInitializationVector)] BYTE *pbInitializationVector,
852        [in, out] DWORD *pcbInitializationVector);
853}
854
855[
856    object,
857    uuid(9397f121-7705-4dc9-b049-98b698188414),
858    pointer_default( unique ),
859    local
860]
861interface IWMSyncReader : IUnknown
862{
863    HRESULT Open(
864        [in] const WCHAR *pwszFilename);
865
866    HRESULT Close();
867
868    HRESULT SetRange(
869        [in] QWORD cnsStartTime,
870        [in] LONGLONG cnsDuration);
871
872    HRESULT SetRangeByFrame(
873        [in] WORD wStreamNum,
874        [in] QWORD qwFrameNumber,
875        [in] LONGLONG cFramesToRead);
876
877    HRESULT GetNextSample(
878        [in] WORD wStreamNum,
879        [out] INSSBuffer **ppSample,
880        [out] QWORD *pcnsSampleTime,
881        [out] QWORD *pcnsDuration,
882        [out] DWORD *pdwFlags,
883        [out] DWORD *pdwOutputNum,
884        [out] WORD *pwStreamNum);
885
886    HRESULT SetStreamsSelected(
887        [in] WORD cStreamCount,
888        [in] WORD *pwStreamNumbers,
889        [in] WMT_STREAM_SELECTION *pSelections);
890
891    HRESULT GetStreamSelected(
892        [in] WORD wStreamNum,
893        [out] WMT_STREAM_SELECTION *pSelection);
894
895    HRESULT SetReadStreamSamples(
896        [in] WORD wStreamNum,
897        [in] BOOL fCompressed);
898
899    HRESULT GetReadStreamSamples(
900        [in] WORD wStreamNum,
901        [out] BOOL *pfCompressed);
902
903    HRESULT GetOutputSetting(
904        [in] DWORD dwOutputNum,
905        [in] LPCWSTR pszName,
906        [out] WMT_ATTR_DATATYPE *pType,
907        [out, size_is(*pcbLength)] BYTE *pValue,
908        [in, out] WORD *pcbLength);
909
910    HRESULT SetOutputSetting(
911        [in] DWORD dwOutputNum,
912        [in] LPCWSTR pszName,
913        [in] WMT_ATTR_DATATYPE Type,
914        [in, size_is(cbLength)] const BYTE *pValue,
915        [in] WORD cbLength);
916
917    HRESULT GetOutputCount(
918        [out] DWORD *pcOutputs);
919
920    HRESULT GetOutputProps(
921        [in] DWORD dwOutputNum,
922        [out] IWMOutputMediaProps **ppOutput);
923
924    HRESULT SetOutputProps(
925        [in] DWORD dwOutputNum,
926        [in] IWMOutputMediaProps *pOutput);
927
928    HRESULT GetOutputFormatCount(
929        [in] DWORD dwOutputNum,
930        [out] DWORD *pcFormats);
931
932    HRESULT GetOutputFormat(
933        [in] DWORD dwOutputNum,
934        [in] DWORD dwFormatNum,
935        [out] IWMOutputMediaProps **ppProps);
936
937    HRESULT GetOutputNumberForStream(
938        [in] WORD wStreamNum,
939        [out] DWORD *pdwOutputNum);
940
941    HRESULT GetStreamNumberForOutput(
942        [in] DWORD dwOutputNum,
943        [out] WORD *pwStreamNum);
944
945    HRESULT GetMaxOutputSampleSize(
946        [in] DWORD dwOutput,
947        [out] DWORD *pcbMax);
948
949    HRESULT GetMaxStreamSampleSize(
950        [in] WORD wStream,
951        [out] DWORD *pcbMax);
952
953    HRESULT OpenStream(
954        [in] IStream *pStream);
955};
956
957[
958    object,
959    uuid(96406bd5-2b2b-11d3-b36b-00c04f6108ff),
960    pointer_default(unique),
961    local
962]
963interface IWMInputMediaProps : IWMMediaProps
964{
965    HRESULT GetConnectionName(
966        [out, size_is(*pcchName)] WCHAR *pwszName,
967        [in, out] WORD *pcchName);
968
969    HRESULT GetGroupName(
970        [out, size_is(*pcchName)] WCHAR *pwszName,
971        [in, out] WORD *pcchName);
972}
973
974[
975    object,
976    uuid(96406be4-2b2b-11d3-b36b-00c04f6108ff),
977    pointer_default(unique),
978    local
979]
980interface IWMWriterSink : IUnknown
981{
982    HRESULT OnHeader(
983        [in] INSSBuffer *pHeader);
984
985    HRESULT IsRealTime(
986        [out] BOOL *pfRealTime);
987
988    HRESULT AllocateDataUnit(
989        [in] DWORD cbDataUnit,
990        [out] INSSBuffer **ppDataUnit);
991
992    HRESULT OnDataUnit(
993        [in] INSSBuffer *pDataUnit);
994
995    HRESULT OnEndWriting();
996}
997
998[
999    object,
1000    uuid(96406bd4-2b2b-11d3-b36b-00c04f6108ff),
1001    pointer_default(unique),
1002    local
1003]
1004interface IWMWriter : IUnknown
1005{
1006    HRESULT SetProfileByID(
1007        [in] REFGUID guidProfile);
1008
1009    HRESULT SetProfile(
1010        [in] IWMProfile *pProfile);
1011
1012    HRESULT SetOutputFilename(
1013        [in] const WCHAR *pwszFilename);
1014
1015    HRESULT GetInputCount(
1016        [out] DWORD *pcInputs);
1017
1018    HRESULT GetInputProps(
1019        [in] DWORD dwInputNum,
1020        [out] IWMInputMediaProps **ppInput);
1021
1022    HRESULT SetInputProps(
1023        [in] DWORD dwInputNum,
1024        [in] IWMInputMediaProps *pInput);
1025
1026    HRESULT GetInputFormatCount(
1027        [in] DWORD dwInputNumber,
1028        [out] DWORD *pcFormats);
1029
1030    HRESULT GetInputFormat(
1031        [in] DWORD dwInputNumber,
1032        [in] DWORD dwFormatNumber,
1033        [out] IWMInputMediaProps **pProps);
1034
1035    HRESULT BeginWriting();
1036
1037    HRESULT EndWriting();
1038
1039    HRESULT AllocateSample(
1040        [in] DWORD dwSampleSize,
1041        [out] INSSBuffer **ppSample);
1042
1043    HRESULT WriteSample(
1044        [in] DWORD dwInputNum,
1045        [in] QWORD cnsSampleTime,
1046        [in] DWORD dwFlags,
1047        [in] INSSBuffer *pSample);
1048
1049    HRESULT Flush();
1050}
1051
1052[
1053    object,
1054    uuid(96406be3-2b2b-11d3-b36b-00C04f6108ff),
1055    pointer_default(unique),
1056    local
1057]
1058interface IWMWriterAdvanced : IUnknown
1059{
1060    HRESULT GetSinkCount(
1061        [out] DWORD *pcSinks);
1062
1063    HRESULT GetSink(
1064        [in] DWORD dwSinkNum,
1065        [out] IWMWriterSink **ppSink);
1066
1067    HRESULT AddSink(
1068        [in] IWMWriterSink *pSink);
1069
1070    HRESULT RemoveSink(
1071        [in] IWMWriterSink *pSink);
1072
1073    HRESULT WriteStreamSample(
1074        [in] WORD wStreamNum,
1075        [in] QWORD cnsSampleTime,
1076        [in] DWORD msSampleSendTime,
1077        [in] QWORD cnsSampleDuration,
1078        [in] DWORD dwFlags,
1079        [in] INSSBuffer *pSample);
1080
1081    HRESULT SetLiveSource(
1082        BOOL fIsLiveSource);
1083
1084    HRESULT IsRealTime(
1085        [out] BOOL *pfRealTime);
1086
1087    HRESULT GetWriterTime(
1088        [out] QWORD *pCurrentTime);
1089
1090    HRESULT GetStatistics(
1091        [in] WORD wStreamNum,
1092        [out] WM_WRITER_STATISTICS *pStats);
1093
1094    HRESULT SetSyncTolerance(
1095        [in] DWORD msWindow);
1096
1097    HRESULT GetSyncTolerance(
1098        [out] DWORD *pmsWindow);
1099}
1100
1101[
1102    object,
1103    uuid(962dc1ec-c046-4db8-9cc7-26ceae500817),
1104    pointer_default(unique),
1105    local
1106]
1107interface IWMWriterAdvanced2 : IWMWriterAdvanced
1108{
1109    HRESULT GetInputSetting(
1110        [in] DWORD dwInputNum,
1111        [in] LPCWSTR pszName,
1112        [out] WMT_ATTR_DATATYPE *pType,
1113        [out, size_is(*pcbLength)] BYTE *pValue,
1114        [in, out] WORD *pcbLength);
1115
1116    HRESULT SetInputSetting(
1117        [in] DWORD dwInputNum,
1118        [in] LPCWSTR pszName,
1119        [in] WMT_ATTR_DATATYPE Type,
1120        [in, size_is(cbLength)] const BYTE *pValue,
1121        [in] WORD cbLength);
1122}
1123
1124[
1125    object,
1126    uuid(2cd6492d-7c37-4e76-9d3b-59261183a22e),
1127    pointer_default(unique),
1128    local
1129]
1130interface IWMWriterAdvanced3 : IWMWriterAdvanced2
1131{
1132    HRESULT GetStatisticsEx(
1133        [in] WORD wStreamNum,
1134        [out] WM_WRITER_STATISTICS_EX *pStats);
1135
1136    HRESULT SetNonBlocking();
1137}
1138
1139[
1140    object,
1141    uuid(96406bda-2b2b-11d3-b36b-00c04f6108ff),
1142    pointer_default(unique),
1143    local
1144]
1145interface IWMHeaderInfo : IUnknown
1146{
1147    HRESULT GetAttributeCount(
1148        [in] WORD stream_num,
1149        [out] WORD *attributes );
1150
1151    HRESULT GetAttributeByIndex(
1152        [in] WORD index,
1153        [in, out] WORD *stream_num,
1154        [out, size_is( *name_len )] WCHAR *name,
1155        [in, out] WORD *name_len,
1156        [out] WMT_ATTR_DATATYPE *type,
1157        [out, size_is( *length )] BYTE *value,
1158        [in, out] WORD *length );
1159
1160    HRESULT GetAttributeByName(
1161        [in, out] WORD *stream_num,
1162        [in] LPCWSTR name,
1163        [out] WMT_ATTR_DATATYPE *type,
1164        [out, size_is( *length )] BYTE *value,
1165        [in, out] WORD *length );
1166
1167    HRESULT SetAttribute(
1168        [in] WORD stream_num,
1169        [in] LPCWSTR name,
1170        [in] WMT_ATTR_DATATYPE type,
1171        [in, size_is( length )] const BYTE *value,
1172        [in] WORD length );
1173
1174    HRESULT GetMarkerCount(
1175        [out] WORD *markers );
1176
1177    HRESULT GetMarker(
1178        [in] WORD index,
1179        [out, size_is( *marker_len )] WCHAR *marker_name,
1180        [in, out] WORD *marker_len,
1181        [out] QWORD *marker_time );
1182
1183    HRESULT AddMarker(
1184        [in] LPCWSTR_WMSDK_TYPE_SAFE marker_name,
1185        [in] QWORD marker_time );
1186
1187    HRESULT RemoveMarker(
1188        [in] WORD index );
1189
1190    HRESULT GetScriptCount(
1191        [out] WORD *scripts );
1192
1193    HRESULT GetScript(
1194        [in] WORD index,
1195        [out, size_is( *type_len )] WCHAR *type,
1196        [in, out] WORD *type_len,
1197        [out, size_is( *command_len )] WCHAR *command,
1198        [in, out] WORD *command_len,
1199        [out] QWORD *script_time );
1200
1201    HRESULT AddScript(
1202        [in] LPCWSTR_WMSDK_TYPE_SAFE type,
1203        [in] LPCWSTR_WMSDK_TYPE_SAFE command,
1204        [in] QWORD script_time );
1205
1206    HRESULT RemoveScript(
1207        [in] WORD index );
1208};
1209
1210[
1211    object,
1212    uuid(15cf9781-454e-482e-b393-85fae487a810),
1213    pointer_default(unique),
1214    local
1215]
1216interface IWMHeaderInfo2 : IWMHeaderInfo
1217{
1218    HRESULT GetCodecInfoCount(
1219        [out] DWORD *codec_infos );
1220
1221    HRESULT GetCodecInfo(
1222        [in] DWORD   index,
1223        [in, out] WORD *name_len,
1224        [out, size_is( *name_len )] WCHAR *name,
1225        [in, out] WORD *description_len,
1226        [out, size_is( *description_len )] WCHAR *description,
1227        [out] WMT_CODEC_INFO_TYPE *codec_type,
1228        [in, out] WORD *codec_info_cnt,
1229        [out, size_is( *codec_info_cnt )] BYTE *codec_info );
1230};
1231
1232[
1233    object,
1234    uuid(15cc68e3-27cc-4ecd-b222-3f5d02d80bd5),
1235    pointer_default(unique),
1236    local
1237]
1238interface IWMHeaderInfo3 : IWMHeaderInfo2
1239{
1240    HRESULT GetAttributeCountEx(
1241        [in] WORD stream_num,
1242        [out] WORD *attributes );
1243
1244    HRESULT GetAttributeIndices(
1245        [in] WORD stream_num,
1246        [in] LPCWSTR name,
1247        [in] WORD *lang_index,
1248        [out, size_is( *count )] WORD *indices,
1249        [in, out] WORD *count );
1250
1251   HRESULT GetAttributeByIndexEx(
1252        [in] WORD stream_num,
1253        [in] WORD index,
1254        [out, size_is( *name_len )] LPWSTR name,
1255        [in, out] WORD *name_len,
1256        [out] WMT_ATTR_DATATYPE *type,
1257        [out] WORD *lang_index,
1258        [out, size_is( *data_len )] BYTE *value,
1259        [in, out] DWORD *data_len );
1260
1261    HRESULT ModifyAttribute(
1262        [in] WORD stream_num,
1263        [in] WORD index,
1264        [in] WMT_ATTR_DATATYPE type,
1265        [in] WORD lang_index,
1266        [in, size_is( length )] const BYTE *value,
1267        [in] DWORD length );
1268
1269    HRESULT AddAttribute(
1270        [in] WORD stream_num,
1271        [in] LPCWSTR name,
1272        [out] WORD *index,
1273        [in] WMT_ATTR_DATATYPE type,
1274        [in] WORD lang_index,
1275        [in, size_is( length )] const BYTE *value,
1276        [in] DWORD length );
1277
1278    HRESULT DeleteAttribute(
1279        [in] WORD stream_num,
1280        [in] WORD index );
1281
1282    HRESULT AddCodecInfo(
1283        [in] LPCWSTR_WMSDK_TYPE_SAFE name,
1284        [in] LPCWSTR_WMSDK_TYPE_SAFE description,
1285        [in] WMT_CODEC_INFO_TYPE codec_type,
1286        [in] WORD codec_info_cnt,
1287        [in, size_is( codec_info_cnt )] BYTE *codec_info );
1288};
1289
1290[
1291    object,
1292    uuid(96406bec-2b2b-11d3-b36b-00c04f6108ff),
1293    pointer_default(unique),
1294    local
1295]
1296interface IWMReaderNetworkConfig : IUnknown
1297{
1298    HRESULT GetBufferingTime([out] QWORD *buffering_time);
1299    HRESULT SetBufferingTime([in] QWORD buffering_time);
1300
1301    HRESULT GetUDPPortRanges(
1302        [out, size_is( *ranges )] WM_PORT_NUMBER_RANGE *array,
1303        [in, out] DWORD *ranges);
1304
1305    HRESULT SetUDPPortRanges(
1306        [in, size_is( ranges )] WM_PORT_NUMBER_RANGE *array,
1307        [in] DWORD ranges);
1308
1309    HRESULT GetProxySettings(
1310        [in] const WCHAR *protocol,
1311        [out] WMT_PROXY_SETTINGS *proxy);
1312
1313    HRESULT SetProxySettings(
1314        [in] LPCWSTR protocol,
1315        [in] WMT_PROXY_SETTINGS proxy);
1316
1317    HRESULT GetProxyHostName(
1318        [in] const WCHAR *protocol,
1319        [out, size_is( *size )] WCHAR *hostname,
1320        [in, out] DWORD *size);
1321
1322    HRESULT SetProxyHostName(
1323        [in] const WCHAR *protocol,
1324        [in] const WCHAR *hostname);
1325
1326    HRESULT GetProxyPort(
1327        [in] const WCHAR *protocol,
1328        [out] DWORD *port);
1329
1330    HRESULT SetProxyPort(
1331        [in] const WCHAR *protocol,
1332        [in] DWORD port);
1333
1334    HRESULT GetProxyExceptionList(
1335        [in] const WCHAR *protocol,
1336        [out, size_is( *count )] WCHAR *exceptions,
1337        [in, out] DWORD *count);
1338
1339    HRESULT SetProxyExceptionList(
1340        [in] const WCHAR *protocol,
1341        [in] const WCHAR *exceptions);
1342
1343    HRESULT GetProxyBypassForLocal(
1344        [in] const WCHAR *protocol,
1345        [out] BOOL *bypass);
1346
1347    HRESULT SetProxyBypassForLocal(
1348        [in] const WCHAR *protocol,
1349        [in] BOOL bypass);
1350
1351    HRESULT GetForceRerunAutoProxyDetection([out] BOOL *detection);
1352    HRESULT SetForceRerunAutoProxyDetection([in] BOOL detection);
1353
1354    HRESULT GetEnableMulticast([out] BOOL *multicast);
1355    HRESULT SetEnableMulticast([in] BOOL multicast);
1356
1357    HRESULT GetEnableHTTP([out] BOOL *enable);
1358    HRESULT SetEnableHTTP([in] BOOL enable);
1359
1360    HRESULT GetEnableUDP([out] BOOL *enable);
1361    HRESULT SetEnableUDP([in] BOOL enable);
1362
1363    HRESULT GetEnableTCP([out] BOOL *enable);
1364    HRESULT SetEnableTCP([in] BOOL enable);
1365
1366    HRESULT ResetProtocolRollover();
1367
1368    HRESULT GetConnectionBandwidth([out] DWORD *bandwidth);
1369    HRESULT SetConnectionBandwidth([in] DWORD bandwidth);
1370
1371    HRESULT GetNumProtocolsSupported([out] DWORD *protocols);
1372
1373    HRESULT GetSupportedProtocolName(
1374        [in]  DWORD protocol_num,
1375        [out, size_is( *size )] WCHAR *protocol,
1376        [in, out] DWORD *size);
1377
1378    HRESULT AddLoggingUrl([in] const WCHAR *url);
1379
1380    HRESULT GetLoggingUrl(
1381        [in] DWORD index,
1382        [out, size_is( *size )] WCHAR *url,
1383        [in, out] DWORD *size);
1384
1385    HRESULT GetLoggingUrlCount([out] DWORD *count);
1386
1387    HRESULT ResetLoggingUrlList();
1388}
1389
1390[
1391    object,
1392    uuid(d979a853-042b-4050-8387-c939db22013f),
1393    pointer_default(unique),
1394    local
1395]
1396interface IWMReaderNetworkConfig2 : IWMReaderNetworkConfig
1397{
1398    HRESULT GetEnableContentCaching([out] BOOL *enable);
1399    HRESULT SetEnableContentCaching([in] BOOL enable);
1400
1401    HRESULT GetEnableFastCache([out] BOOL *enable);
1402    HRESULT SetEnableFastCache([in] BOOL enable);
1403
1404    HRESULT GetAcceleratedStreamingDuration([out] QWORD *duration);
1405    HRESULT SetAcceleratedStreamingDuration([in] QWORD duration);
1406
1407    HRESULT GetAutoReconnectLimit([out] DWORD *limit);
1408    HRESULT SetAutoReconnectLimit([in] DWORD limit);
1409
1410    HRESULT GetEnableResends([out] BOOL *enable);
1411    HRESULT SetEnableResends([in] BOOL enable);
1412
1413    HRESULT GetEnableThinning([out] BOOL *enable);
1414    HRESULT SetEnableThinning([in] BOOL enable);
1415
1416    HRESULT GetMaxNetPacketSize([out] DWORD *packet_size);
1417}
1418
1419[
1420    object,
1421    uuid(96406bed-2b2b-11d3-b36b-00c04f6108ff),
1422    pointer_default(unique),
1423    local
1424]
1425
1426interface IWMReaderStreamClock : IUnknown
1427{
1428    HRESULT GetTime([in] QWORD *now);
1429
1430    HRESULT SetTimer([in] QWORD when,
1431                     [in] void *param,
1432                     [out] DWORD *id);
1433
1434    HRESULT KillTimer([in] DWORD id);
1435}
1436
1437[
1438    object,
1439    uuid(cdfb97ab-188f-40b3-b643-5b7903975c59),
1440    pointer_default(unique),
1441    local
1442]
1443interface IWMPacketSize : IUnknown
1444{
1445    HRESULT GetMaxPacketSize([out] DWORD *size);
1446    HRESULT SetMaxPacketSize([in] DWORD size);
1447};
1448
1449[
1450    object,
1451    uuid(8bfc2b9e-b646-4233-a877-1c6a079669dc),
1452    pointer_default(unique),
1453    local
1454]
1455interface IWMPacketSize2 : IWMPacketSize
1456{
1457    HRESULT GetMinPacketSize([out] DWORD *size);
1458    HRESULT SetMinPacketSize([in] DWORD size);
1459};
1460
1461[
1462    object,
1463    uuid(d2827540-3ee7-432c-b14c-dc17f085d3b3),
1464    pointer_default(unique),
1465    local
1466]
1467interface IWMDRMReader : IUnknown
1468{
1469    HRESULT AcquireLicense([in] DWORD flags);
1470    HRESULT CancelLicenseAcquisition();
1471
1472    HRESULT Individualize([in] DWORD flags);
1473    HRESULT CancelIndividualization();
1474
1475    HRESULT MonitorLicenseAcquisition();
1476    HRESULT CancelMonitorLicenseAcquisition();
1477
1478    HRESULT SetDRMProperty(
1479        [in] const WCHAR *name,
1480        [in] WMT_ATTR_DATATYPE type,
1481        [in, size_is( length )] const BYTE *value,
1482        [in] WORD length);
1483
1484    HRESULT GetDRMProperty(
1485        [in] const WCHAR *name,
1486        [out] WMT_ATTR_DATATYPE *type,
1487        [out, size_is( *length )] BYTE *value,
1488        [in, out] WORD *length);
1489};
1490
1491[
1492    object,
1493    uuid(befe7a75-9f1d-4075-b9d9-a3c37bda49a0),
1494    pointer_default(unique),
1495    local
1496]
1497interface IWMDRMReader2 : IWMDRMReader
1498{
1499    HRESULT SetEvaluateOutputLevelLicenses([in] BOOL evaluate);
1500    HRESULT GetPlayOutputLevels(
1501        [out, size_is( *length )] DRM_PLAY_OPL *play,
1502        [in, out] DWORD *length,
1503        [out] DWORD *level);
1504
1505    HRESULT GetCopyOutputLevels(
1506        [out, size_is( *length )] DRM_COPY_OPL *copy,
1507        [in, out] DWORD *length,
1508        [out] DWORD *level);
1509
1510    HRESULT TryNextLicense();
1511};
1512
1513[
1514    object,
1515    uuid(e08672de-f1e7-4ff4-a0a3-fc4b08e4caf8),
1516    pointer_default(unique),
1517    local
1518]
1519interface IWMDRMReader3 : IWMDRMReader2
1520{
1521    HRESULT GetInclusionList(
1522        [out] GUID **guids,
1523        [out] DWORD *count);
1524};
1525
1526[
1527    object,
1528    uuid(bddc4d08-944d-4d52-a612-46c3fda07dd4),
1529    pointer_default( unique ),
1530    local
1531]
1532interface IWMReaderAccelerator : IUnknown
1533{
1534    HRESULT GetCodecInterface(
1535        [in] DWORD output,
1536        [in] REFIID riid,
1537        [out] void **codec);
1538
1539    HRESULT Notify(
1540        [in] DWORD output,
1541        [in] WM_MEDIA_TYPE *subtype);
1542};
1543
1544[
1545    object,
1546    uuid(f369e2f0-e081-4fe6-8450-b810b2f410d1),
1547    pointer_default(unique),
1548    local
1549]
1550interface IWMReaderTimecode : IUnknown
1551{
1552    HRESULT GetTimecodeRangeCount(
1553        [in] WORD num,
1554        [out] WORD *count);
1555
1556    HRESULT GetTimecodeRangeBounds(
1557        [in] WORD stream,
1558        [in] WORD range,
1559        [out] DWORD *start_timecode,
1560        [out] DWORD *end_timecode);
1561};
1562
1563[
1564    object,
1565    uuid(fdbe5592-81a1-41ea-93bd-735cad1adc05),
1566    pointer_default(unique),
1567    local
1568]
1569interface IWMReaderTypeNegotiation : IUnknown
1570{
1571    HRESULT TryOutputProps(
1572        [in] DWORD output,
1573        [in] IWMOutputMediaProps *props);
1574};
1575
1576[
1577    object,
1578    uuid(df683f00-2d49-4d8e-92b7-fb19f6a0dc57),
1579    pointer_default(unique),
1580    local
1581]
1582interface IWMLanguageList : IUnknown
1583{
1584    HRESULT GetLanguageCount(
1585        [out] WORD *count);
1586
1587    HRESULT GetLanguageDetails(
1588        [in] WORD index,
1589        [out, size_is( *length )] WCHAR *language,
1590        [in, out] WORD *length);
1591
1592    HRESULT AddLanguageByRFC1766String(
1593        [in] LPCWSTR_WMSDK_TYPE_SAFE language,
1594        [out] WORD *index);
1595};
1596
1597[
1598    object,
1599    uuid(f28c0300-9baa-4477-a846-1744d9cbf533),
1600    pointer_default(unique),
1601    local
1602]
1603interface IWMReaderPlaylistBurn : IUnknown
1604{
1605    HRESULT InitPlaylistBurn(
1606        [in] DWORD count,
1607        [in] LPCWSTR_WMSDK_TYPE_SAFE *filenames,
1608        [in] IWMStatusCallback *callback,
1609        [in] void *context);
1610
1611    HRESULT GetInitResults(
1612        [in] DWORD count,
1613        [out] HRESULT *stat);
1614
1615    HRESULT Cancel();
1616
1617    HRESULT EndPlaylistBurn([in] HRESULT result);
1618};
1619
1620
1621cpp_quote("HRESULT WINAPI WMCreateWriter(IUnknown*,IWMWriter**);")
1622cpp_quote("HRESULT WINAPI WMCreateReader(IUnknown*,DWORD,IWMReader**);")
1623
1624cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_Base,   0x00000000,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1625cpp_quote("EXTERN_GUID(WMMEDIATYPE_Video,     0x73646976,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1626cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB1,   0xe436eb78,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1627cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB4,   0xe436eb79,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1628cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB8,   0xe436eb7a,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1629cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB565, 0xe436eb7b,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1630cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB555, 0xe436eb7c,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1631cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB24,  0xe436eb7d,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1632cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB32,  0xe436eb7e,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1633cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_I420,   0x30323449,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1634cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_IYUV,   0x56555949,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1635cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_YV12,   0x32315659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1636cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_YUY2,   0x32595559,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1637cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_P422,   0x32323450,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1638cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_UYVY,   0x59565955,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1639cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_YVYU,   0x55595659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1640cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_YVU9,   0x39555659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1641cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_VIDEOIMAGE, 0x1d4a45f2,0xe5f6,0x4b44,0x83,0x88,0xf0,0xae,0x5c,0x0e,0x0c,0x37);")
1642cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_MP43,   0x3334504d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1643cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_MP4S,   0x5334504d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1644cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_M4S2,   0x3253344d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1645cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMV1,   0x31564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1646cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMV2,   0x32564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1647cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_MSS1,   0x3153534d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1648cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_MPEG2_VIDEO, 0xe06d8026,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);")
1649cpp_quote("EXTERN_GUID(WMMEDIATYPE_Audio,     0x73647561,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1650cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_PCM,    0x00000001,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1651cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_DRM,    0x00000009,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1652cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMAudioV9,        0x00000162,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1653cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMAudio_Lossless, 0x00000163,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1654cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_MSS2,   0x3253534d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1655cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMSP1,  0x0000000a,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1656cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMSP2,  0x0000000b,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1657cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMV3,   0x33564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1658cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMVP,   0x50564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1659cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WVP2,   0x32505657,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1660cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WMVA,   0x41564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1661cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_WVC1,   0x31435657,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1662